[2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()

Message ID 20221121121725.1910795-3-john.g.garry@oracle.com
State New
Headers
Series scsi: Some minor scan improvements |

Commit Message

John Garry Nov. 21, 2022, 12:17 p.m. UTC
  Instead of using hardcoded '0' as the do_scsi_scan_host() ->
scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.

Signed-off-by: John Garry <john.g.garry@oracle.com>
---
 drivers/scsi/scsi_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Damien Le Moal Nov. 21, 2022, 12:33 p.m. UTC | #1
On 11/21/22 21:17, John Garry wrote:
> Instead of using hardcoded '0' as the do_scsi_scan_host() ->
> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>

Looks good.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

> ---
>  drivers/scsi/scsi_scan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> index 6cc974b382c1..920b145f80b7 100644
> --- a/drivers/scsi/scsi_scan.c
> +++ b/drivers/scsi/scsi_scan.c
> @@ -1920,7 +1920,7 @@ static void do_scsi_scan_host(struct Scsi_Host *shost)
>  			msleep(10);
>  	} else {
>  		scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
> -				SCAN_WILD_CARD, 0);
> +				SCAN_WILD_CARD, SCSI_SCAN_INITIAL);
>  	}
>  }
>
  
John Garry Nov. 21, 2022, 1:48 p.m. UTC | #2
On 21/11/2022 12:33, Damien Le Moal wrote:
> On 11/21/22 21:17, John Garry wrote:
>> Instead of using hardcoded '0' as the do_scsi_scan_host() ->
>> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.
>>
>> Signed-off-by: John Garry<john.g.garry@oracle.com>
> Looks good.
> 
> Reviewed-by: Damien Le Moal<damien.lemoal@opensource.wdc.com>
> 

cheers. As mentioned, I can combine these patches if people prefer.

John
  
Jason Yan Nov. 21, 2022, 2:31 p.m. UTC | #3
On 2022/11/21 20:17, John Garry wrote:
> Instead of using hardcoded '0' as the do_scsi_scan_host() ->
> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.
> 
> Signed-off-by: John Garry<john.g.garry@oracle.com>
> ---
>   drivers/scsi/scsi_scan.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Looks good,
Reviewed-by: Jason Yan <yanaijie@huawei.com>
  
Bart Van Assche Nov. 26, 2022, 12:13 a.m. UTC | #4
On 11/21/22 05:48, John Garry wrote:
> cheers. As mentioned, I can combine these patches if people prefer.

I'm in favor of combining both patches.

Whether or not these patches get combined, feel free to add:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
  

Patch

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 6cc974b382c1..920b145f80b7 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1920,7 +1920,7 @@  static void do_scsi_scan_host(struct Scsi_Host *shost)
 			msleep(10);
 	} else {
 		scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
-				SCAN_WILD_CARD, 0);
+				SCAN_WILD_CARD, SCSI_SCAN_INITIAL);
 	}
 }