Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp198094rwb; Sat, 17 Sep 2022 03:41:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5DmzkemWHFcn5Yc7Ee21rtTIvFjwpSQXS0UNdW8RH/acKvm01hB5KZEqMEGVLwe+7BjZUj X-Received: by 2002:a17:906:ee81:b0:77e:829a:76e9 with SMTP id wt1-20020a170906ee8100b0077e829a76e9mr6633844ejb.207.1663411269495; Sat, 17 Sep 2022 03:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663411269; cv=none; d=google.com; s=arc-20160816; b=LZjb//f5qY2B8AgUTbt5iQ8GtDkuIoP2fN9tZbdCoNBM58GWtDplD9K+ic7bjKuoGz 0uz+DYfwDEZncNKFn7BxvVuxRqU5il7qLn89IV8AvlbapIjwnocHb/v35i1QGVkwTUXx qaShWmqm7gOLxvp77y3EpbfsCijwelwx/kmdCDTQX5YMagNVhA/IzDTRmqXXYCoZjtQN 4w33WF05EL8pNUw2tBswvSDIGe45MFsI6/dTPV4DwqternLWEmJhCRBiLB0NK7m9xNAp HMP9Ns/ror8ynhl8Cc09jMBsfjQ5WmmYwp8NUCNMXB8FDbGgbuZUspYkJBOi8UPdvtEO kihw== 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=WNWd9vay+W/s7M2zXMGx6miG2YThgVxN9Bxx9ILSjDg=; b=wghcgNpc7DpbY4oo1tca9WzGmHI3YEsQzZrLZOrbwgNo/Ne6E/VwwYjtx6mcF8xH0R WzJt/YN01Q3j0RqWVRoSJUp2soYfUsdAiQbYC5EmAmu9T6z1ZBSZry67y/0DbII5SZMw lkWUSmgHhxgRlzyOo4IS+FLyCeK8/TsDwUIbamDjXepBVuRnxtZCtmCIC/HLBaqsQWxY 9eXpnlrKmTa0HqcpEkoXpvhpIsDDXw1tN5/en5lY0DqzdfKXRs0Y18hGTykxTys+fC95 Nf0IwFf04D8jRwOxs1owsmbQi/uKmiu1dmIpUYMcobkPjtTIdPfuYqJux4KnuEPD0Xn2 /Ugw== 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 dk9-20020a170906f0c900b007701a050273si16064810ejb.942.2022.09.17.03.40.43; Sat, 17 Sep 2022 03:41:09 -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 S229673AbiIQKcy (ORCPT + 99 others); Sat, 17 Sep 2022 06:32:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbiIQKc1 (ORCPT ); Sat, 17 Sep 2022 06:32:27 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B78131236; Sat, 17 Sep 2022 03:32:25 -0700 (PDT) Received: from canpemm500004.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MV6bT3Zs5zlVm2; Sat, 17 Sep 2022 18:28:21 +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; Sat, 17 Sep 2022 18:32:22 +0800 From: Jason Yan To: , CC: , , , , , , , Jason Yan Subject: [PATCH 3/7] scsi: libsas: use ex_phy_addr_same() instead of open coded Date: Sat, 17 Sep 2022 18:43:07 +0800 Message-ID: <20220917104311.1878250-4-yanaijie@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220917104311.1878250-1-yanaijie@huawei.com> References: <20220917104311.1878250-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 ex_phy_addr_same(). 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 dbf9ffa8367c..18b008f039be 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 (ex_phy_addr_same(phy, changed_phy)) { last = false; break; } -- 2.31.1