lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+imup-scsOiVghh9UyO=3SXFqj614dqJ-FjppF7hzzgz_D+Qw@mail.gmail.com>
Date:   Tue, 3 Nov 2020 10:10:39 +0530
From:   siddhant gupta <siddhantgupta416@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     matthias.bgg@...il.com, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org,
        Himadri Pandya <himadrispandya@...il.com>,
        Mamta Shukla <mamtashukla555@...il.com>
Subject: Re: [PATCH] staging: mt7621-dma: Prefer Using BIT Macro instead of
 left shifting on 1.

On Tue, 3 Nov 2020 at 01:10, Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Tue, Nov 03, 2020 at 01:04:02AM +0530, siddhant gupta(siddhant1223) wrote:
> >
> > Replace left shifting on 1 by a BIT macro to fix checkpatch warning.
> >
> > Signed-off-by: Siddhant Gupta <siddhantgupta416@...il.com>
> >
> > ---
> >  drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/mt7621-dma/mtk-hsdma.c b/drivers/staging/mt7621-dma/mtk-hsdma.c
> > index 354536783e1c..a9e1a1b14035 100644
> > --- a/drivers/staging/mt7621-dma/mtk-hsdma.c
> > +++ b/drivers/staging/mt7621-dma/mtk-hsdma.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)
>
> In looking at the code, does this change really make sense?
>
> (hint, I don't think so...)

Following Checkpatch, I thought it might be good to do as checkpatch said,
but the code looks better and more readable without the change. This
is my first patch and also a
lesson that i should not fix every checkpatch warnings. I'll pick
something better next time
Thanks for your comment
.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ