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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGt6v+NAmNNi8b0FbtvrvEfgnmOmait0J4O8WqadwO7bPXOqLA@mail.gmail.com>
Date:   Thu, 11 Feb 2021 16:29:18 +0300
From:   Fatih YILDIRIM <yildirim.fatih@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        gustavo@...eddedor.com
Subject: Re: [PATCH -next] staging: ks7010: Macros with complex values

Ok, thanks!

On Thu, Feb 11, 2021 at 3:52 PM Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Thu, Feb 11, 2021 at 03:23:24PM +0300, Fatih Yildirim wrote:
> > On Thu, Feb 11, 2021 at 12:10:44PM +0100, Greg KH wrote:
> > > On Thu, Feb 11, 2021 at 01:57:04PM +0300, Fatih YILDIRIM wrote:
> > > > On Thu, Feb 11, 2021 at 11:02:51AM +0100, Greg KH wrote:
> > > > > On Thu, Feb 11, 2021 at 12:22:39PM +0300, Fatih Yildirim wrote:
> > > > > > Fix for checkpatch.pl warning:
> > > > > > Macros with complex values should be enclosed in parentheses.
> > > > > >
> > > > > > Signed-off-by: Fatih Yildirim <yildirim.fatih@...il.com>
> > > > > > ---
> > > > > >  drivers/staging/ks7010/ks_hostif.h | 24 ++++++++++++------------
> > > > > >  1 file changed, 12 insertions(+), 12 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
> > > > > > index 39138191a556..c62a494ed6bb 100644
> > > > > > --- a/drivers/staging/ks7010/ks_hostif.h
> > > > > > +++ b/drivers/staging/ks7010/ks_hostif.h
> > > > > > @@ -498,20 +498,20 @@ struct hostif_mic_failure_request {
> > > > > >  #define TX_RATE_FIXED                5
> > > > > >
> > > > > >  /* 11b rate */
> > > > > > -#define TX_RATE_1M   (u8)(10 / 5)    /* 11b 11g basic rate */
> > > > > > -#define TX_RATE_2M   (u8)(20 / 5)    /* 11b 11g basic rate */
> > > > > > -#define TX_RATE_5M   (u8)(55 / 5)    /* 11g basic rate */
> > > > > > -#define TX_RATE_11M  (u8)(110 / 5)   /* 11g basic rate */
> > > > > > +#define TX_RATE_1M   ((u8)(10 / 5))  /* 11b 11g basic rate */
> > > > > > +#define TX_RATE_2M   ((u8)(20 / 5))  /* 11b 11g basic rate */
> > > > > > +#define TX_RATE_5M   ((u8)(55 / 5))  /* 11g basic rate */
> > > > > > +#define TX_RATE_11M  ((u8)(110 / 5)) /* 11g basic rate */
> > > > >
> > > > > But these are not "complex macros" that need an extra () added to them,
> > > > > right?
> > > > >
> > > > > Checkpatch is a hint, it's not a code parser and can not always know
> > > > > what is happening.  With your knowledge of C, does this look like
> > > > > something that needs to be "fixed"?
> > > > >
> > > > > thanks,
> > > > >
> > > > > greg k-h
> > > >
> > > > Hi Greg,
> > > >
> > > > Thanks for your reply.
> > > > Actually, I'm following the Eudyptula Challenge and I'm at task 10.
> > >
> > > First rule of that challenge is that you are not allowed to talk about
> > > it in public :)
> > >
> > > That being said, you didn't answer any of my questions above :(
> > >
> > > greg k-h
> >
> > Ohh no, missed the rule. Sorry for that, I feel rookie :)
> > You are right, they are not complex macros.
> > Besides that, type cast operator doesn't have the highest precedence.
> > So, I think we can use enclosing paranthesis.
>
> I don't think they are needed, see how these are used please.
>
> thanks,
>
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ