CC: kbuild-...@lists.01.org
In-Reply-To: <20210428075716epcms2p2b2f54411913a85d40735e061434ffaf5@epcms2p2>
References: <20210428075716epcms2p2b2f54411913a85d40735e061434ffaf5@epcms2p2>
TO: Daejun Park <daejun7.p...@samsung.com>
TO: Daejun Park <daejun7.p...@samsung.com>
TO: Greg KH <g...@kroah.com>
TO: "avri.altman" <avri.alt...@wdc.com>
TO: jejb <j...@linux.ibm.com>
TO: "martin.petersen" <martin.peter...@oracle.com>
TO: asutoshd <asuto...@codeaurora.org>
TO: "stanley.chu" <stanley....@mediatek.com>
TO: cang <c...@codeaurora.org>
TO: bvanassche <bvanass...@acm.org>
TO: huobean <huob...@gmail.com>

From: kernel test robot <l...@intel.com>

drivers/scsi/ufs/ufshpb.c:406:7-10: ERROR: iterator variable bound on line 405 
cannot be NULL

 Many iterators have the property that the first argument is always bound
 to a real list element, never NULL.

Semantic patch information:
 False positives arise for some iterators that do not have this property,
 or in cases when the loop cursor is reassigned.  The latter should only
 happen when the matched code is on the way to a loop exit (break, goto,
 or return).

Generated by: scripts/coccinelle/iterators/itnull.cocci

CC: Daejun Park <daejun7.p...@samsung.com>
Reported-by: kernel test robot <l...@intel.com>
Signed-off-by: kernel test robot <l...@intel.com>
---

url:    
https://github.com/0day-ci/linux/commits/Daejun-Park/scsi-ufs-Introduce-HPB-feature/20210428-155927
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
:::::: branch date: 18 hours ago
:::::: commit date: 18 hours ago

Please take the patch only if it's a positive warning. Thanks!

 ufshpb.c |    6 ------
 1 file changed, 6 deletions(-)

--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -403,12 +403,6 @@ static struct ufshpb_region *ufshpb_vict
        struct ufshpb_region *rgn, *victim_rgn = NULL;
 
        list_for_each_entry(rgn, &lru_info->lh_lru_rgn, list_lru_rgn) {
-               if (!rgn) {
-                       dev_err(&hpb->sdev_ufs_lu->sdev_dev,
-                               "%s: no region allocated\n",
-                               __func__);
-                       return NULL;
-               }
                if (ufshpb_check_srgns_issue_state(hpb, rgn))
                        continue;
 
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to