Skip to contentSkip to conversation

erofs: fix ifnullfree.cocci warnings

PATCH RESEND New Chao Yu 1 participant 2 messages Jun 22, 2018 EROFS file system

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH RESEND 1/2 erofs: fix ifnullfree.cocci warnings

From: kbuild test robot <[email protected]>

NULL check before kfree is not needed.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes 4f89dfc3f411 ("erofs: update Kconfig and Makefile")
CC Gao Xiang <gaoxiang25 at huawei.com>
Signed-off-by kbuild test robot <fengguang.wu at intel.com>
Signed-off-by Julia Lawall <julia.lawall at lip6.fr>
Signed-off-by Chao Yu <yuchao0 at huawei.com>
---
 fs/erofs/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/erofs/super.c +1 -2
index c46d1c65dcbb..7e725bbd9a0e 100644
@@ -61,8 +61,7 @@ static void i_callback(struct rcu_head *head)
 		kfree(inode->i_link);
 #endif
 
-	if (vi->xattr_shared_xattrs != NULL)
-		kfree(vi->xattr_shared_xattrs);
+	kfree(vi->xattr_shared_xattrs);
 
 	kmem_cache_free(erofs_inode_cachep, vi);
 }
Signature · 1 line
2.18.0.rc1
author
#1 lore raw

PATCH RESEND 2/2 erofs: update SPDX-License-Identifier

From: Gao Xiang <[email protected]>

Update the source code license to "GPLv2+" from patchset v2. (Could be updated suggested by Savannah in the future.)

Signed-off-by Gao Xiang <gaoxiang25 at huawei.com>
Reviewed-by Chao Yu <yuchao0 at huawei.com>
Signed-off-by Chao Yu <yuchao0 at huawei.com>
---
 fs/erofs/data.c          | 2 +-
 fs/erofs/dir.c           | 2 +-
 fs/erofs/erofs_fs.h      | 2 +-
 fs/erofs/inode.c         | 2 +-
 fs/erofs/internal.h      | 2 +-
 fs/erofs/namei.c         | 2 +-
 fs/erofs/pagevec.h       | 2 +-
 fs/erofs/staging.h       | 2 +-
 fs/erofs/super.c         | 2 +-
 fs/erofs/unzip.c         | 2 +-
 fs/erofs/unzip.h         | 2 +-
 fs/erofs/unzip_generic.c | 2 +-
 fs/erofs/unzip_lz4.c     | 2 +-
 fs/erofs/unzip_vle.h     | 2 +-
 fs/erofs/xattr.c         | 2 +-
 fs/erofs/xattr.h         | 2 +-
 16 files changed, 16 insertions(+), 16 deletions(-)
fs/erofs/data.c +1 -1
index c54495d6e2f1..acd4ff41b3d7 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/erofs/data.c
  *
fs/erofs/dir.c +1 -1
index 7d3448ba2458..39870e165007 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/erofs/dir.c
  *
fs/erofs/erofs_fs.h +1 -1
index c08d98295d76..96feebc0bbec 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0+
  *
  * linux/fs/erofs/erofs_fs.h
  *
fs/erofs/inode.c +1 -1
index 61010c03386e..94e827b57a5b 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/erofs/inode.c
  *
fs/erofs/internal.h +1 -1
index 307f435d982d..934f750975f2 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0+
  *
  * linux/fs/erofs/internal.h
  *
fs/erofs/namei.c +1 -1
index ae715842058c..506974fd3a88 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/erofs/namei.c
  *
fs/erofs/pagevec.h +1 -1
index 5a7ef76d3934..8ba78d52cb2d 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0+
  *
  * linux/fs/erofs/pagevec.h
  *
fs/erofs/staging.h +1 -1
index 7712a7bf1add..5563dc96d1ab 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0+ */
 
 /* should be avoid in the future */
 #include <linux/version.h>
fs/erofs/super.c +1 -1
index 7e725bbd9a0e..8da471155da2 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/erofs/super.c
  *
fs/erofs/unzip.c +1 -1
index 171aec14272f..04df8e060594 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/erofs/unzip.c
  *
fs/erofs/unzip.h +1 -1
index 45e4e1425bda..486a8fb515bf 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0+
  *
  * linux/fs/erofs/unzip.h
  *
fs/erofs/unzip_generic.c +1 -1
index 5e0b0bcd157d..3282443e94cc 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/erofs/unzip_generic.c
  *
fs/erofs/unzip_lz4.c +1 -1
index aa2e398e2cdb..f46aaa7e9ff8 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/erofs/unzip_lz4.c
  *
fs/erofs/unzip_vle.h +1 -1
index cf7ef9f006bf..4e3f0396d720 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0+
  *
  * linux/fs/erofs/unzip_vle.h
  *
fs/erofs/xattr.c +1 -1
index 6ee0f0c20a9a..f27ee416542d 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * linux/fs/erofs/xattr.c
  *
fs/erofs/xattr.h +1 -1
index b93ccdfffacc..7f3d2b87d7a7 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0+
  *
  * linux/fs/erofs/xattr.h
  *
Signature · 1 line
2.18.0.rc1