Skip to contentSkip to conversation

staging: vt6656: Define EnCFG_BBType_MASK as OR between previous defines

PATCH Superseded Oscar Carter 4 participants 5 messages Mar 27, 2020 – Apr 1, 2020 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vt6656: Define EnCFG_BBType_MASK as OR between previous defines

Define the EnCFG_BBType_MASK bit as an OR operation between two previous defines instead of using the OR between two new BIT macros. Thus, the code is more clear.

Fixes a74081b44291 ("staging: vt6656: Use BIT() macro instead of hex value")
---
 drivers/staging/vt6656/mac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6656/mac.h +1 -1
index c532b27de37f..b01d9ee8677e 100644
@@ -177,7 +177,7 @@
 #define EnCFG_BBType_a		0x00
 #define EnCFG_BBType_b		BIT(0)
 #define EnCFG_BBType_g		BIT(1)
-#define EnCFG_BBType_MASK	(BIT(0) | BIT(1))
+#define EnCFG_BBType_MASK	(EnCFG_BBType_b | EnCFG_BBType_g)
 #define EnCFG_ProtectMd		BIT(5)
 
 /* Bits in the EnhanceCFG_1 register */

--
2.20.1

Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Oscar Carter

Define the EnCFG_BBType_MASK bit as an OR operation between two previous defines instead of using the OR between two new BIT macros. Thus, the code is more clear.

Fixes a74081b44291 ("staging: vt6656: Use BIT() macro instead of hex value")
---
 drivers/staging/vt6656/mac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6656/mac.h +1 -2
index c532b27de37f..b01d9ee8677e 100644
@@ -177,7 +177,7 @@
 #define EnCFG_BBType_a		0x00
 #define EnCFG_BBType_b		BIT(0)
 #define EnCFG_BBType_g		BIT(1)
-#define EnCFG_BBType_MASK	(BIT(0) | BIT(1))
+#define EnCFG_BBType_MASK	(EnCFG_BBType_b | EnCFG_BBType_g)
 #define EnCFG_ProtectMd		BIT(5)
 
 /* Bits in the EnhanceCFG_1 register */
--
Quoted 2 lines

2.20.1

Thanks,
Quentin

#2 lore raw
In reply to Oscar Carter
Quoted 16 lines · Oscar Carter

Define the EnCFG_BBType_MASK bit as an OR operation between two previous defines instead of using the OR between two new BIT macros. Thus, the code is more clear.

Fixes a74081b44291 ("staging: vt6656: Use BIT() macro instead of hex value")
---
 drivers/staging/vt6656/mac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6656/mac.h +0 -0
index c532b27de37f..b01d9ee8677e 100644

drivers/staging/vt6656/mac.h line 180

Quoted 5 lines
drivers/staging/vt6656/mac.h +1 -1
@@ -177,7 +177,7 @@
 #define EnCFG_BBType_a		0x00
 #define EnCFG_BBType_b		BIT(0)
 #define EnCFG_BBType_g		BIT(1)
-#define EnCFG_BBType_MASK	(BIT(0) | BIT(1))
+#define EnCFG_BBType_MASK	(EnCFG_BBType_b | EnCFG_BBType_g)

This does not "fix" anything, like your "Fixes:" tag implies. It just cleans up the code some more. Only use Fixes: if it actually fixes a problem introduced by a previous patch.

Can you remove that line and resend?

thanks.

greg k-h

#3 lore raw
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Oscar Carter

Define the EnCFG_BBType_MASK bit as an OR operation between two previous defines instead of using the OR between two new BIT macros. Thus, the code is more clear.

Fixes a74081b44291 ("staging: vt6656: Use BIT() macro instead of hex value")
---
 drivers/staging/vt6656/mac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines

drivers/staging/vt6656/mac.h line 180

Quoted 10 lines
drivers/staging/vt6656/mac.h +1 -1
index c532b27de37f..b01d9ee8677e 100644
@@ -177,7 +177,7 @@
 #define EnCFG_BBType_a		0x00
 #define EnCFG_BBType_b		BIT(0)
 #define EnCFG_BBType_g		BIT(1)
-#define EnCFG_BBType_MASK	(BIT(0) | BIT(1))
+#define EnCFG_BBType_MASK	(EnCFG_BBType_b | EnCFG_BBType_g)

This does not "fix" anything, like your "Fixes:" tag implies. It just cleans up the code some more. Only use Fixes: if it actually fixes a problem introduced by a previous patch.

Ok, thanks for the explanation.

Quoted 2 lines

Can you remove that line and resend?

Yes, I will remove that line, I will create a new version of this patch and I will resend it.

Quoted 3 lines

thanks.

greg k-h

Thanks,
oscar carter