* [PATCH] sdcardfs: fix itnull.cocci warnings
@ 2016-03-23 7:20 Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2016-03-23 7:20 UTC (permalink / raw)
To: Daniel Rosenberg; +Cc: kbuild-all, Daniel Campello, linux-kernel
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);
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] sdcardfs: fix itnull.cocci warnings
@ 2016-03-23 7:22 Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2016-03-23 7:22 UTC (permalink / raw)
To: Daniel Rosenberg; +Cc: Daniel Campello, kbuild-all, linux-kernel
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-23 7:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-23 7:20 [PATCH] sdcardfs: fix itnull.cocci warnings Julia Lawall
2016-03-23 7:22 Julia Lawall
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®