From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, Xie XiuQi <xiexiuqi@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:openEuler-1.0-LTS 1513/1513] include/scsi/scsi_cmnd.h:327:12: warning: 'scsi_cmnd' may be used uninitialized in this function
Date: Mon, 24 Mar 2025 16:23:55 +0800 [thread overview]
Message-ID: <202503241626.r5trN0HW-lkp@intel.com> (raw)
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
reply other threads:[~2025-03-24 8:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202503241626.r5trN0HW-lkp@intel.com \
--to=lkp@intel.com \
--cc=kernel@openeuler.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=xiexiuqi@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.