tree: git://anongit.freedesktop.org/drm/drm-misc for-linux-next head: 61ba791c4a7a09a370c45b70a81b8c7d4cf6b2ae commit: b58a0bc904ffa091fc020f7fd00e91808fec820e [1/1] nouveau: add command-line GSP-RM registry support config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20240427/202404271259.VQcFccxo-lkp@xxxxxxxxx/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 5ef5eb66fb428aaf61fb51b709f065c069c11242) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240427/202404271259.VQcFccxo-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202404271259.VQcFccxo-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:22: In file included from drivers/gpu/drm/nouveau/nvkm/subdev/gsp/priv.h:4: In file included from drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h:4: In file included from drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h:4: In file included from drivers/gpu/drm/nouveau/include/nvkm/core/device.h:4: In file included from drivers/gpu/drm/nouveau/include/nvkm/core/oclass.h:3: In file included from drivers/gpu/drm/nouveau/include/nvkm/core/os.h:4: In file included from drivers/gpu/drm/nouveau/include/nvif/os.h:8: In file included from include/linux/pci.h:38: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:24: In file included from include/linux/mm.h:2208: include/linux/vmstat.h:508:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: error: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Werror,-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1267:3: error: label at end of compound statement is a C23 extension [-Werror,-Wc23-extensions] 1267 | } | ^ 6 errors generated. vim +1267 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c 1199 1200 /** 1201 * build_registry -- create the registry RPC data 1202 * @gsp: gsp pointer 1203 * @registry: pointer to the RPC payload to fill 1204 * 1205 * After all registry key/value pairs have been added, call this function to 1206 * build the RPC. 1207 * 1208 * The registry RPC looks like this: 1209 * 1210 * +-----------------+ 1211 * |NvU32 size; | 1212 * |NvU32 numEntries;| 1213 * +-----------------+ 1214 * +----------------------------------------+ 1215 * |PACKED_REGISTRY_ENTRY | 1216 * +----------------------------------------+ 1217 * |Null-terminated key (string) for entry 0| 1218 * +----------------------------------------+ 1219 * |Binary/string data value for entry 0 | (only if necessary) 1220 * +----------------------------------------+ 1221 * 1222 * +----------------------------------------+ 1223 * |PACKED_REGISTRY_ENTRY | 1224 * +----------------------------------------+ 1225 * |Null-terminated key (string) for entry 1| 1226 * +----------------------------------------+ 1227 * |Binary/string data value for entry 1 | (only if necessary) 1228 * +----------------------------------------+ 1229 * ... (and so on, one copy for each entry) 1230 * 1231 * 1232 * The 'data' field of an entry is either a 32-bit integer (for type DWORD) 1233 * or an offset into the PACKED_REGISTRY_TABLE (for types BINARY and STRING). 1234 * 1235 * All memory allocated by add_registry() is released. 1236 */ 1237 static void build_registry(struct nvkm_gsp *gsp, PACKED_REGISTRY_TABLE *registry) 1238 { 1239 struct registry_list_entry *reg, *n; 1240 size_t str_offset; 1241 unsigned int i = 0; 1242 1243 registry->numEntries = list_count_nodes(&gsp->registry_list); 1244 str_offset = struct_size(registry, entries, registry->numEntries); 1245 1246 list_for_each_entry_safe(reg, n, &gsp->registry_list, head) { 1247 registry->entries[i].type = reg->type; 1248 registry->entries[i].length = reg->vlen; 1249 1250 /* Append the key name to the table */ 1251 registry->entries[i].nameOffset = str_offset; 1252 memcpy((void *)registry + str_offset, reg->key, reg->klen); 1253 str_offset += reg->klen; 1254 1255 switch (reg->type) { 1256 case REGISTRY_TABLE_ENTRY_TYPE_DWORD: 1257 registry->entries[i].data = reg->dword; 1258 break; 1259 case REGISTRY_TABLE_ENTRY_TYPE_BINARY: 1260 case REGISTRY_TABLE_ENTRY_TYPE_STRING: 1261 /* If the type is binary or string, also append the value */ 1262 memcpy((void *)registry + str_offset, reg->binary, reg->vlen); 1263 registry->entries[i].data = str_offset; 1264 str_offset += reg->vlen; 1265 break; 1266 default: > 1267 } 1268 1269 i++; 1270 list_del(®->head); 1271 kfree(reg); 1272 } 1273 1274 /* Double-check that we calculated the sizes correctly */ 1275 WARN_ON(gsp->registry_rpc_size != str_offset); 1276 1277 registry->size = gsp->registry_rpc_size; 1278 } 1279 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki