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: <20180511063724.GA8368@lst.de>
Date:   Fri, 11 May 2018 08:37:24 +0200
From:   Christoph Hellwig <hch@....de>
To:     Alexandru Gagniuc <mr.nuke.me@...il.com>
Cc:     linux-nvme@...ts.infradead.org, alex_gagniuc@...lteam.com,
        Austin.Bolen@...l.com, Shyam.Iyer@...l.com,
        Keith Busch <keith.busch@...el.com>, Jens Axboe <axboe@...com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvme-pci: Avoid use of goto in nvme_reset_work()

On Thu, May 10, 2018 at 11:46:33AM -0500, Alexandru Gagniuc wrote:
> This patch started as a challenge from Keith relating to code
> structuring with goto vs return. I think the final result improves
> readability on two counts:
> First, it clarifies the separation between work struct and nvme_dev.
> Second, it makes it clearer what error is being passed on:
> 'return -ENODEV' vs 'goto out', where 'result' happens to be -ENODEV

I think this actually makes the code much less readable.  The only real
improvement the code needs is to replace the "out" label name with
something more descriptive like "remove_controller".

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ