Skip to contentSkip to conversation

staging: lustre: fix comparisons should place the constant on the right side

PATCH In review Aastha Gupta 3 participants 3 messages Sep 14, 2017 – Sep 18, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: fix comparisons should place the constant on the right side

This patch fixes checkpatch.pl warning:

WARNING: Comparisons should place the constant on the right side of the test

---
 drivers/staging/lustre/lustre/include/lu_object.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/include/lu_object.h +1 -1
index 4f213c4..a3c0481 100644
@@ -1130,7 +1130,7 @@ struct lu_context_key {
 	{							 \
 		type *value;				      \
 								  \
-		BUILD_BUG_ON(PAGE_SIZE < sizeof(*value));        \
+		BUILD_BUG_ON(sizeof(*value) > PAGE_SIZE);        \
 								  \
 		value = kzalloc(sizeof(*value), GFP_NOFS);	\
 		if (!value)				\
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Aastha Gupta

This patch fixes checkpatch.pl warning:

WARNING: Comparisons should place the constant on the right side of the test

Technically, both sides are constants, but at least one side looks more constant-like.

julia

Quoted 27 lines
---
 drivers/staging/lustre/lustre/include/lu_object.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/include/lu_object.h +1 -2
index 4f213c4..a3c0481 100644
@@ -1130,7 +1130,7 @@ struct lu_context_key {
 	{							 \
 		type *value;				      \
 								  \
-		BUILD_BUG_ON(PAGE_SIZE < sizeof(*value));        \
+		BUILD_BUG_ON(sizeof(*value) > PAGE_SIZE);        \
 								  \
 		value = kzalloc(sizeof(*value), GFP_NOFS);	\
 		if (!value)				\
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1505389603-8642-1-git-send-email-aastha.gupta4104%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
In reply to Aastha Gupta
Quoted 9 lines · Aastha Gupta

This patch fixes checkpatch.pl warning:

WARNING: Comparisons should place the constant on the right side of the test

---
 drivers/staging/lustre/lustre/include/lu_object.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I see at least 11 different lustre patches from you that you have recently sent out, but yet I have no idea what patch to apply in what order :(

Please fix this up and resend all of them as a single patch series so I have a chance to get this correct.

thanks,

greg k-h