Re: [PATCH] Use BIT macro instead of (1 << HSDMA_GLO_BT_SHIFT)

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

 



On Fri, Sep 3, 2021 at 10:10 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> The subject is wrong.  It doesn't have the subsystem prefix.
>
> On Thu, Sep 02, 2021 at 01:52:15PM +0200, Krish Jain wrote:
> > This patch replaces (1 << HSDMA_GLO_BT_SHIFT) with the BIT(x) macro, as suggested by checkpatch.pl, for the file drivers/staging/mt7621-dma/hsdma-mt7621.c .'
>
> Run checkpatch on your patches.

Noted.

> >
> > Signed-off-by: Krish Jain <krishjain02939@xxxxxxxxx>
> >
> > ---
> >  drivers/staging/mt7621-dma/hsdma-mt7621.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/mt7621-dma/hsdma-mt7621.c b/drivers/staging/mt7621-dma/hsdma-mt7621.c
> > index 89b72a802800..a99cec876110 100644
> > --- a/drivers/staging/mt7621-dma/hsdma-mt7621.c
> > +++ b/drivers/staging/mt7621-dma/hsdma-mt7621.c
> > @@ -72,7 +72,7 @@
> >  #define HSDMA_GLO_TX_DMA             BIT(0)
> >
> >  #define HSDMA_BT_SIZE_16BYTES                (0 << HSDMA_GLO_BT_SHIFT)
> > -#define HSDMA_BT_SIZE_32BYTES                (1 << HSDMA_GLO_BT_SHIFT)
> > +#define HSDMA_BT_SIZE_32BYTES                BIT(HSDMA_GLO_BT_SHIFT)
> >  #define HSDMA_BT_SIZE_64BYTES                (2 << HSDMA_GLO_BT_SHIFT)
> >  #define HSDMA_BT_SIZE_128BYTES               (3 << HSDMA_GLO_BT_SHIFT)
>
> No.  This block doesn't make sense now because one line is weird.
> Just leave it.  Checkpatch is wrong here because it only analyzes one
> line at a time.


How can I fix this then?


> >
> > @@ -164,8 +164,7 @@ struct mtk_hsdam_engine {
> >
> >  static inline struct mtk_hsdam_engine *mtk_hsdma_chan_get_dev(struct mtk_hsdma_chan *chan)
> >  {
> > -     return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine,
> > -                     ddev);
> > +     return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, ddev);
>
> This is fine but it needs to be in a separate commit.
>
> >  }


Ok, this is already being worked on as a separate commit.


> regards,
> dan carpenter
>

Thanks.

Best Regards,

Krish




[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