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]
Date:   Fri, 8 Mar 2019 10:58:43 -0800
From:   Andrey Smirnov <andrew.smirnov@...il.com>
To:     Christoph Hellwig <hch@....de>
Cc:     linux-nvme@...ts.infradead.org,
        Keith Busch <keith.busch@...el.com>, Jens Axboe <axboe@...com>,
        Sagi Grimberg <sagi@...mberg.me>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nvme-core: Share code between nvme_wait_ready() and nvme_shutdown_ctrl()

On Fri, Mar 8, 2019 at 5:23 AM Christoph Hellwig <hch@....de> wrote:
>
> On Wed, Feb 06, 2019 at 04:13:12PM -0800, Andrey Smirnov wrote:
> > Code polling NVME_CSTS_SHST_CMPLT in nvme_shutdown_ctrl() is very
> > similar to polling loop in nvme_wait_ready(). Move shared polling loop
> > code into __nvme_wait_ready() and re-implement both
> > nvme_shutdown_ctrl() and nvme_wait_ready() on top of it to avoid code
> > repetition.
>
> Is there any deeper reason why we would want this?  It only saves
> 6 lines of code, but makes the functions much harder to read.

No, there's no deeper reason.

Thanks,
Andrey Smirnov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ