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:   Wed, 6 Dec 2017 14:02:49 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, Michal Miroslaw <mirq-linux@...e.qmqm.pl>,
        Janos Laube <janos.dev@...il.com>,
        Paulius Zaleckas <paulius.zaleckas@...il.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Hans Ulli Kroll <ulli.kroll@...glemail.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Tobias Waldvogel <tobias.waldvogel@...il.com>
Subject: Re: [PATCH net-next 2/2 v6] net: ethernet: Add a driver for Gemini
 gigabit ethernet

On Mon, Dec 4, 2017 at 12:21 AM, David Miller <davem@...emloft.net> wrote:

>> +static irqreturn_t gemini_port_irq_thread(int irq, void *data)
>> +{
>> +     struct gemini_ethernet_port *port = data;
>> +     struct gemini_ethernet *geth = port->geth;
>> +     unsigned long irqmask = SWFQ_EMPTY_INT_BIT;
>> +     unsigned long flags;
>
> Always order local variables in reverse-christmas-tree format,
> which is longest to shortest line.

It's hard to do in cases like this where I use the variable
when defining another variable:

struct gemini_ethernet_port *port = netdev_priv(netdev);
void __iomem *status_reg = port->gmac_base + GMAC_STATUS;

But I understand the aesthetic, so I fix it as well as I can.

If you want me to even rewrite the above using more lines of code
to keep the aestetic (moving assignment out of the variable
definitions), tell me and I can fix that too, whatever you like.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ