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: <20230408175729.GA263118@sumitra.com>
Date:   Sat, 8 Apr 2023 10:57:29 -0700
From:   Sumitra Sharma <sumitraartsy@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Simon Horman <simon.horman@...igine.com>,
        Manish Chopra <manishc@...vell.com>,
        GR-Linux-NIC-Dev@...vell.com, Coiby Xu <coiby.xu@...il.com>,
        netdev@...r.kernel.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: qlge: Remove macro FILL_SEG

On Thu, Apr 06, 2023 at 06:33:31PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Apr 06, 2023 at 08:28:55AM -0700, Sumitra Sharma wrote:
> > On Thu, Apr 06, 2023 at 04:57:44PM +0200, Greg Kroah-Hartman wrote:
> > > On Thu, Apr 06, 2023 at 07:46:44AM -0700, Sumitra Sharma wrote:
> > > > On Wed, Apr 05, 2023 at 06:21:57PM +0200, Simon Horman wrote:
> > > > > On Wed, Apr 05, 2023 at 08:06:27AM -0700, Sumitra Sharma wrote:
> > > > > > Remove macro FILL_SEG to fix the checkpatch warning:
> > > > > > 
> > > > > > WARNING: Macros with flow control statements should be avoided
> > > > > > 
> > > > > > Macros with flow control statements must be avoided as they
> > > > > > break the flow of the calling function and make it harder to
> > > > > > test the code.
> > > > > > 
> > > > > > Replace all FILL_SEG() macro calls with:
> > > > > > 
> > > > > > err = err || qlge_fill_seg_(...);
> > > > > 
> > > > > Perhaps I'm missing the point here.
> > > > > But won't this lead to err always either being true or false (1 or 0).
> > > > > Rather than the current arrangement where err can be
> > > > > either 0 or a negative error value, such as -EINVAL.
> > > > >
> > > > 
> > > > Hi Simon
> > > > 
> > > > 
> > > > Thank you for the point you mentioned which I missed while working on this
> > > > patch. 
> > > > 
> > > > However, after thinking on it, I am still not able to get any fix to this
> > > > except that we can possibly implement the Ira's solution here which is:
> > > > 
> > > > https://lore.kernel.org/outreachy/64154d438f0c8_28ae5229421@iweiny-mobl.notmuch/
> > > > 
> > > > Although we have to then deal with 40 lines of ifs.
> > > 
> > > Which implies that the current solution is the best one, so I would
> > > recommend just leaving it as-is.
> > >
> > 
> > Hi greg
> > 
> > Before leaving it I would like to know your opinion on the solution Dan is offering.
> 
> I still think you should leave it as-is.
>

Okay, Thank you.


Regards

Sumitra Sharma
> thanks,
> 
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ