diff mbox series

scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0()

Message ID 20221213142122.1011886-1-john.g.garry@oracle.com (mailing list archive)
State Accepted
Headers show
Series scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0() | expand

Commit Message

John Garry Dec. 13, 2022, 2:21 p.m. UTC
The 2nd return statement in inquiry_vpd_b0() is unreachable, so delete it.

Signed-off-by: John Garry <john.g.garry@oracle.com>

Comments

Jason Yan Dec. 14, 2022, 1:18 a.m. UTC | #1
On 2022/12/13 22:21, John Garry wrote:
> The 2nd return statement in inquiry_vpd_b0() is unreachable, so delete it.
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>
> 
> diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> index b8a76b89f85a..6f637501539c 100644
> --- a/drivers/scsi/scsi_debug.c
> +++ b/drivers/scsi/scsi_debug.c
> @@ -1511,8 +1511,6 @@ static int inquiry_vpd_b0(unsigned char *arr)
>   	put_unaligned_be64(sdebug_write_same_length, &arr[32]);
>   
>   	return 0x3c; /* Mandatory page length for Logical Block Provisioning */
> -
> -	return sizeof(vpdb0_data);
>   }
>   
>   /* Block device characteristics VPD page (SBC-3) */
> 

Looks good,
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Martin K. Petersen Dec. 14, 2022, 3:09 a.m. UTC | #2
John,

> The 2nd return statement in inquiry_vpd_b0() is unreachable, so delete it.

Applied to 6.2/scsi-staging, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index b8a76b89f85a..6f637501539c 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1511,8 +1511,6 @@  static int inquiry_vpd_b0(unsigned char *arr)
 	put_unaligned_be64(sdebug_write_same_length, &arr[32]);
 
 	return 0x3c; /* Mandatory page length for Logical Block Provisioning */
-
-	return sizeof(vpdb0_data);
 }
 
 /* Block device characteristics VPD page (SBC-3) */