Skip to contentSkip to conversation

staging: lustre: lnet: return of an error code should be negative

PATCH In review Sumit Pundir 3 participants 3 messages Jan 28, 2018 – Feb 11, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: lnet: return of an error code should be negative

Return value of error codes should typically be negative. Issue reported by checkpatch.pl

---
 drivers/staging/lustre/lnet/selftest/framework.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/selftest/framework.c +1 -1
index c7697f6..0ca1e3a 100644
@@ -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
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Sumit Pundir

Return value of error codes should typically be negative. Issue reported by checkpatch.pl

Quoted 16 lines

---
drivers/staging/lustre/lnet/selftest/framework.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/selftest/framework.c +1 -1
index c7697f6..0ca1e3a 100644
@@ -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() */
 }
 
Quoted 4 lines

static void

Signature · 1 line
2.7.4

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reviewed-by on v1 1/1
#2 lore raw
In reply to Sumit Pundir
Quoted 4 lines

Return value of error codes should typically be negative. Issue reported by checkpatch.pl

Quoted 22 lines
---
 drivers/staging/lustre/lnet/selftest/framework.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/selftest/framework.c +1 -1
index c7697f6..0ca1e3a 100644
@@ -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
Signature · 1 line
2.7.4

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel