Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3725148rwb; Tue, 20 Sep 2022 03:58:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Stc5Hv/6J5oLejEnedjOREKtaWBJkVe8zV5G4AntmR49e5f931Y4VZym8I1CgMyfZjHOU X-Received: by 2002:a17:90b:1c90:b0:203:b7b4:b1cf with SMTP id oo16-20020a17090b1c9000b00203b7b4b1cfmr587154pjb.160.1663671524053; Tue, 20 Sep 2022 03:58:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663671524; cv=none; d=google.com; s=arc-20160816; b=Ahin6HgpHpUYTPp7xIToFqsoXxF6z0GBO5wAjnQA9aoXw/L41WDmAK8Abka1BGKPRY 4X39mIWgV9F15SvaoprjwdPTcp/G3aRrPVFzO3qVuuxX7VTym1KyVXCj4C0Uwdya9ihp nTGxAedHYblvDROxxepH2ny5tSilzR1Ru1V3dlOOlWODgjUvg7432o3lAj7ULJDqXmJO 6Bnf/5pTRKiFRUakl1GqMN3D0jhrofxF2GNn1LSym5+IVv89a77nOpi2I5Ph3pot+d13 oKbHPwJbMAYH4cspgqP71/tY/s4AkyOFRPZHDG9mfQEnGaVvWbsT+Tzt6qZrzCJVZQHR S7lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=9flMPG5MtAdRf4799Ef6KlLdxsbWzTY02minap92gII=; b=ASLH/tHsOUncpelakdq5gfRxXPIkiNR3XJc+BO/7vocErJsFehV4G8eMoqSpRSpngx yiYwU8ao7JNw2ssfG95kcFeuXiRS0jf2lX8kYb96ZmkGGZqZscSynFz/M23lCzfXaRzJ +0FldGZr92NWaKn8zokEKVROvoglqPzJwF7ZgqKJYWhU9P/qhM5xWWhSmU4PE0bFn5Zh Qh7RLdF3QKtu6DveVFR4lGFeLG0nUHRDvZwALqJU8WTk3bEtDZDzsnSBQWPVqo+jkLdX FcFp3EJkjWNOp+VWcFS+rLif7hUNK/7V8q1+rIje8rcJW48kzElb1y34tVD1HFWrsWtN 6JFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a170902e80200b0016c00834dd5si1697035plg.18.2022.09.20.03.58.31; Tue, 20 Sep 2022 03:58:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229559AbiITKgX (ORCPT + 99 others); Tue, 20 Sep 2022 06:36:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231295AbiITKfy (ORCPT ); Tue, 20 Sep 2022 06:35:54 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 029F472FCE; Tue, 20 Sep 2022 03:34:03 -0700 (PDT) Received: from fraeml738-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4MWyYG364Nz686kk; Tue, 20 Sep 2022 18:32:50 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml738-chm.china.huawei.com (10.206.15.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 12:33:52 +0200 Received: from localhost.localdomain (10.69.192.58) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 11:33:49 +0100 From: John Garry To: , , , , CC: , , , , John Garry Subject: [PATCH 1/6] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() Date: Tue, 20 Sep 2022 18:27:05 +0800 Message-ID: <1663669630-21333-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1663669630-21333-1-git-send-email-john.garry@huawei.com> References: <1663669630-21333-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of using hardcoded '1' as the __scsi_add_device() -> scsi_probe_and_add_lun() rescan arg, use proper macro SCSI_SCAN_RESCAN. Signed-off-by: John Garry --- drivers/scsi/scsi_scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index ac6059702d13..3759b1a77504 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1588,7 +1588,8 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel, scsi_complete_async_scans(); if (scsi_host_scan_allowed(shost) && scsi_autopm_get_host(shost) == 0) { - scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata); + scsi_probe_and_add_lun(starget, lun, NULL, &sdev, + SCSI_SCAN_RESCAN, hostdata); scsi_autopm_put_host(shost); } mutex_unlock(&shost->scan_mutex); -- 2.35.3