drivers/gpu/drm/nouveau/nvkm/subdev/top/ga100.c:82 ga100_top_oneinit() warn: inconsistent indenting

From: kernel test robot
Date: Sat Jun 12 2021 - 19:46:18 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 43cb5d49a99b3ecd9fef9826899aac948c3048da
commit: f6df392dddbb9e637b785e7e3d9337a74923dc10 drm/nouveau/top/ga100: initial support
date: 4 months ago
config: x86_64-randconfig-m001-20210612 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

smatch warnings:
drivers/gpu/drm/nouveau/nvkm/subdev/top/ga100.c:82 ga100_top_oneinit() warn: inconsistent indenting

vim +82 drivers/gpu/drm/nouveau/nvkm/subdev/top/ga100.c

23
24 static int
25 ga100_top_oneinit(struct nvkm_top *top)
26 {
27 struct nvkm_subdev *subdev = &top->subdev;
28 struct nvkm_device *device = subdev->device;
29 struct nvkm_top_device *info = NULL;
30 u32 data, type, inst;
31 int i, n, size = nvkm_rd32(device, 0x0224fc) >> 20;
32
33 for (i = 0, n = 0; i < size; i++) {
34 if (!info) {
35 if (!(info = nvkm_top_device_new(top)))
36 return -ENOMEM;
37 type = ~0;
38 inst = 0;
39 }
40
41 data = nvkm_rd32(device, 0x022800 + (i * 0x04));
42 nvkm_trace(subdev, "%02x: %08x\n", i, data);
43 if (!data && n == 0)
44 continue;
45
46 switch (n++) {
47 case 0:
48 type = (data & 0x3f000000) >> 24;
49 inst = (data & 0x000f0000) >> 16;
50 info->fault = (data & 0x0000007f);
51 break;
52 case 1:
53 info->addr = (data & 0x00fff000);
54 info->reset = (data & 0x0000001f);
55 break;
56 case 2:
57 info->runlist = (data & 0x0000fc00) >> 10;
58 info->engine = (data & 0x00000003);
59 break;
60 default:
61 break;
62 }
63
64 if (data & 0x80000000)
65 continue;
66 n = 0;
67
68 /* Translate engine type to NVKM engine identifier. */
69 #define I_(T,I) do { info->type = (T); info->inst = (I); } while(0)
70 #define O_(T,I) do { WARN_ON(inst); I_(T, I); } while (0)
71 switch (type) {
72 case 0x00000000: O_(NVKM_ENGINE_GR , 0); break;
73 case 0x0000000d: O_(NVKM_ENGINE_SEC2 , 0); break;
74 case 0x0000000e: I_(NVKM_ENGINE_NVENC , inst); break;
75 case 0x00000010: I_(NVKM_ENGINE_NVDEC , inst); break;
76 case 0x00000012: I_(NVKM_SUBDEV_IOCTRL, inst); break;
77 case 0x00000013: I_(NVKM_ENGINE_CE , inst); break;
78 case 0x00000014: O_(NVKM_SUBDEV_GSP , 0); break;
79 case 0x00000015: O_(NVKM_ENGINE_NVJPG , 0); break;
80 case 0x00000016: O_(NVKM_ENGINE_OFA , 0); break;
81 case 0x00000017: O_(NVKM_SUBDEV_FLA , 0); break;
> 82 break;
83 default:
84 break;
85 }
86
87 nvkm_debug(subdev, "%02x.%d (%8s): addr %06x fault %2d "
88 "runlist %2d engine %2d reset %2d\n", type, inst,
89 info->type == NVKM_SUBDEV_NR ? "????????" : nvkm_subdev_type[info->type],
90 info->addr, info->fault, info->runlist, info->engine, info->reset);
91 info = NULL;
92 }
93
94 return 0;
95 }
96

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip