> -----Original Message-----
> From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi-
> ow...@vger.kernel.org] 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 <dgilb...@interlog.com>

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 <elli...@hp.com>
Tested-by: Robert Elliott <elli...@hp.com>

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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to