Skip to contentSkip to conversation

staging: lustre: Fixed the parenthesis

PATCH In review Shalin Mehta 4 participants 6 messages Feb 15, 2016 – Feb 19, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: Fixed the parenthesis

The parentehsis are fixed in the macro for the ldlm lock to set and clear the flags.

---
 drivers/staging/lustre/lustre/include/lustre_dlm_flags.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h +2 -2
index 0d3ed87..4f9e9ad 100644
@@ -365,10 +365,10 @@
 #define LDLM_TEST_FLAG(_l, _b)        (((_l)->l_flags & (_b)) != 0)
 
 /** set a ldlm_lock flag bit */
-#define LDLM_SET_FLAG(_l, _b)         (((_l)->l_flags |= (_b))
+#define LDLM_SET_FLAG(_l, _b)         ((_l)->l_flags |= (_b))
 
 /** clear a ldlm_lock flag bit */
-#define LDLM_CLEAR_FLAG(_l, _b)       (((_l)->l_flags &= ~(_b))
+#define LDLM_CLEAR_FLAG(_l, _b)       ((_l)->l_flags &= ~(_b))
 
 /** Mask of flags inherited from parent lock when doing intents. */
 #define LDLM_INHERIT_FLAGS            LDLM_FL_INHERIT_MASK
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 2 lines · Shalin Mehta

The parentehsis are fixed in the macro for the ldlm lock to set and clear the flags.

"fixed" in what way? Did you test-build this patch? Also, you mispelled a word here...

thanks,

greg k-h

#2 lore raw
Quoted 6 lines · Greg KH
Quoted 2 lines · Shalin Mehta

The parentehsis are fixed in the macro for the ldlm lock to set and clear the flags.

"fixed" in what way? Did you test-build this patch? Also, you mispelled a word here?

The fix in the patch is to make sure number of parenthesis matches, as is it appears there's one more opening one than the closing.

The original patch that add this had an error somehow, but back then none of the users were later introduced, so the bug is "hidden" until first user actually appears.

Compiles work with or without this fix as the result (I also just checked just to be sure).

Acked-by on v1 1/1
#3 lore raw
In reply to Shalin Mehta
Quoted 15 lines · Shalin Mehta

The parentehsis are fixed in the macro for the ldlm lock to set and clear the flags.

---
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h +0 -0
index 0d3ed87..4f9e9ad 100644
@@ -365,10 +365,10 @@
 #define LDLM_TEST_FLAG(_l, _b)        (((_l)->l_flags & (_b)) != 0)
 

drivers/staging/lustre/lustre/include/lustre_dlm_flags.h line 374

Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h +2 -2
 /** set a ldlm_lock flag bit */
-#define LDLM_SET_FLAG(_l, _b)         (((_l)->l_flags |= (_b))
+#define LDLM_SET_FLAG(_l, _b)         ((_l)->l_flags |= (_b))
 
 /** clear a ldlm_lock flag bit */
-#define LDLM_CLEAR_FLAG(_l, _b)       (((_l)->l_flags &= ~(_b))
+#define LDLM_CLEAR_FLAG(_l, _b)       ((_l)->l_flags &= ~(_b))
 
 /** Mask of flags inherited from parent lock when doing intents. */
 #define LDLM_INHERIT_FLAGS            LDLM_FL_INHERIT_MASK
#4 lore raw

Hello,

Should I send this patch again due the spelling mistake in the patch description?

Thanks,
Shalin

Quoted 31 lines · Oleg
Quoted 15 lines · Shalin Mehta

The parentehsis are fixed in the macro for the ldlm lock to set and clear the flags.

---
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h +0 -0
index 0d3ed87..4f9e9ad 100644
@@ -365,10 +365,10 @@
 #define LDLM_TEST_FLAG(_l, _b)        (((_l)->l_flags & (_b)) != 0)
 

drivers/staging/lustre/lustre/include/lustre_dlm_flags.h line 374

Quoted 10 lines
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h +2 -2
 /** set a ldlm_lock flag bit */
-#define LDLM_SET_FLAG(_l, _b)         (((_l)->l_flags |= (_b))
+#define LDLM_SET_FLAG(_l, _b)         ((_l)->l_flags |= (_b))
 
 /** clear a ldlm_lock flag bit */
-#define LDLM_CLEAR_FLAG(_l, _b)       (((_l)->l_flags &= ~(_b))
+#define LDLM_CLEAR_FLAG(_l, _b)       ((_l)->l_flags &= ~(_b))
 
 /** Mask of flags inherited from parent lock when doing intents. */
 #define LDLM_INHERIT_FLAGS            LDLM_FL_INHERIT_MASK
#5 lore raw
Quoted 5 lines · shalin mehta

Hello,

Should I send this patch again due the spelling mistake in the patch description?

Yes. And put what Oleg Drokin said about it worked because there were no users in the changelog.

regards,
dan carpenter