All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sysfs: fix simple_return.cocci warnings
       [not found] <201506240705.vNc0oiCA%fengguang.wu@intel.com>
@ 2015-06-23 23:41 ` kbuild test robot
  2015-06-25 13:13   ` Serge E. Hallyn
  2015-07-22 19:38   ` Casey Schaufler
  0 siblings, 2 replies; 3+ messages in thread
From: kbuild test robot @ 2015-06-23 23:41 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: kbuild-all, Casey Schaufler, James Morris, Serge E. Hallyn,
	linux-security-module, linux-kernel

security/smack/smackfs.c:2251:1-4: WARNING: end returns can be simpified and declaration on line 2250 can be dropped

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.

Generated by: scripts/coccinelle/misc/simple_return.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 smackfs.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -2247,11 +2247,7 @@ static const struct file_operations smk_
  */
 static int smk_init_sysfs(void)
 {
-	int err;
-	err = sysfs_create_mount_point(fs_kobj, "smackfs");
-	if (err)
-		return err;
-	return 0;
+	return sysfs_create_mount_point(fs_kobj, "smackfs");
 }
 
 /**

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sysfs: fix simple_return.cocci warnings
  2015-06-23 23:41 ` [PATCH] sysfs: fix simple_return.cocci warnings kbuild test robot
@ 2015-06-25 13:13   ` Serge E. Hallyn
  2015-07-22 19:38   ` Casey Schaufler
  1 sibling, 0 replies; 3+ messages in thread
From: Serge E. Hallyn @ 2015-06-25 13:13 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Eric W. Biederman, kbuild-all, Casey Schaufler, James Morris,
	Serge E. Hallyn, linux-security-module, linux-kernel

On Wed, Jun 24, 2015 at 07:41:07AM +0800, kbuild test robot wrote:
> security/smack/smackfs.c:2251:1-4: WARNING: end returns can be simpified and declaration on line 2250 can be dropped
> 
>  Simplify a trivial if-return sequence.  Possibly combine with a
>  preceding function call.
> 
> Generated by: scripts/coccinelle/misc/simple_return.cocci
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>

> ---
> 
>  smackfs.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> --- a/security/smack/smackfs.c
> +++ b/security/smack/smackfs.c
> @@ -2247,11 +2247,7 @@ static const struct file_operations smk_
>   */
>  static int smk_init_sysfs(void)
>  {
> -	int err;
> -	err = sysfs_create_mount_point(fs_kobj, "smackfs");
> -	if (err)
> -		return err;
> -	return 0;
> +	return sysfs_create_mount_point(fs_kobj, "smackfs");
>  }
>  
>  /**

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sysfs: fix simple_return.cocci warnings
  2015-06-23 23:41 ` [PATCH] sysfs: fix simple_return.cocci warnings kbuild test robot
  2015-06-25 13:13   ` Serge E. Hallyn
@ 2015-07-22 19:38   ` Casey Schaufler
  1 sibling, 0 replies; 3+ messages in thread
From: Casey Schaufler @ 2015-07-22 19:38 UTC (permalink / raw)
  To: kbuild test robot, Eric W. Biederman
  Cc: kbuild-all, James Morris, Serge E. Hallyn, linux-security-module,
	linux-kernel

On 6/23/2015 4:41 PM, kbuild test robot wrote:
> security/smack/smackfs.c:2251:1-4: WARNING: end returns can be simpified and declaration on line 2250 can be dropped
>
>  Simplify a trivial if-return sequence.  Possibly combine with a
>  preceding function call.
>
> Generated by: scripts/coccinelle/misc/simple_return.cocci
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Acked-by: Casey Schaufler <casey@schaufler-ca.com>

Applied to https://github.com/cschaufler/smack-next.git#smack-for-4.3

> ---
>
>  smackfs.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> --- a/security/smack/smackfs.c
> +++ b/security/smack/smackfs.c
> @@ -2247,11 +2247,7 @@ static const struct file_operations smk_
>   */
>  static int smk_init_sysfs(void)
>  {
> -	int err;
> -	err = sysfs_create_mount_point(fs_kobj, "smackfs");
> -	if (err)
> -		return err;
> -	return 0;
> +	return sysfs_create_mount_point(fs_kobj, "smackfs");
>  }
>  
>  /**
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-22 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201506240705.vNc0oiCA%fengguang.wu@intel.com>
2015-06-23 23:41 ` [PATCH] sysfs: fix simple_return.cocci warnings kbuild test robot
2015-06-25 13:13   ` Serge E. Hallyn
2015-07-22 19:38   ` Casey Schaufler

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.