diff mbox series

[1/8] mtd: rawnand: qcom: Use the BIT() macro

Message ID 20230716144612.32132-2-miquel.raynal@bootlin.com (mailing list archive)
State New, archived
Headers show
Series mtd: rawnand: qcom: Misc fixes | expand

Commit Message

Miquel Raynal July 16, 2023, 2:46 p.m. UTC
Fix the following checkpatch warning:
    "CHECK: Prefer using the BIT macro"

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/mtd/nand/raw/qcom_nandc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Manivannan Sadhasivam July 17, 2023, 2:25 a.m. UTC | #1
On Sun, Jul 16, 2023 at 04:46:05PM +0200, Miquel Raynal wrote:
> Fix the following checkpatch warning:
>     "CHECK: Prefer using the BIT macro"
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Acked-by: Manivannan Sadhasivam <mani@kernel.org>

- Mani

> ---
>  drivers/mtd/nand/raw/qcom_nandc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
> index b1e69d634d4a..023c8b36426b 100644
> --- a/drivers/mtd/nand/raw/qcom_nandc.c
> +++ b/drivers/mtd/nand/raw/qcom_nandc.c
> @@ -123,8 +123,8 @@
>  /* NAND_ERASED_CW_DETECT_CFG bits */
>  #define	ERASED_CW_ECC_MASK		1
>  #define	AUTO_DETECT_RES			0
> -#define	MASK_ECC			(1 << ERASED_CW_ECC_MASK)
> -#define	RESET_ERASED_DET		(1 << AUTO_DETECT_RES)
> +#define	MASK_ECC			BIT(ERASED_CW_ECC_MASK)
> +#define	RESET_ERASED_DET		BIT(AUTO_DETECT_RES)
>  #define	ACTIVE_ERASED_DET		(0 << AUTO_DETECT_RES)
>  #define	CLR_ERASED_PAGE_DET		(RESET_ERASED_DET | MASK_ECC)
>  #define	SET_ERASED_PAGE_DET		(ACTIVE_ERASED_DET | MASK_ECC)
> -- 
> 2.34.1
>
Tudor Ambarus July 28, 2023, 2:16 a.m. UTC | #2
On 7/16/23 15:46, Miquel Raynal wrote:
> Fix the following checkpatch warning:
>     "CHECK: Prefer using the BIT macro"
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
> ---
>  drivers/mtd/nand/raw/qcom_nandc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
> index b1e69d634d4a..023c8b36426b 100644
> --- a/drivers/mtd/nand/raw/qcom_nandc.c
> +++ b/drivers/mtd/nand/raw/qcom_nandc.c
> @@ -123,8 +123,8 @@
>  /* NAND_ERASED_CW_DETECT_CFG bits */
>  #define	ERASED_CW_ECC_MASK		1
>  #define	AUTO_DETECT_RES			0
> -#define	MASK_ECC			(1 << ERASED_CW_ECC_MASK)
> -#define	RESET_ERASED_DET		(1 << AUTO_DETECT_RES)
> +#define	MASK_ECC			BIT(ERASED_CW_ECC_MASK)
> +#define	RESET_ERASED_DET		BIT(AUTO_DETECT_RES)
>  #define	ACTIVE_ERASED_DET		(0 << AUTO_DETECT_RES)
>  #define	CLR_ERASED_PAGE_DET		(RESET_ERASED_DET | MASK_ECC)
>  #define	SET_ERASED_PAGE_DET		(ACTIVE_ERASED_DET | MASK_ECC)
Miquel Raynal July 28, 2023, 12:35 p.m. UTC | #3
On Sun, 2023-07-16 at 14:46:05 UTC, Miquel Raynal wrote:
> Fix the following checkpatch warning:
>     "CHECK: Prefer using the BIT macro"
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Acked-by: Manivannan Sadhasivam <mani@kernel.org>
> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.

Miquel
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
index b1e69d634d4a..023c8b36426b 100644
--- a/drivers/mtd/nand/raw/qcom_nandc.c
+++ b/drivers/mtd/nand/raw/qcom_nandc.c
@@ -123,8 +123,8 @@ 
 /* NAND_ERASED_CW_DETECT_CFG bits */
 #define	ERASED_CW_ECC_MASK		1
 #define	AUTO_DETECT_RES			0
-#define	MASK_ECC			(1 << ERASED_CW_ECC_MASK)
-#define	RESET_ERASED_DET		(1 << AUTO_DETECT_RES)
+#define	MASK_ECC			BIT(ERASED_CW_ECC_MASK)
+#define	RESET_ERASED_DET		BIT(AUTO_DETECT_RES)
 #define	ACTIVE_ERASED_DET		(0 << AUTO_DETECT_RES)
 #define	CLR_ERASED_PAGE_DET		(RESET_ERASED_DET | MASK_ECC)
 #define	SET_ERASED_PAGE_DET		(ACTIVE_ERASED_DET | MASK_ECC)