* [PATCH] scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0()
@ 2022-12-13 14:21 John Garry
2022-12-14 1:18 ` Jason Yan
2022-12-14 3:09 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: John Garry @ 2022-12-13 14:21 UTC (permalink / raw)
To: jejb, martin.petersen, dgilbert; +Cc: linux-scsi, linux-kernel, John Garry
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) */
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0()
2022-12-13 14:21 [PATCH] scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0() John Garry
@ 2022-12-14 1:18 ` Jason Yan
2022-12-14 3:09 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Jason Yan @ 2022-12-14 1:18 UTC (permalink / raw)
To: John Garry, jejb, martin.petersen, dgilbert; +Cc: linux-scsi, linux-kernel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0()
2022-12-13 14:21 [PATCH] scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0() John Garry
2022-12-14 1:18 ` Jason Yan
@ 2022-12-14 3:09 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-12-14 3:09 UTC (permalink / raw)
To: John Garry; +Cc: jejb, martin.petersen, dgilbert, linux-scsi, linux-kernel
John,
> The 2nd return statement in inquiry_vpd_b0() is unreachable, so delete it.
Applied to 6.2/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-14 3:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-13 14:21 [PATCH] scsi: scsi_debug: Delete unreachable code in inquiry_vpd_b0() John Garry
2022-12-14 1:18 ` Jason Yan
2022-12-14 3:09 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox