diff mbox series

scsi: kill useless scsi_use_blk_mq

Message ID 20190604114416.26924-1-yanaijie@huawei.com (mailing list archive)
State Superseded
Headers show
Series scsi: kill useless scsi_use_blk_mq | expand

Commit Message

Jason Yan June 4, 2019, 11:44 a.m. UTC
The legacy path is gone and we do not have to choose mq or not. The
module parameter scsi_use_blk_mq is useless now.

Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/scsi.c       | 4 ----
 drivers/scsi/scsi_priv.h  | 1 -
 drivers/scsi/scsi_sysfs.c | 8 --------
 3 files changed, 13 deletions(-)

Comments

John Garry June 4, 2019, 12:41 p.m. UTC | #1
On 04/06/2019 12:44, Jason Yan wrote:
> The legacy path is gone and we do not have to choose mq or not. The
> module parameter scsi_use_blk_mq is useless now.
>

Can you look to also remove scsi_host_template.force_blk_mq? It only 
looks to be set (in virtio_scsi.c) and not read.

cheers

> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  drivers/scsi/scsi.c       | 4 ----
>  drivers/scsi/scsi_priv.h  | 1 -
>  drivers/scsi/scsi_sysfs.c | 8 --------
>  3 files changed, 13 deletions(-)
>
> diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
> index 653d5ea6c5d9..7049aabb86e0 100644
> --- a/drivers/scsi/scsi.c
> +++ b/drivers/scsi/scsi.c
> @@ -765,10 +765,6 @@ MODULE_LICENSE("GPL");
>  module_param(scsi_logging_level, int, S_IRUGO|S_IWUSR);
>  MODULE_PARM_DESC(scsi_logging_level, "a bit mask of logging levels");
>
> -/* This should go away in the future, it doesn't do anything anymore */
> -bool scsi_use_blk_mq = true;
> -module_param_named(use_blk_mq, scsi_use_blk_mq, bool, S_IWUSR | S_IRUGO);
> -
>  static int __init init_scsi(void)
>  {
>  	int error;
> diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
> index 5f21547b2ad2..a4f0741524d8 100644
> --- a/drivers/scsi/scsi_priv.h
> +++ b/drivers/scsi/scsi_priv.h
> @@ -29,7 +29,6 @@ extern int scsi_init_hosts(void);
>  extern void scsi_exit_hosts(void);
>
>  /* scsi.c */
> -extern bool scsi_use_blk_mq;
>  int scsi_init_sense_cache(struct Scsi_Host *shost);
>  void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd);
>  #ifdef CONFIG_SCSI_LOGGING
> diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
> index dbb206c90ecf..403832ee17e0 100644
> --- a/drivers/scsi/scsi_sysfs.c
> +++ b/drivers/scsi/scsi_sysfs.c
> @@ -386,15 +386,7 @@ show_host_busy(struct device *dev, struct device_attribute *attr, char *buf)
>  }
>  static DEVICE_ATTR(host_busy, S_IRUGO, show_host_busy, NULL);
>
> -static ssize_t
> -show_use_blk_mq(struct device *dev, struct device_attribute *attr, char *buf)
> -{
> -	return sprintf(buf, "1\n");
> -}
> -static DEVICE_ATTR(use_blk_mq, S_IRUGO, show_use_blk_mq, NULL);
> -
>  static struct attribute *scsi_sysfs_shost_attrs[] = {
> -	&dev_attr_use_blk_mq.attr,
>  	&dev_attr_unique_id.attr,
>  	&dev_attr_host_busy.attr,
>  	&dev_attr_cmd_per_lun.attr,
>
Jason Yan June 4, 2019, 1:08 p.m. UTC | #2
On 2019/6/4 20:41, John Garry wrote:
> On 04/06/2019 12:44, Jason Yan wrote:
>> The legacy path is gone and we do not have to choose mq or not. The
>> module parameter scsi_use_blk_mq is useless now.
>>
> 
> Can you look to also remove scsi_host_template.force_blk_mq? It only 
> looks to be set (in virtio_scsi.c) and not read.
> 

OK, I will check that. Thanks.

> cheers
> 
>> Signed-off-by: Jason Yan <yanaijie@huawei.com>
>> ---
>>  drivers/scsi/scsi.c       | 4 ----
>>  drivers/scsi/scsi_priv.h  | 1 -
>>  drivers/scsi/scsi_sysfs.c | 8 --------
>>  3 files changed, 13 deletions(-)
>>
>> diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
>> index 653d5ea6c5d9..7049aabb86e0 100644
>> --- a/drivers/scsi/scsi.c
>> +++ b/drivers/scsi/scsi.c
>> @@ -765,10 +765,6 @@ MODULE_LICENSE("GPL");
>>  module_param(scsi_logging_level, int, S_IRUGO|S_IWUSR);
>>  MODULE_PARM_DESC(scsi_logging_level, "a bit mask of logging levels");
>>
>> -/* This should go away in the future, it doesn't do anything anymore */
>> -bool scsi_use_blk_mq = true;
>> -module_param_named(use_blk_mq, scsi_use_blk_mq, bool, S_IWUSR | 
>> S_IRUGO);
>> -
>>  static int __init init_scsi(void)
>>  {
>>      int error;
>> diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
>> index 5f21547b2ad2..a4f0741524d8 100644
>> --- a/drivers/scsi/scsi_priv.h
>> +++ b/drivers/scsi/scsi_priv.h
>> @@ -29,7 +29,6 @@ extern int scsi_init_hosts(void);
>>  extern void scsi_exit_hosts(void);
>>
>>  /* scsi.c */
>> -extern bool scsi_use_blk_mq;
>>  int scsi_init_sense_cache(struct Scsi_Host *shost);
>>  void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd);
>>  #ifdef CONFIG_SCSI_LOGGING
>> diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
>> index dbb206c90ecf..403832ee17e0 100644
>> --- a/drivers/scsi/scsi_sysfs.c
>> +++ b/drivers/scsi/scsi_sysfs.c
>> @@ -386,15 +386,7 @@ show_host_busy(struct device *dev, struct 
>> device_attribute *attr, char *buf)
>>  }
>>  static DEVICE_ATTR(host_busy, S_IRUGO, show_host_busy, NULL);
>>
>> -static ssize_t
>> -show_use_blk_mq(struct device *dev, struct device_attribute *attr, 
>> char *buf)
>> -{
>> -    return sprintf(buf, "1\n");
>> -}
>> -static DEVICE_ATTR(use_blk_mq, S_IRUGO, show_use_blk_mq, NULL);
>> -
>>  static struct attribute *scsi_sysfs_shost_attrs[] = {
>> -    &dev_attr_use_blk_mq.attr,
>>      &dev_attr_unique_id.attr,
>>      &dev_attr_host_busy.attr,
>>      &dev_attr_cmd_per_lun.attr,
>>
> 
> 
> 
> .
>
diff mbox series

Patch

diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 653d5ea6c5d9..7049aabb86e0 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -765,10 +765,6 @@  MODULE_LICENSE("GPL");
 module_param(scsi_logging_level, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(scsi_logging_level, "a bit mask of logging levels");
 
-/* This should go away in the future, it doesn't do anything anymore */
-bool scsi_use_blk_mq = true;
-module_param_named(use_blk_mq, scsi_use_blk_mq, bool, S_IWUSR | S_IRUGO);
-
 static int __init init_scsi(void)
 {
 	int error;
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index 5f21547b2ad2..a4f0741524d8 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -29,7 +29,6 @@  extern int scsi_init_hosts(void);
 extern void scsi_exit_hosts(void);
 
 /* scsi.c */
-extern bool scsi_use_blk_mq;
 int scsi_init_sense_cache(struct Scsi_Host *shost);
 void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd);
 #ifdef CONFIG_SCSI_LOGGING
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index dbb206c90ecf..403832ee17e0 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -386,15 +386,7 @@  show_host_busy(struct device *dev, struct device_attribute *attr, char *buf)
 }
 static DEVICE_ATTR(host_busy, S_IRUGO, show_host_busy, NULL);
 
-static ssize_t
-show_use_blk_mq(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	return sprintf(buf, "1\n");
-}
-static DEVICE_ATTR(use_blk_mq, S_IRUGO, show_use_blk_mq, NULL);
-
 static struct attribute *scsi_sysfs_shost_attrs[] = {
-	&dev_attr_use_blk_mq.attr,
 	&dev_attr_unique_id.attr,
 	&dev_attr_host_busy.attr,
 	&dev_attr_cmd_per_lun.attr,