From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/scsi/ufs/ufshpb.c:54 ufshpb_init_subregion_tbl() error: potentially dereferencing uninitialized 'srgn'.
Date: Thu, 20 Jan 2022 06:25:24 +0800 [thread overview]
Message-ID: <202201200622.DD630AjY-lkp@intel.com> (raw)
[-- 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
next reply other threads:[~2022-01-19 22:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 22:25 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-12-04 23:28 drivers/scsi/ufs/ufshpb.c:54 ufshpb_init_subregion_tbl() error: potentially dereferencing uninitialized 'srgn' kernel test robot
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=202201200622.DD630AjY-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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.