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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 20 Sep 2018 15:18:08 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     Doug Anderson <dianders@...omium.org>
Cc:     Wolfram Sang <wsa@...-dreams.de>,
        LKML <linux-kernel@...r.kernel.org>, linux-i2c@...r.kernel.org,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        Karthikeyan Ramasubramanian <kramasub@...eaurora.org>,
        Sagar Dharia <sdharia@...eaurora.org>,
        Girish Mahadevan <girishm@...eaurora.org>
Subject: Re: [PATCH v2 2/2] i2c: i2c-qcom-geni: Simplify tx/rx functions

Quoting Doug Anderson (2018-09-20 13:22:37)
> Hi,
> On Thu, Sep 20, 2018 at 11:03 AM Stephen Boyd <swboyd@...omium.org> wrote:
> >
> > We never really look at the 'ret' local variable in these functions, so
> > let's remove it to make way for shorter and simpler code. Furthermore,
> > we can shorten some lines by adding two local variables for the SE and
> > the message length so that everything fits in 80 columns. And kernel
> > style is to leave the return statement by itself, detached from the rest
> > of the function.
> >
> > Cc: Karthikeyan Ramasubramanian <kramasub@...eaurora.org>
> > Cc: Sagar Dharia <sdharia@...eaurora.org>
> > Cc: Girish Mahadevan <girishm@...eaurora.org>
> > Signed-off-by: Stephen Boyd <swboyd@...omium.org>
> > ---
> >  drivers/i2c/busses/i2c-qcom-geni.c | 54 ++++++++++++++----------------
> >  1 file changed, 25 insertions(+), 29 deletions(-)
> 
> I didn't hate the old code, but you're right that this looks a little better.
> 
> Reviewed-by: Douglas Anderson <dianders@...omium.org>
> 
> NOTE: now that you're cleaning it up, I'd personally go even further
> and totally get rid of the "mode" local variable.  Basically, just:
> 
> dma_buf = i2c_get_dma_safe_msg_buf(msg, 32);
> if (dma_buf)
>   geni_se_select_mode(se, GENI_SE_DMA);
> else
>   geni_se_select_mode(se, GENI_SE_FIFO);

Sure that's fine. I'll resend this one patch with that squashed in.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ