2020-03-27 16:59:04

by Oscar Carter

[permalink] [raw]
Subject: [PATCH] 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")
Signed-off-by: Oscar Carter <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
---
drivers/staging/vt6656/mac.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h
index c532b27de37f..b01d9ee8677e 100644
--- a/drivers/staging/vt6656/mac.h
+++ b/drivers/staging/vt6656/mac.h
@@ -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


2020-03-30 11:46:39

by Quentin Deslandes

[permalink] [raw]
Subject: Re: [PATCH] staging: vt6656: Define EnCFG_BBType_MASK as OR between previous defines

On 03/27/20 17:58:02, Oscar Carter wrote:
> 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")
> Signed-off-by: Oscar Carter <[email protected]>
> Reviewed-by: Dan Carpenter <[email protected]>
> ---
> drivers/staging/vt6656/mac.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h
> index c532b27de37f..b01d9ee8677e 100644
> --- a/drivers/staging/vt6656/mac.h
> +++ b/drivers/staging/vt6656/mac.h
> @@ -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: Quentin Deslandes <[email protected]>

Thanks,
Quentin

2020-03-30 12:29:35

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: vt6656: Define EnCFG_BBType_MASK as OR between previous defines

On Fri, Mar 27, 2020 at 05:58:02PM +0100, Oscar Carter wrote:
> 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")
> Signed-off-by: Oscar Carter <[email protected]>
> Reviewed-by: Dan Carpenter <[email protected]>
> ---
> drivers/staging/vt6656/mac.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h
> index c532b27de37f..b01d9ee8677e 100644
> --- a/drivers/staging/vt6656/mac.h
> +++ b/drivers/staging/vt6656/mac.h
> @@ -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

2020-03-31 10:34:20

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH] staging: vt6656: Define EnCFG_BBType_MASK as OR between previous defines

Thanks!

Reviewed-by: Dan Carpenter <[email protected]>

regards,
dan carpenter

2020-04-01 15:53:09

by Oscar Carter

[permalink] [raw]
Subject: Re: [PATCH] staging: vt6656: Define EnCFG_BBType_MASK as OR between previous defines

On Mon, Mar 30, 2020 at 02:27:14PM +0200, Greg Kroah-Hartman wrote:
> On Fri, Mar 27, 2020 at 05:58:02PM +0100, Oscar Carter wrote:
> > 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")
> > Signed-off-by: Oscar Carter <[email protected]>
> > Reviewed-by: Dan Carpenter <[email protected]>
> > ---
> > drivers/staging/vt6656/mac.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h
> > index c532b27de37f..b01d9ee8677e 100644
> > --- a/drivers/staging/vt6656/mac.h
> > +++ b/drivers/staging/vt6656/mac.h
> > @@ -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.

> 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.

> thanks.
>
> greg k-h

Thanks,
oscar carter