Re: [PATCH] staging: rts5208: Replace the occurrences of (1<<x) by BIT(x)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 17, 2023 at 07:02:33AM +0300, Dan Carpenter wrote:
> On Mon, Oct 16, 2023 at 01:11:54PM -0700, Nandha Kumar Singaram wrote:
> > Adhere to linux coding style. Reported by checkpatch.pl:
> > CHECK: Prefer using the BIT macro
> > 
> > Signed-off-by: Nandha Kumar Singaram <nandhakumar.singaram@xxxxxxxxx>
> > ---
> >  drivers/staging/rts5208/rtsx_card.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/rts5208/rtsx_card.h b/drivers/staging/rts5208/rtsx_card.h
> > index 39727371cd7a..9d2504fddb13 100644
> > --- a/drivers/staging/rts5208/rtsx_card.h
> > +++ b/drivers/staging/rts5208/rtsx_card.h
> > @@ -338,7 +338,7 @@
> >  #define DMA_DIR_FROM_CARD		0x02
> >  #define DMA_EN				0x01
> >  #define DMA_128				(0 << 4)
> > -#define DMA_256				(1 << 4)
> > +#define DMA_256				BIT(4)
> >  #define DMA_512				(2 << 4)
> 
> No.  :P.  Look at the lines around it.  Now it's the odd duckling.
> 
> >  #define DMA_1024			(3 << 4)
> >  #define DMA_PACK_SIZE_MASK		0x30
> > @@ -542,7 +542,7 @@
> >  
> >  #define BLINK_EN			0x08
> >  #define LED_GPIO0			(0 << 4)
> > -#define LED_GPIO1			(1 << 4)
> > +#define LED_GPIO1			BIT(4)
> >  #define LED_GPIO2			(2 << 4)
> > 
> 
> Same.
> 
> regards,
> dan carpenter
>

Yeah, I understand now. Thanks for the review dan.

Regards,
Nandha Kumar Singaram




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux