* [PATCH] staging: lustre: lnet: return of an error code should be negative
@ 2018-01-28 5:24 Sumit Pundir
2018-01-30 1:49 ` Dilger, Andreas
2018-02-11 21:39 ` James Simmons
0 siblings, 2 replies; 3+ messages in thread
From: Sumit Pundir @ 2018-01-28 5:24 UTC (permalink / raw)
To: oleg.drokin
Cc: andreas.dilger, jsimmons, gregkh, lustre-devel, devel, linux-kernel
Return value of error codes should typically be negative.
Issue reported by checkpatch.pl
Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
---
drivers/staging/lustre/lnet/selftest/framework.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c
index c7697f6..0ca1e3a 100644
--- a/drivers/staging/lustre/lnet/selftest/framework.c
+++ b/drivers/staging/lustre/lnet/selftest/framework.c
@@ -187,7 +187,7 @@ sfw_del_session_timer(void)
return 0;
}
- return EBUSY; /* racing with sfw_session_expired() */
+ return -EBUSY; /* racing with sfw_session_expired() */
}
static void
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: lustre: lnet: return of an error code should be negative
2018-01-28 5:24 [PATCH] staging: lustre: lnet: return of an error code should be negative Sumit Pundir
@ 2018-01-30 1:49 ` Dilger, Andreas
2018-02-11 21:39 ` James Simmons
1 sibling, 0 replies; 3+ messages in thread
From: Dilger, Andreas @ 2018-01-30 1:49 UTC (permalink / raw)
To: Sumit Pundir; +Cc: devel, gregkh, linux-kernel, Drokin, Oleg, lustre-devel
On Jan 27, 2018, at 22:24, Sumit Pundir <pundirsumit11@gmail.com> wrote:
>
> Return value of error codes should typically be negative.
> Issue reported by checkpatch.pl
>
> Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
> ---
> drivers/staging/lustre/lnet/selftest/framework.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c
> index c7697f6..0ca1e3a 100644
> --- a/drivers/staging/lustre/lnet/selftest/framework.c
> +++ b/drivers/staging/lustre/lnet/selftest/framework.c
> @@ -187,7 +187,7 @@ sfw_del_session_timer(void)
> return 0;
> }
>
> - return EBUSY; /* racing with sfw_session_expired() */
> + return -EBUSY; /* racing with sfw_session_expired() */
> }
>
> static void
> --
> 2.7.4
>
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: lustre: lnet: return of an error code should be negative
2018-01-28 5:24 [PATCH] staging: lustre: lnet: return of an error code should be negative Sumit Pundir
2018-01-30 1:49 ` Dilger, Andreas
@ 2018-02-11 21:39 ` James Simmons
1 sibling, 0 replies; 3+ messages in thread
From: James Simmons @ 2018-02-11 21:39 UTC (permalink / raw)
To: Sumit Pundir
Cc: devel, andreas.dilger, gregkh, linux-kernel, oleg.drokin, lustre-devel
> Return value of error codes should typically be negative.
> Issue reported by checkpatch.pl
>
Reviewed-by: James Simmons <jsimmons@infradead.org>
> Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
> ---
> drivers/staging/lustre/lnet/selftest/framework.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c
> index c7697f6..0ca1e3a 100644
> --- a/drivers/staging/lustre/lnet/selftest/framework.c
> +++ b/drivers/staging/lustre/lnet/selftest/framework.c
> @@ -187,7 +187,7 @@ sfw_del_session_timer(void)
> return 0;
> }
>
> - return EBUSY; /* racing with sfw_session_expired() */
> + return -EBUSY; /* racing with sfw_session_expired() */
> }
>
> static void
> --
> 2.7.4
>
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-11 21:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-28 5:24 [PATCH] staging: lustre: lnet: return of an error code should be negative Sumit Pundir
2018-01-30 1:49 ` Dilger, Andreas
2018-02-11 21:39 ` James Simmons
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®