* [PATCH 1/1] scsi: iscsi: Make iscsi_unregister_transport() return void
@ 2022-06-16 8:02 Max Gurtovoy
2022-06-16 16:09 ` Mike Christie
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Max Gurtovoy @ 2022-06-16 8:02 UTC (permalink / raw)
To: martin.petersen, linux-scsi; +Cc: michael.christie, Max Gurtovoy
This function always returns 0. We can make it return void to simplify
the code. Also, no caller ever checks the return value of this function.
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
---
drivers/scsi/scsi_transport_iscsi.c | 4 +---
include/scsi/scsi_transport_iscsi.h | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 2c0dd64159b0..5601633837cc 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -4807,7 +4807,7 @@ iscsi_register_transport(struct iscsi_transport *tt)
}
EXPORT_SYMBOL_GPL(iscsi_register_transport);
-int iscsi_unregister_transport(struct iscsi_transport *tt)
+void iscsi_unregister_transport(struct iscsi_transport *tt)
{
struct iscsi_internal *priv;
unsigned long flags;
@@ -4830,8 +4830,6 @@ int iscsi_unregister_transport(struct iscsi_transport *tt)
sysfs_remove_group(&priv->dev.kobj, &iscsi_transport_group);
device_unregister(&priv->dev);
mutex_unlock(&rx_queue_mutex);
-
- return 0;
}
EXPORT_SYMBOL_GPL(iscsi_unregister_transport);
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 9acb8422f680..695396a5f607 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -162,7 +162,7 @@ struct iscsi_transport {
* transport registration upcalls
*/
extern struct scsi_transport_template *iscsi_register_transport(struct iscsi_transport *tt);
-extern int iscsi_unregister_transport(struct iscsi_transport *tt);
+extern void iscsi_unregister_transport(struct iscsi_transport *tt);
/*
* control plane upcalls
--
2.18.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] scsi: iscsi: Make iscsi_unregister_transport() return void
2022-06-16 8:02 [PATCH 1/1] scsi: iscsi: Make iscsi_unregister_transport() return void Max Gurtovoy
@ 2022-06-16 16:09 ` Mike Christie
2022-06-17 2:11 ` Martin K. Petersen
2022-06-22 2:10 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Mike Christie @ 2022-06-16 16:09 UTC (permalink / raw)
To: Max Gurtovoy, martin.petersen, linux-scsi
On 6/16/22 3:02 AM, Max Gurtovoy wrote:
> This function always returns 0. We can make it return void to simplify
> the code. Also, no caller ever checks the return value of this function.
>
> Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] scsi: iscsi: Make iscsi_unregister_transport() return void
2022-06-16 8:02 [PATCH 1/1] scsi: iscsi: Make iscsi_unregister_transport() return void Max Gurtovoy
2022-06-16 16:09 ` Mike Christie
@ 2022-06-17 2:11 ` Martin K. Petersen
2022-06-22 2:10 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-06-17 2:11 UTC (permalink / raw)
To: Max Gurtovoy; +Cc: martin.petersen, linux-scsi, michael.christie
Max,
> This function always returns 0. We can make it return void to simplify
> the code. Also, no caller ever checks the return value of this function.
Applied to 5.20/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] scsi: iscsi: Make iscsi_unregister_transport() return void
2022-06-16 8:02 [PATCH 1/1] scsi: iscsi: Make iscsi_unregister_transport() return void Max Gurtovoy
2022-06-16 16:09 ` Mike Christie
2022-06-17 2:11 ` Martin K. Petersen
@ 2022-06-22 2:10 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-06-22 2:10 UTC (permalink / raw)
To: Max Gurtovoy, linux-scsi; +Cc: Martin K . Petersen, michael.christie
On Thu, 16 Jun 2022 11:02:10 +0300, Max Gurtovoy wrote:
> This function always returns 0. We can make it return void to simplify
> the code. Also, no caller ever checks the return value of this function.
>
>
Applied to 5.20/scsi-queue, thanks!
[1/1] scsi: iscsi: Make iscsi_unregister_transport() return void
https://git.kernel.org/mkp/scsi/c/6a33ed506416
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-22 2:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 8:02 [PATCH 1/1] scsi: iscsi: Make iscsi_unregister_transport() return void Max Gurtovoy
2022-06-16 16:09 ` Mike Christie
2022-06-17 2:11 ` Martin K. Petersen
2022-06-22 2:10 ` 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;
as well as URLs for NNTP newsgroup(s).