diff mbox series

[-next] scsi: megaraid_sas: remove set but not used variable 'sge_sz'

Message ID 20190525123705.8588-1-yuehaibing@huawei.com (mailing list archive)
State Mainlined
Commit ed17190941c795314a5dcc2e8d48107aed0f8782
Headers show
Series [-next] scsi: megaraid_sas: remove set but not used variable 'sge_sz' | expand

Commit Message

Yue Haibing May 25, 2019, 12:37 p.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_create_frame_pool:
drivers/scsi/megaraid/megaraid_sas_base.c:4124:6: warning: variable sge_sz set but not used [-Wunused-but-set-variable]

It's not used any more since
commit 200aed582d61 ("megaraid_sas: endianness related bug fixes and code optimization")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Sumit Saxena June 7, 2019, 6:36 a.m. UTC | #1
On Sat, May 25, 2019 at 6:07 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_create_frame_pool:
> drivers/scsi/megaraid/megaraid_sas_base.c:4124:6: warning: variable sge_sz set but not used [-Wunused-but-set-variable]
>
> It's not used any more since
> commit 200aed582d61 ("megaraid_sas: endianness related bug fixes and code optimization")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>

> ---
>  drivers/scsi/megaraid/megaraid_sas_base.c | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index b26991dcf137..25281a2eb424 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -4121,22 +4121,11 @@ static int megasas_create_frame_pool(struct megasas_instance *instance)
>  {
>         int i;
>         u16 max_cmd;
> -       u32 sge_sz;
>         u32 frame_count;
>         struct megasas_cmd *cmd;
>
>         max_cmd = instance->max_mfi_cmds;
>
> -       /*
> -        * Size of our frame is 64 bytes for MFI frame, followed by max SG
> -        * elements and finally SCSI_SENSE_BUFFERSIZE bytes for sense buffer
> -        */
> -       sge_sz = (IS_DMA64) ? sizeof(struct megasas_sge64) :
> -           sizeof(struct megasas_sge32);
> -
> -       if (instance->flag_ieee)
> -               sge_sz = sizeof(struct megasas_sge_skinny);
> -
>         /*
>          * For MFI controllers.
>          * max_num_sge = 60
> --
> 2.17.1
>
>
Martin K. Petersen June 7, 2019, 1:14 p.m. UTC | #2
YueHaibing,

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_create_frame_pool:
> drivers/scsi/megaraid/megaraid_sas_base.c:4124:6: warning: variable sge_sz set but not used [-Wunused-but-set-variable]
>
> It's not used any more since
> commit 200aed582d61 ("megaraid_sas: endianness related bug fixes and code optimization")

Applied to 5.3/scsi-queue. Thanks.
diff mbox series

Patch

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index b26991dcf137..25281a2eb424 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4121,22 +4121,11 @@  static int megasas_create_frame_pool(struct megasas_instance *instance)
 {
 	int i;
 	u16 max_cmd;
-	u32 sge_sz;
 	u32 frame_count;
 	struct megasas_cmd *cmd;
 
 	max_cmd = instance->max_mfi_cmds;
 
-	/*
-	 * Size of our frame is 64 bytes for MFI frame, followed by max SG
-	 * elements and finally SCSI_SENSE_BUFFERSIZE bytes for sense buffer
-	 */
-	sge_sz = (IS_DMA64) ? sizeof(struct megasas_sge64) :
-	    sizeof(struct megasas_sge32);
-
-	if (instance->flag_ieee)
-		sge_sz = sizeof(struct megasas_sge_skinny);
-
 	/*
 	 * For MFI controllers.
 	 * max_num_sge = 60