Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp300247rwb; Mon, 26 Sep 2022 19:21:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5y5z86yuZdbvVV1ghRvGtWL9GNfA9AoaEAI3NoGY1orr/D362DjDEvBejhrFoHraz5EMvu X-Received: by 2002:a63:a61:0:b0:43c:9d3b:9c8f with SMTP id z33-20020a630a61000000b0043c9d3b9c8fmr10639880pgk.228.1664245291904; Mon, 26 Sep 2022 19:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664245291; cv=none; d=google.com; s=arc-20160816; b=LkdMLp/KhMcTjAyPBvhGES+cyXeF+lXpvN2tShaHGUipiQmbaS6LjPM69NWkPNYZnf JYG5zdgGDB89Iw2fXRC3X7ehlNg/JV7s/MpJcIUTjJQCjqquH6rwe6v04s98loAw5TSH r5RqA637mESHpDgk3NiQv00tNlXNydFmEhngYJOrM4GnrIE/+v2vJpCGPK+jrjeWWwn/ uVeVkXXS0DYyC5ZmkflebHg9luO5R3mS9qXNxpMFcaWAECvEEAyXiQhVAhkFjXW2KJ7L GSl4W1AKvMx6XQCnDkAaphW7m6lpRjmt6A20RHZ43v5ETuDEdCfrw4uxKpIxVcT+phnW yHnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZlKPXXGCf16EOnaU0De7BSpFpfCPXs0/tYNwu24AX2Y=; b=kmkIa/ej1UsXDs7R+KHDVgqXw9pBcpha1urxbxaPPAoZiY5qsj/R2SY06EzTwXs6yv d7F0fQ2O9OnucgHrsx3e/QQSeYm/lTdEJFp7Nut2ODgF738jMI5Kelw3IDldqKQqebbI 07zHPM/dS6M7pDJwxsVv1OY8bSBiFXknnd16On/TF3GdToss59fQk0SwU6XVUH52ryAt bvqi7ODVaC2e6shqHW4OlpTjLjjpEKLzkgq/JDHkmf5SK6JsYlWQOjk59zOEOq52r1cV ZcBT/Gx62ATwSx8tVAj/8qWsiqgZrMKUkCrtVS70QIIlIXb1Nm5MVjMsrMpRJMJfG8C6 kZCA== 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 y128-20020a623286000000b00548045c4fb4si461312pfy.334.2022.09.26.19.21.20; Mon, 26 Sep 2022 19:21:31 -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 S230148AbiI0CTf (ORCPT + 99 others); Mon, 26 Sep 2022 22:19:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbiI0CTN (ORCPT ); Mon, 26 Sep 2022 22:19:13 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFC2FA98C1; Mon, 26 Sep 2022 19:19:10 -0700 (PDT) Received: from canpemm500004.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mc38t2yDRzHtj1; Tue, 27 Sep 2022 10:14:22 +0800 (CST) Received: from huawei.com (10.175.127.227) by canpemm500004.china.huawei.com (7.192.104.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 27 Sep 2022 10:19:08 +0800 From: Jason Yan To: , CC: , , , , , , , Jason Yan Subject: [PATCH v3 7/8] scsi: libsas: use sas_phy_addr_match() instead of open coded Date: Tue, 27 Sep 2022 10:29:40 +0800 Message-ID: <20220927022941.4029476-8-yanaijie@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220927022941.4029476-1-yanaijie@huawei.com> References: <20220927022941.4029476-1-yanaijie@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500004.china.huawei.com (7.192.104.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 The sas address comparation of expander phys is open coded. Now we can replace it with sas_phy_addr_match(). Signed-off-by: Jason Yan --- drivers/scsi/libsas/sas_expander.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index b2b5103c3e76..f268291b7584 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -2058,8 +2058,7 @@ static int sas_rediscover(struct domain_device *dev, const int phy_id) if (i == phy_id) continue; - if (SAS_ADDR(phy->attached_sas_addr) == - SAS_ADDR(changed_phy->attached_sas_addr)) { + if (sas_phy_addr_match(phy, changed_phy)) { last = false; break; } -- 2.31.1