All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/scsi/ufs/ufshpb.c:54 ufshpb_init_subregion_tbl() error: potentially dereferencing uninitialized 'srgn'.
@ 2021-12-04 23:28 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-12-04 23:28 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2622 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Daejun Park <daejun7.park@samsung.com>
CC: "Martin K. Petersen" <martin.petersen@oracle.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Bart Van Assche <bvanassche@acm.org>
CC: Can Guo <cang@codeaurora.org>
CC: Bean Huo <beanhuo@micron.com>
CC: Stanley Chu <stanley.chu@mediatek.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   23b55d673d7527b093cd97b7c217c82e70cd1af0
commit: f02bc9754a6887bf5e286889265d24ce5e3b1952 scsi: ufs: ufshpb: Introduce Host Performance Buffer feature
date:   4 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 4 months ago
config: nios2-randconfig-m031-20211202 (https://download.01.org/0day-ci/archive/20211205/202112050712.4Q6KkUEZ-lkp(a)intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/scsi/ufs/ufshpb.c:54 ufshpb_init_subregion_tbl() error: potentially dereferencing uninitialized 'srgn'.

vim +/srgn +54 drivers/scsi/ufs/ufshpb.c

f02bc9754a6887 Daejun Park 2021-07-12  38  
f02bc9754a6887 Daejun Park 2021-07-12  39  static void ufshpb_init_subregion_tbl(struct ufshpb_lu *hpb,
f02bc9754a6887 Daejun Park 2021-07-12  40  				      struct ufshpb_region *rgn, bool last)
f02bc9754a6887 Daejun Park 2021-07-12  41  {
f02bc9754a6887 Daejun Park 2021-07-12  42  	int srgn_idx;
f02bc9754a6887 Daejun Park 2021-07-12  43  	struct ufshpb_subregion *srgn;
f02bc9754a6887 Daejun Park 2021-07-12  44  
f02bc9754a6887 Daejun Park 2021-07-12  45  	for (srgn_idx = 0; srgn_idx < rgn->srgn_cnt; srgn_idx++) {
f02bc9754a6887 Daejun Park 2021-07-12  46  		srgn = rgn->srgn_tbl + srgn_idx;
f02bc9754a6887 Daejun Park 2021-07-12  47  
f02bc9754a6887 Daejun Park 2021-07-12  48  		srgn->rgn_idx = rgn->rgn_idx;
f02bc9754a6887 Daejun Park 2021-07-12  49  		srgn->srgn_idx = srgn_idx;
f02bc9754a6887 Daejun Park 2021-07-12  50  		srgn->srgn_state = HPB_SRGN_UNUSED;
f02bc9754a6887 Daejun Park 2021-07-12  51  	}
f02bc9754a6887 Daejun Park 2021-07-12  52  
f02bc9754a6887 Daejun Park 2021-07-12  53  	if (unlikely(last && hpb->last_srgn_entries))
f02bc9754a6887 Daejun Park 2021-07-12 @54  		srgn->is_last = true;
f02bc9754a6887 Daejun Park 2021-07-12  55  }
f02bc9754a6887 Daejun Park 2021-07-12  56  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/scsi/ufs/ufshpb.c:54 ufshpb_init_subregion_tbl() error: potentially dereferencing uninitialized 'srgn'.
@ 2022-01-19 22:25 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-19 22:25 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2623 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Daejun Park <daejun7.park@samsung.com>
CC: "Martin K. Petersen" <martin.petersen@oracle.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Bart Van Assche <bvanassche@acm.org>
CC: Can Guo <cang@codeaurora.org>
CC: Bean Huo <beanhuo@micron.com>
CC: Stanley Chu <stanley.chu@mediatek.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1d1df41c5a33359a00e919d54eaebfb789711fdc
commit: f02bc9754a6887bf5e286889265d24ce5e3b1952 scsi: ufs: ufshpb: Introduce Host Performance Buffer feature
date:   6 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 6 months ago
config: h8300-randconfig-m031-20220118 (https://download.01.org/0day-ci/archive/20220120/202201200622.DD630AjY-lkp(a)intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/scsi/ufs/ufshpb.c:54 ufshpb_init_subregion_tbl() error: potentially dereferencing uninitialized 'srgn'.

vim +/srgn +54 drivers/scsi/ufs/ufshpb.c

f02bc9754a6887 Daejun Park 2021-07-12  38  
f02bc9754a6887 Daejun Park 2021-07-12  39  static void ufshpb_init_subregion_tbl(struct ufshpb_lu *hpb,
f02bc9754a6887 Daejun Park 2021-07-12  40  				      struct ufshpb_region *rgn, bool last)
f02bc9754a6887 Daejun Park 2021-07-12  41  {
f02bc9754a6887 Daejun Park 2021-07-12  42  	int srgn_idx;
f02bc9754a6887 Daejun Park 2021-07-12  43  	struct ufshpb_subregion *srgn;
f02bc9754a6887 Daejun Park 2021-07-12  44  
f02bc9754a6887 Daejun Park 2021-07-12  45  	for (srgn_idx = 0; srgn_idx < rgn->srgn_cnt; srgn_idx++) {
f02bc9754a6887 Daejun Park 2021-07-12  46  		srgn = rgn->srgn_tbl + srgn_idx;
f02bc9754a6887 Daejun Park 2021-07-12  47  
f02bc9754a6887 Daejun Park 2021-07-12  48  		srgn->rgn_idx = rgn->rgn_idx;
f02bc9754a6887 Daejun Park 2021-07-12  49  		srgn->srgn_idx = srgn_idx;
f02bc9754a6887 Daejun Park 2021-07-12  50  		srgn->srgn_state = HPB_SRGN_UNUSED;
f02bc9754a6887 Daejun Park 2021-07-12  51  	}
f02bc9754a6887 Daejun Park 2021-07-12  52  
f02bc9754a6887 Daejun Park 2021-07-12  53  	if (unlikely(last && hpb->last_srgn_entries))
f02bc9754a6887 Daejun Park 2021-07-12 @54  		srgn->is_last = true;
f02bc9754a6887 Daejun Park 2021-07-12  55  }
f02bc9754a6887 Daejun Park 2021-07-12  56  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-19 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-19 22:25 drivers/scsi/ufs/ufshpb.c:54 ufshpb_init_subregion_tbl() error: potentially dereferencing uninitialized 'srgn' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-12-04 23:28 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.