mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Daniel Rosenberg <drosen@google.com>
Cc: kbuild-all@01.org, Daniel Campello <campello@google.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] sdcardfs: fix itnull.cocci warnings
Date: Wed, 23 Mar 2016 08:20:14 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.02.1603230817370.2158@localhost6.localdomain6> (raw)

Remove NULL tests, as the index variable of list_for_each_entry cannot be 
NULL.

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

The code seems to have a lot of unnecessary braces as well.

tree:   https://android.googlesource.com/kernel/common android-4.4
head:   f06e869f936e548fd3fd78ddcbebe171f0defadb
commit: 1e2d3bbcf3f5a603e62dfa0514a43e13ee679d4f [4/6] sdcardfs: Bring up 
to date with Android M permissions:

 packagelist.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/sdcardfs/packagelist.c
+++ b/fs/sdcardfs/packagelist.c
@@ -160,7 +160,7 @@ static int insert_str_to_int(struct pack
 	mutex_unlock(&pkgl_dat->hashtable_lock);
 
 	list_for_each_entry(sbinfo, &sdcardfs_super_list, list) {
-		if (sbinfo) {
+		{
 			fixup_perms(sbinfo->sb);
 		}
 	}
@@ -189,7 +189,7 @@ static void remove_str_to_int(struct pac
 	}
 	mutex_unlock(&pkgl_dat->hashtable_lock);
 	list_for_each_entry(sbinfo, &sdcardfs_super_list, list) {
-		if (sbinfo) {
+		{
 			fixup_perms(sbinfo->sb);
 		}
 	}

             reply	other threads:[~2016-03-23  7:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23  7:20 Julia Lawall [this message]
2016-03-23  7:22 Julia Lawall

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.02.1603230817370.2158@localhost6.localdomain6 \
    --to=julia.lawall@lip6.fr \
    --cc=campello@google.com \
    --cc=drosen@google.com \
    --cc=kbuild-all@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®