From: Julia Lawall <julia.lawall@lip6.fr>
To: Daniel Rosenberg <drosen@google.com>
Cc: Daniel Campello <campello@google.com>,
kbuild-all@01.org, linux-kernel@vger.kernel.org
Subject: [PATCH] sdcardfs: fix itnull.cocci warnings
Date: Wed, 23 Mar 2016 08:22:00 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.02.1603230820360.2158@localhost6.localdomain6> (raw)
Remove NULL test, as the index variable of list_for-each_entry cannot be
NULL.
Generated by: scripts/coccinelle/iterators/itnull.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
derived_perm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/sdcardfs/derived_perm.c
+++ b/fs/sdcardfs/derived_perm.c
@@ -112,7 +112,7 @@ void get_derived_permission(struct dentr
void get_derive_permissions_recursive(struct dentry *parent) {
struct dentry *dentry;
list_for_each_entry(dentry, &parent->d_subdirs, d_child) {
- if (dentry && dentry->d_inode) {
+ if (dentry->d_inode) {
mutex_lock(&dentry->d_inode->i_mutex);
get_derived_permission(parent, dentry);
fix_derived_permission(dentry->d_inode);
next reply other threads:[~2016-03-23 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 7:22 Julia Lawall [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-03-23 7:20 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.1603230820360.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®