All of lore.kernel.org
 help / color / mirror / Atom feed
* [skeggsb-nouveau:00.02-gsp-rm 76/88] drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:490:21: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]'
@ 2023-09-19 16:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-19 16:33 UTC (permalink / raw)
  To: Ben Skeggs; +Cc: oe-kbuild-all

tree:   https://gitlab.freedesktop.org/skeggsb/nouveau 00.02-gsp-rm
head:   3897e2d444b49105470ddf8b6beed3f183bc4886
commit: 0f5d9f04ac48c505de7d63b5ed1615a87fa478cb [76/88] drm/nouveau/gsp/r535: add support for booting GSP-RM
config: sparc-allmodconfig (https://download.01.org/0day-ci/archive/20230920/202309200055.Z061Jep1-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230920/202309200055.Z061Jep1-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309200055.Z061Jep1-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In function 'r535_gsp_rpc_set_registry',
       inlined from 'r535_gsp_oneinit' at drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1492:8:
>> drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:490:21: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]' [-Warray-bounds=]
     490 |         rpc->entries[0].nameOffset = offsetof(typeof(*rpc), entries[1]);
         |         ~~~~~~~~~~~~^~~
   In file included from drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:38:
   drivers/gpu/drm/nouveau/include/nvrm/535.54.03/nvidia/generated/g_os_nvoc.h: In function 'r535_gsp_oneinit':
   drivers/gpu/drm/nouveau/include/nvrm/535.54.03/nvidia/generated/g_os_nvoc.h:41:29: note: while referencing 'entries'
      41 |     PACKED_REGISTRY_ENTRY   entries[0];
         |                             ^~~~~~~
   In function 'r535_gsp_rpc_set_registry',
       inlined from 'r535_gsp_oneinit' at drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1492:8:
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:491:21: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]' [-Warray-bounds=]
     491 |         rpc->entries[0].type = 1;
         |         ~~~~~~~~~~~~^~~
   drivers/gpu/drm/nouveau/include/nvrm/535.54.03/nvidia/generated/g_os_nvoc.h: In function 'r535_gsp_oneinit':
   drivers/gpu/drm/nouveau/include/nvrm/535.54.03/nvidia/generated/g_os_nvoc.h:41:29: note: while referencing 'entries'
      41 |     PACKED_REGISTRY_ENTRY   entries[0];
         |                             ^~~~~~~
   In function 'r535_gsp_rpc_set_registry',
       inlined from 'r535_gsp_oneinit' at drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1492:8:
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:492:21: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]' [-Warray-bounds=]
     492 |         rpc->entries[0].data = 0;
         |         ~~~~~~~~~~~~^~~
   drivers/gpu/drm/nouveau/include/nvrm/535.54.03/nvidia/generated/g_os_nvoc.h: In function 'r535_gsp_oneinit':
   drivers/gpu/drm/nouveau/include/nvrm/535.54.03/nvidia/generated/g_os_nvoc.h:41:29: note: while referencing 'entries'
      41 |     PACKED_REGISTRY_ENTRY   entries[0];
         |                             ^~~~~~~
   In function 'r535_gsp_rpc_set_registry',
       inlined from 'r535_gsp_oneinit' at drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1492:8:
   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:493:21: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]' [-Warray-bounds=]
     493 |         rpc->entries[0].length = 4;
         |         ~~~~~~~~~~~~^~~
   drivers/gpu/drm/nouveau/include/nvrm/535.54.03/nvidia/generated/g_os_nvoc.h: In function 'r535_gsp_oneinit':
   drivers/gpu/drm/nouveau/include/nvrm/535.54.03/nvidia/generated/g_os_nvoc.h:41:29: note: while referencing 'entries'
      41 |     PACKED_REGISTRY_ENTRY   entries[0];
         |                             ^~~~~~~


vim +490 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c

   476	
   477	static int
   478	r535_gsp_rpc_set_registry(struct nvkm_gsp *gsp)
   479	{
   480		PACKED_REGISTRY_TABLE *rpc;
   481		char *strings;
   482	
   483		rpc = nvkm_gsp_rpc_get(gsp, NV_VGPU_MSG_FUNCTION_SET_REGISTRY,
   484				       sizeof(*rpc) + sizeof(rpc->entries[0]) + 1);
   485		if (IS_ERR(rpc))
   486			return PTR_ERR(rpc);
   487	
   488		rpc->size = sizeof(*rpc);
   489		rpc->numEntries = 1;
 > 490		rpc->entries[0].nameOffset = offsetof(typeof(*rpc), entries[1]);
   491		rpc->entries[0].type = 1;
   492		rpc->entries[0].data = 0;
   493		rpc->entries[0].length = 4;
   494	
   495		strings = (char *)&rpc->entries[1];
   496		strings[0] = '\0';
   497	
   498		return nvkm_gsp_rpc_wr(gsp, rpc, false);
   499	}
   500	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-19 16:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19 16:33 [skeggsb-nouveau:00.02-gsp-rm 76/88] drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:490:21: warning: array subscript 0 is outside array bounds of 'PACKED_REGISTRY_ENTRY[0]' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.