Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1598316 > unrolled thread
| Started by | Craig Inches <Craig@craiginches.com> |
|---|---|
| First post | 2017-03-11 14:20 +0100 |
| Last post | 2017-03-13 14:20 +0100 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: lustre fix constant comparision style issue in lu_object.h Craig Inches <Craig@craiginches.com> - 2017-03-11 14:20 +0100
Re: [PATCH] staging: lustre fix constant comparision style issue in lu_object.h Greg KH <gregkh@linuxfoundation.org> - 2017-03-12 14:40 +0100
Re: [PATCH] staging: lustre fix constant comparision style issue in lu_object.h Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-13 13:20 +0100
Re: [PATCH] staging: lustre fix constant comparision style issue in lu_object.h Craig Inches <craig@craiginches.com> - 2017-03-13 14:20 +0100
| From | Craig Inches <Craig@craiginches.com> |
|---|---|
| Date | 2017-03-11 14:20 +0100 |
| Subject | [PATCH] staging: lustre fix constant comparision style issue in lu_object.h |
| Message-ID | <tjP69-3gI-15@gated-at.bofh.it> |
This patch resolves the "Comparisons should place the constant on
the right side of the test" found with checkpatch tool.
Signed-off-by: Craig Inches <Craig@craiginches.com>
---
drivers/staging/lustre/lustre/include/lu_object.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h
index 7a4f412..02be805 100644
--- a/drivers/staging/lustre/lustre/include/lu_object.h
+++ b/drivers/staging/lustre/lustre/include/lu_object.h
@@ -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.10.2
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-03-12 14:40 +0100 |
| Subject | Re: [PATCH] staging: lustre fix constant comparision style issue in lu_object.h |
| Message-ID | <tkbT4-294-19@gated-at.bofh.it> |
| In reply to | #1598316 |
On Sat, Mar 11, 2017 at 01:07:40PM +0000, Craig Inches wrote: > This patch resolves the "Comparisons should place the constant on > the right side of the test" found with checkpatch tool. Both are constants, I think checkpatch is the thing that is wrong here, don't you agree? thanks, greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-03-13 13:20 +0100 |
| Subject | Re: [PATCH] staging: lustre fix constant comparision style issue in lu_object.h |
| Message-ID | <tkx7c-nh-13@gated-at.bofh.it> |
| In reply to | #1598618 |
On Sun, Mar 12, 2017 at 02:37:22PM +0100, Greg KH wrote: > On Sat, Mar 11, 2017 at 01:07:40PM +0000, Craig Inches wrote: > > This patch resolves the "Comparisons should place the constant on > > the right side of the test" found with checkpatch tool. > > Both are constants, I think checkpatch is the thing that is wrong here, > don't you agree? Sort of constant-ish... The sizeof(*value) changes each time the macro is used. I feel like checkpatch is right. regads, dan carpenter
[toc] | [prev] | [next] | [standalone]
| From | Craig Inches <craig@craiginches.com> |
|---|---|
| Date | 2017-03-13 14:20 +0100 |
| Subject | Re: [PATCH] staging: lustre fix constant comparision style issue in lu_object.h |
| Message-ID | <tky3h-12m-31@gated-at.bofh.it> |
| In reply to | #1599270 |
On Mon, Mar 13, 2017 at 03:11:10PM +0300, Dan Carpenter wrote: > On Sun, Mar 12, 2017 at 02:37:22PM +0100, Greg KH wrote: > > On Sat, Mar 11, 2017 at 01:07:40PM +0000, Craig Inches wrote: > > > This patch resolves the "Comparisons should place the constant on > > > the right side of the test" found with checkpatch tool. > > > > Both are constants, I think checkpatch is the thing that is wrong here, > > don't you agree? > > Sort of constant-ish... The sizeof(*value) changes each time the macro > is used. I feel like checkpatch is right. > > regads, > dan carpenter > That was my take aswell.. PAGE_SIZE is constant for each boot, but sizeof could change. Happy to be lead by the more experienced here though. Cheers Craig
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web