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]
Message-ID: <0600e4f9-dd53-158c-556b-8a87dfc928e6@users.sourceforge.net>
Date:   Sun, 29 Oct 2017 13:03:41 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        linux-usb@...r.kernel.org
Cc:     Bjørn Mork <bjorn@...k.no>,
        "David S. Miller" <davem@...emloft.net>,
        Greg Ungerer <gerg@...ux-m68k.org>,
        Liu Junliang <liujunliang_ljl@....com>,
        Philippe Reynes <tremyfr@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] sr9800: Use common error handling code in
 sr9800_phy_powerup()

>> @@ -700,10 +700,9 @@ static int sr9800_phy_powerup(struct usbnet *dev)
>>
>>         /* set the embedded Ethernet PHY in power-up state */
>>         ret = sr_sw_reset(dev, SR_SWRESET_IPRL);
>> -       if (ret < 0) {
>> -               netdev_err(dev->net, "Failed to reset PHY: %d\n", ret);
>> -               return ret;
>> -       }
>> +       if (ret < 0)
>> +               goto report_reset_failure;
> 
> So now I have to look below to see what error handling it does...

Yes. - Can this be an usual consequence if you apply information from
the section “7) Centralized exiting of functions” in the document
“coding-style.rst” a bit more?



> Hence I prefer the original version, which had _less_ lines of code...

My update suggestion is only one line “bigger” in this case, isn't it?

I propose an other source code layout so that a bit smaller executable
object code could be achieved.
Do find such a software design direction feasible?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ