scsi: drop reason argument from ->change_queue_depth
Drop the now unused reason argument from the ->change_queue_depth method. Also add a return value to scsi_adjust_queue_depth, and rename it to scsi_change_queue_depth now that it can be used as the default ->change_queue_depth implementation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
This commit is contained in:
@@ -285,23 +285,15 @@ static void pmcraid_slave_destroy(struct scsi_device *scsi_dev)
|
||||
* pmcraid_change_queue_depth - Change the device's queue depth
|
||||
* @scsi_dev: scsi device struct
|
||||
* @depth: depth to set
|
||||
* @reason: calling context
|
||||
*
|
||||
* Return value
|
||||
* actual depth set
|
||||
*/
|
||||
static int pmcraid_change_queue_depth(struct scsi_device *scsi_dev, int depth,
|
||||
int reason)
|
||||
static int pmcraid_change_queue_depth(struct scsi_device *scsi_dev, int depth)
|
||||
{
|
||||
if (reason != SCSI_QDEPTH_DEFAULT)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (depth > PMCRAID_MAX_CMD_PER_LUN)
|
||||
depth = PMCRAID_MAX_CMD_PER_LUN;
|
||||
|
||||
scsi_adjust_queue_depth(scsi_dev, depth);
|
||||
|
||||
return scsi_dev->queue_depth;
|
||||
return scsi_change_queue_depth(scsi_dev, depth);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user