Re: [PATCH] nvme-pci: Avoid use of goto in nvme_reset_work()

2018-05-10 Thread Christoph Hellwig
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.

Re: [PATCH] nvme-pci: Avoid use of goto in nvme_reset_work()

2018-05-10 Thread Alex G.
On 05/10/2018 12:00 PM, Keith Busch wrote: > 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 clarifi

Re: [PATCH] nvme-pci: Avoid use of goto in nvme_reset_work()

2018-05-10 Thread Keith Busch
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.

[PATCH] nvme-pci: Avoid use of goto in nvme_reset_work()

2018-05-10 Thread Alexandru Gagniuc
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