All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Bart Van Assche <bvanassche@acm.org>
Cc: linux-kernel@vger.kernel.org, kbuild-all@lists.01.org
Subject: [PATCH] scsi: ufs: fix itnull.cocci warnings
Date: Sat, 26 Mar 2022 09:35:43 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2203260934040.3141@hadrien> (raw)

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

list_for_each_entry binds rgn to an entry, which cannot be NULL.  So
remove the first test.

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

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://github.com/bvanassche/linux ufs-for-next
head:   b93e987f91a0c037fc4357107f5144110cd84d08
commit: b93e987f91a0c037fc4357107f5144110cd84d08 [324/324] scsi: ufs: Split the drivers/scsi/ufs directory
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago

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

 drivers/scsi/ufs-core/ufshpb.c |    6 ------
 1 file changed, 6 deletions(-)

--- a/drivers/scsi/ufs-core/ufshpb.c
+++ b/drivers/scsi/ufs-core/ufshpb.c
@@ -875,12 +875,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;


WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: kbuild-all@lists.01.org
Subject: [PATCH] scsi: ufs: fix itnull.cocci warnings
Date: Sat, 26 Mar 2022 09:35:43 +0100	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2203260934040.3141@hadrien> (raw)

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

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

list_for_each_entry binds rgn to an entry, which cannot be NULL.  So
remove the first test.

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

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://github.com/bvanassche/linux ufs-for-next
head:   b93e987f91a0c037fc4357107f5144110cd84d08
commit: b93e987f91a0c037fc4357107f5144110cd84d08 [324/324] scsi: ufs: Split the drivers/scsi/ufs directory
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago

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

 drivers/scsi/ufs-core/ufshpb.c |    6 ------
 1 file changed, 6 deletions(-)

--- a/drivers/scsi/ufs-core/ufshpb.c
+++ b/drivers/scsi/ufs-core/ufshpb.c
@@ -875,12 +875,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;

             reply	other threads:[~2022-03-26  8:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-26  8:35 Julia Lawall [this message]
2022-03-26  8:35 ` [PATCH] scsi: ufs: fix itnull.cocci warnings Julia Lawall
  -- strict thread matches above, loose matches on Subject: below --
2022-03-24 11:50 [bvanassche:ufs-for-next 324/324] drivers/scsi/ufs-core/ufshpb.c:878:7-10: ERROR: iterator variable bound on line 877 cannot be NULL kernel test robot
2022-03-24 11:42 ` [PATCH] scsi: ufs: fix itnull.cocci warnings kernel test robot
2021-04-29 20:53 Julia Lawall
2021-04-29  2:21 [PATCH v33 2/4] scsi: ufs: L2P map management for HPB read kernel test robot
2021-04-29  2:21 ` [PATCH] scsi: ufs: fix itnull.cocci warnings 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=alpine.DEB.2.22.394.2203260934040.3141@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=bvanassche@acm.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.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.