RE: [PATCH] cleanup switch in scsi_adjust_queue_depth()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: linux-scsi-owner@xxxxxxxxxxxxxxx [mailto:linux-scsi-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Douglas Gilbert
> Sent: Tuesday, 24 June, 2014 6:24 PM
> To: SCSI development list; Christoph Hellwig; James Bottomley
> Subject: [PATCH] cleanup switch in scsi_adjust_queue_depth()
> 
> While checking what scsi_adjust_queue_depth() did I
> thought its switch statement could be clearer.
> 
> ChangeLog:
>    - remove redundant assignment (to sdev->queue_depth)
>    - re-order cases (thus removing the fall-through)
> 
> Signed-off-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>

I've run tests with tagged set to both 0 and MSG_SIMPLE_TAG 
and they both work like before, so you may add:
Reviewed-by: Robert Elliott <elliott@xxxxxx>
Tested-by: Robert Elliott <elliott@xxxxxx>

I did notice that include/scsi/scsi_tcq.h scsi_set_tag_type() 
is another function with a switch statement with fallthroughs 
setting these variables.  It doesn't have default: before 0: 
or involve a print, so reordering is not as necessary.

However, that function doesn't clear ordered_tags in the 
MSG_SIMPLE_TAG case, which seems problematic if the device
is ever changed from ordered to simple.  You might want to 
address that in this patch too.


---
Rob Elliott    HP Server Storage



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux