diff mbox

[GIT,PULL] nvme fixes for Linux 4.15

Message ID 1dcadbce-8a97-9578-686a-c43bd8dc06fc@kernel.dk (mailing list archive)
State New, archived
Headers show

Commit Message

Jens Axboe Nov. 24, 2017, 5:04 a.m. UTC
On 11/23/2017 09:54 PM, Jens Axboe wrote:
> On 11/23/2017 07:44 AM, Christoph Hellwig wrote:
>> Sagi Grimberg (3):
>>       nvme-fc: check if queue is ready in queue_rq
>>       nvme-loop: check if queue is ready in queue_rq
> 
> The nvme-loop part looks fine, but why is the nvme-fc part using:
> 
> enum nvme_fc_queue_flags {                                                     
>         NVME_FC_Q_CONNECTED = (1 << 0),                                         
> +       NVME_FC_Q_LIVE = (1 << 1),                                              
> }; 
> 
> for flags that are used with set_bit() and friends? That's just
> misleading, should be 0, 1, etc, not a shift.
> 
> The rest looks pretty straight forward, but the above is an eye sore.

Comments

Christoph Hellwig Nov. 24, 2017, 8:32 a.m. UTC | #1
On Thu, Nov 23, 2017 at 10:04:55PM -0700, Jens Axboe wrote:
> > +       NVME_FC_Q_LIVE = (1 << 1),                                              
> > }; 
> > 
> > for flags that are used with set_bit() and friends? That's just
> > misleading, should be 0, 1, etc, not a shift.
> > 
> > The rest looks pretty straight forward, but the above is an eye sore.

Yes, it is misleading, but so far harmless.

Your fixup looks good to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Jens Axboe Nov. 24, 2017, 5:15 p.m. UTC | #2
On 11/24/2017 01:32 AM, Christoph Hellwig wrote:
> On Thu, Nov 23, 2017 at 10:04:55PM -0700, Jens Axboe wrote:
>>> +       NVME_FC_Q_LIVE = (1 << 1),                                              
>>> }; 
>>>
>>> for flags that are used with set_bit() and friends? That's just
>>> misleading, should be 0, 1, etc, not a shift.
>>>
>>> The rest looks pretty straight forward, but the above is an eye sore.
> 
> Yes, it is misleading, but so far harmless.

Yeah, but it just takes a few more bits...

> Your fixup looks good to me:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks, I've added it.
diff mbox

Patch

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index e0577bf33f45..0a8af4daef89 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -31,8 +31,8 @@ 
 
 
 enum nvme_fc_queue_flags {
-	NVME_FC_Q_CONNECTED = (1 << 0),
-	NVME_FC_Q_LIVE = (1 << 1),
+	NVME_FC_Q_CONNECTED = 0,
+	NVME_FC_Q_LIVE,
 };
 
 #define NVMEFC_QUEUE_DELAY	3		/* ms units */