Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH] scsi: storvsc: Replace symbolic permissions with octal
@ 2026-05-05 22:53 Md Shofiqul Islam
  2026-05-05 23:13 ` [EXTERNAL] " Long Li
  2026-05-06  0:14 ` Michael Kelley
  0 siblings, 2 replies; 3+ messages in thread
From: Md Shofiqul Islam @ 2026-05-05 22:53 UTC (permalink / raw)
  To: linux-scsi
  Cc: kys, haiyangz, wei.liu, decui, longli, linux-kernel,
	Md Shofiqul Islam

Symbolic permissions like S_IRUGO and S_IWUSR are deprecated.
Replace with their octal equivalents as preferred by checkpatch:
 - S_IRUGO|S_IWUSR -> 0644
 - S_IRUGO         -> 0444 (3 instances)
---
 drivers/scsi/storvsc_drv.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 6977ca8a0..571ea5491 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -156,7 +156,7 @@ static bool hv_dev_is_fc(struct hv_device *hv_dev);
 #define STORVSC_LOGGING_WARN	2
 
 static int logging_level = STORVSC_LOGGING_ERROR;
-module_param(logging_level, int, S_IRUGO|S_IWUSR);
+module_param(logging_level, int, 0644);
 MODULE_PARM_DESC(logging_level,
 	"Logging level, 0 - None, 1 - Error (default), 2 - Warning.");
 
@@ -345,17 +345,17 @@ static int storvsc_change_queue_depth(struct scsi_device *sdev, int queue_depth)
 static int storvsc_vcpus_per_sub_channel = 4;
 static unsigned int storvsc_max_hw_queues;
 
-module_param(storvsc_ringbuffer_size, int, S_IRUGO);
+module_param(storvsc_ringbuffer_size, int, 0444);
 MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)");
 
 module_param(storvsc_max_hw_queues, uint, 0644);
 MODULE_PARM_DESC(storvsc_max_hw_queues, "Maximum number of hardware queues");
 
-module_param(storvsc_vcpus_per_sub_channel, int, S_IRUGO);
+module_param(storvsc_vcpus_per_sub_channel, int, 0444);
 MODULE_PARM_DESC(storvsc_vcpus_per_sub_channel, "Ratio of VCPUs to subchannels");
 
 static int ring_avail_percent_lowater = 10;
-module_param(ring_avail_percent_lowater, int, S_IRUGO);
+module_param(ring_avail_percent_lowater, int, 0444);
 MODULE_PARM_DESC(ring_avail_percent_lowater,
 		"Select a channel if available ring size > this in percent");
 
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [EXTERNAL] [PATCH] scsi: storvsc: Replace symbolic permissions with octal
  2026-05-05 22:53 [PATCH] scsi: storvsc: Replace symbolic permissions with octal Md Shofiqul Islam
@ 2026-05-05 23:13 ` Long Li
  2026-05-06  0:14 ` Michael Kelley
  1 sibling, 0 replies; 3+ messages in thread
From: Long Li @ 2026-05-05 23:13 UTC (permalink / raw)
  To: Md Shofiqul Islam, linux-scsi@vger.kernel.org
  Cc: KY Srinivasan, Haiyang Zhang, wei.liu@kernel.org, Dexuan Cui,
	linux-kernel@vger.kernel.org

This patch is missing "Signed-off-by:".

"deprecated" is inaccurate - Symbolic permissions are not deprecated; they still compile fine. The message should say something like "not preferred".

Thanks,
Long

> 
> Symbolic permissions like S_IRUGO and S_IWUSR are deprecated.
> Replace with their octal equivalents as preferred by checkpatch:
>  - S_IRUGO|S_IWUSR -> 0644
>  - S_IRUGO         -> 0444 (3 instances)
> ---
>  drivers/scsi/storvsc_drv.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index
> 6977ca8a0..571ea5491 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -156,7 +156,7 @@ static bool hv_dev_is_fc(struct hv_device *hv_dev);
>  #define STORVSC_LOGGING_WARN   2
> 
>  static int logging_level = STORVSC_LOGGING_ERROR; -
> module_param(logging_level, int, S_IRUGO|S_IWUSR);
> +module_param(logging_level, int, 0644);
>  MODULE_PARM_DESC(logging_level,
>         "Logging level, 0 - None, 1 - Error (default), 2 - Warning.");
> 
> @@ -345,17 +345,17 @@ static int storvsc_change_queue_depth(struct
> scsi_device *sdev, int queue_depth)  static int storvsc_vcpus_per_sub_channel =
> 4;  static unsigned int storvsc_max_hw_queues;
> 
> -module_param(storvsc_ringbuffer_size, int, S_IRUGO);
> +module_param(storvsc_ringbuffer_size, int, 0444);
>  MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)");
> 
>  module_param(storvsc_max_hw_queues, uint, 0644);
> MODULE_PARM_DESC(storvsc_max_hw_queues, "Maximum number of
> hardware queues");
> 
> -module_param(storvsc_vcpus_per_sub_channel, int, S_IRUGO);
> +module_param(storvsc_vcpus_per_sub_channel, int, 0444);
>  MODULE_PARM_DESC(storvsc_vcpus_per_sub_channel, "Ratio of VCPUs to
> subchannels");
> 
>  static int ring_avail_percent_lowater = 10; -
> module_param(ring_avail_percent_lowater, int, S_IRUGO);
> +module_param(ring_avail_percent_lowater, int, 0444);
>  MODULE_PARM_DESC(ring_avail_percent_lowater,
>                 "Select a channel if available ring size > this in percent");
> 
> --
> 2.51.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] scsi: storvsc: Replace symbolic permissions with octal
  2026-05-05 22:53 [PATCH] scsi: storvsc: Replace symbolic permissions with octal Md Shofiqul Islam
  2026-05-05 23:13 ` [EXTERNAL] " Long Li
@ 2026-05-06  0:14 ` Michael Kelley
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Kelley @ 2026-05-06  0:14 UTC (permalink / raw)
  To: Md Shofiqul Islam, linux-scsi@vger.kernel.org
  Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
	decui@microsoft.com, longli@microsoft.com,
	linux-kernel@vger.kernel.org

From: Md Shofiqul Islam <shofiqtest@gmail.com> Sent: Tuesday, May 5, 2026 3:53 PM
> 

Since storvsc is the driver for the synthetic SCSI controller
provided by Hyper-V to its guest VMs, I'd suggest including the
linux-hyperv@vger.kernel.org mailing list on To: line. That's the
mailing list for all things related to Hyper-V guests.

Michael

> Symbolic permissions like S_IRUGO and S_IWUSR are deprecated.
> Replace with their octal equivalents as preferred by checkpatch:
>  - S_IRUGO|S_IWUSR -> 0644
>  - S_IRUGO         -> 0444 (3 instances)
> ---
>  drivers/scsi/storvsc_drv.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 6977ca8a0..571ea5491 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -156,7 +156,7 @@ static bool hv_dev_is_fc(struct hv_device *hv_dev);
>  #define STORVSC_LOGGING_WARN	2
> 
>  static int logging_level = STORVSC_LOGGING_ERROR;
> -module_param(logging_level, int, S_IRUGO|S_IWUSR);
> +module_param(logging_level, int, 0644);
>  MODULE_PARM_DESC(logging_level,
>  	"Logging level, 0 - None, 1 - Error (default), 2 - Warning.");
> 
> @@ -345,17 +345,17 @@ static int storvsc_change_queue_depth(struct scsi_device
> *sdev, int queue_depth)
>  static int storvsc_vcpus_per_sub_channel = 4;
>  static unsigned int storvsc_max_hw_queues;
> 
> -module_param(storvsc_ringbuffer_size, int, S_IRUGO);
> +module_param(storvsc_ringbuffer_size, int, 0444);
>  MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)");
> 
>  module_param(storvsc_max_hw_queues, uint, 0644);
>  MODULE_PARM_DESC(storvsc_max_hw_queues, "Maximum number of hardware
> queues");
> 
> -module_param(storvsc_vcpus_per_sub_channel, int, S_IRUGO);
> +module_param(storvsc_vcpus_per_sub_channel, int, 0444);
>  MODULE_PARM_DESC(storvsc_vcpus_per_sub_channel, "Ratio of VCPUs to
> subchannels");
> 
>  static int ring_avail_percent_lowater = 10;
> -module_param(ring_avail_percent_lowater, int, S_IRUGO);
> +module_param(ring_avail_percent_lowater, int, 0444);
>  MODULE_PARM_DESC(ring_avail_percent_lowater,
>  		"Select a channel if available ring size > this in percent");
> 
> --
> 2.51.1
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-06  0:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 22:53 [PATCH] scsi: storvsc: Replace symbolic permissions with octal Md Shofiqul Islam
2026-05-05 23:13 ` [EXTERNAL] " Long Li
2026-05-06  0:14 ` Michael Kelley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox