* [openeuler:openEuler-1.0-LTS 1513/1513] include/scsi/scsi_cmnd.h:327:12: warning: 'scsi_cmnd' may be used uninitialized in this function
@ 2025-03-24 8:23 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-03-24 8:23 UTC (permalink / raw)
To: kernel, Xie XiuQi; +Cc: oe-kbuild-all
Hi chenxiang,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 256df080c8e0f3a9c8a5cc997ffc10fd5075dc6d
commit: b4adbc622b73d2bc61e6d712e0a916e568f0ce3f [1513/1513] scsi: hisi_sas: add support for DIF/DIX feature of v3 hw
config: arm64-randconfig-002-20250324 (https://download.01.org/0day-ci/archive/20250324/202503241626.r5trN0HW-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250324/202503241626.r5trN0HW-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/202503241626.r5trN0HW-lkp@intel.com/
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
In file included from include/scsi/libsas.h:36,
from include/scsi/sas_ata.h:29,
from drivers/scsi/hisi_sas/hisi_sas.h:27,
from drivers/scsi/hisi_sas/hisi_sas_main.c:12:
drivers/scsi/hisi_sas/hisi_sas_main.c: In function 'hisi_sas_dif_dma_map':
>> include/scsi/scsi_cmnd.h:327:12: warning: 'scsi_cmnd' may be used uninitialized in this function [-Wmaybe-uninitialized]
327 | return cmd->prot_sdb ? cmd->prot_sdb->table.sgl : NULL;
| ~~~^~~~~~~~~~
drivers/scsi/hisi_sas/hisi_sas_main.c:412:20: note: 'scsi_cmnd' was declared here
412 | struct scsi_cmnd *scsi_cmnd;
| ^~~~~~~~~
vim +/scsi_cmnd +327 include/scsi/scsi_cmnd.h
7027ad72a68979 Martin K. Petersen 2008-07-17 324
7027ad72a68979 Martin K. Petersen 2008-07-17 325 static inline struct scatterlist *scsi_prot_sglist(struct scsi_cmnd *cmd)
7027ad72a68979 Martin K. Petersen 2008-07-17 326 {
7027ad72a68979 Martin K. Petersen 2008-07-17 @327 return cmd->prot_sdb ? cmd->prot_sdb->table.sgl : NULL;
7027ad72a68979 Martin K. Petersen 2008-07-17 328 }
7027ad72a68979 Martin K. Petersen 2008-07-17 329
:::::: The code at line 327 was first introduced by commit
:::::: 7027ad72a689797475973c6feb5f0b673382f779 [SCSI] Support devices with protection information
:::::: TO: Martin K. Petersen <martin.petersen@oracle.com>
:::::: CC: James Bottomley <James.Bottomley@HansenPartnership.com>
--
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:[~2025-03-24 8:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-24 8:23 [openeuler:openEuler-1.0-LTS 1513/1513] include/scsi/scsi_cmnd.h:327:12: warning: 'scsi_cmnd' may be used uninitialized in this function 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.