[drm-misc:for-linux-next 1/1] drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1266:11: error: label at end of compound statement: expected statement

kernel test robot lkp at intel.com
Sat Apr 27 03:26:20 UTC 2024


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: arm-defconfig (https://download.01.org/0day-ci/archive/20240427/202404271146.n4lVV4tO-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240427/202404271146.n4lVV4tO-lkp@intel.com/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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404271146.n4lVV4tO-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1266:11: error: label at end of compound statement: expected statement
                   default:
                           ^
                            ;
   1 error generated.


vim +1266 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(&reg->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


More information about the dri-devel mailing list