lkml.org 
[lkml]   [2019]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@lst.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

\
 
 \ /
  Last update: 2019-03-08 19:59    [W:0.051 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site