diff mbox series

[v3,02/48] scsi: ips: Change the return type of ips_release() into 'void'

Message ID 20220211223247.14369-3-bvanassche@acm.org
State Superseded
Headers show
Series Remove the SCSI pointer from struct scsi_cmnd | expand

Commit Message

Bart Van Assche Feb. 11, 2022, 10:32 p.m. UTC
ips_release() has one caller and that caller ignores the value returned by
ips_release(). Hence change the return type of that function into 'void'.

Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/ips.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Hannes Reinecke Feb. 14, 2022, 9:43 a.m. UTC | #1
On 2/11/22 23:32, Bart Van Assche wrote:
> ips_release() has one caller and that caller ignores the value returned by
> ips_release(). Hence change the return type of that function into 'void'.
> 
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> Cc: John Garry <john.garry@huawei.com>
> Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>   drivers/scsi/ips.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
Nit: could be merged with the previous patch.
But nothing critical, and can be done in the next version (if such a 
thing is necessary).

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
Himanshu Madhani Feb. 14, 2022, 8:01 p.m. UTC | #2
> On Feb 11, 2022, at 2:32 PM, Bart Van Assche <bvanassche@acm.org> wrote:
> 
> ips_release() has one caller and that caller ignores the value returned by
> ips_release(). Hence change the return type of that function into 'void'.
> 
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> Cc: John Garry <john.garry@huawei.com>
> Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/scsi/ips.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
> index 0db35e97ce8f..59664e92ec8a 100644
> --- a/drivers/scsi/ips.c
> +++ b/drivers/scsi/ips.c
> @@ -638,8 +638,7 @@ ips_setup_funclist(ips_ha_t * ha)
> /*   Remove a driver                                                        */
> /*                                                                          */
> /****************************************************************************/
> -static int
> -ips_release(struct Scsi_Host *sh)
> +static void ips_release(struct Scsi_Host *sh)
> {
> 	ips_scb_t *scb;
> 	ips_ha_t *ha;
> @@ -660,7 +659,7 @@ ips_release(struct Scsi_Host *sh)
> 	ha = IPS_HA(sh);
> 
> 	if (!ha)
> -		return (FALSE);
> +		return;
> 
> 	/* flush the cache on the controller */
> 	scb = &ha->scbs[ha->max_cmds - 1];
> @@ -698,8 +697,6 @@ ips_release(struct Scsi_Host *sh)
> 	scsi_host_put(sh);
> 
> 	ips_released_controllers++;
> -
> -	return (FALSE);
> }
> 
> /****************************************************************************/

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering
Bart Van Assche Feb. 15, 2022, 1:33 a.m. UTC | #3
On 2/14/22 01:43, Hannes Reinecke wrote:
> On 2/11/22 23:32, Bart Van Assche wrote:
>> ips_release() has one caller and that caller ignores the value 
>> returned by
>> ips_release(). Hence change the return type of that function into 'void'.
>>
>> Cc: Hannes Reinecke <hare@suse.com>
>> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
>> Cc: John Garry <john.garry@huawei.com>
>> Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
>> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>> ---
>>   drivers/scsi/ips.c | 7 ++-----
>>   1 file changed, 2 insertions(+), 5 deletions(-)
>>
> Nit: could be merged with the previous patch.
> But nothing critical, and can be done in the next version (if such a 
> thing is necessary).

Hmm ... isn't the rule one change per patch? Anyway, I can combine the 
first two patches if you feel strongly about this.

Thanks,

Bart.
diff mbox series

Patch

diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 0db35e97ce8f..59664e92ec8a 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -638,8 +638,7 @@  ips_setup_funclist(ips_ha_t * ha)
 /*   Remove a driver                                                        */
 /*                                                                          */
 /****************************************************************************/
-static int
-ips_release(struct Scsi_Host *sh)
+static void ips_release(struct Scsi_Host *sh)
 {
 	ips_scb_t *scb;
 	ips_ha_t *ha;
@@ -660,7 +659,7 @@  ips_release(struct Scsi_Host *sh)
 	ha = IPS_HA(sh);
 
 	if (!ha)
-		return (FALSE);
+		return;
 
 	/* flush the cache on the controller */
 	scb = &ha->scbs[ha->max_cmds - 1];
@@ -698,8 +697,6 @@  ips_release(struct Scsi_Host *sh)
 	scsi_host_put(sh);
 
 	ips_released_controllers++;
-
-	return (FALSE);
 }
 
 /****************************************************************************/