Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp865862rwb; Mon, 26 Sep 2022 06:54:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7MZLz4rmlcbN7PNPM/3VmFW1qRcTyR6NfdSmUmaw1VXkBp7XXll0aoZ7IU/Qvgc2aj4MZi X-Received: by 2002:a05:6402:11d0:b0:44e:ec42:e0b8 with SMTP id j16-20020a05640211d000b0044eec42e0b8mr22403684edw.131.1664200453201; Mon, 26 Sep 2022 06:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664200453; cv=none; d=google.com; s=arc-20160816; b=k+9AoAq/k3PPbwFAaBd21kjN2SYYcp3a77YrCxz96tkKEI+7NDm/2LmnXZntz/2MbN r3Cb5MD6JwAHSsk8l/rjkcANcRnqEUxtWZgjda3KjS3AkGSQNybZUwsmObY7UF3Ajt1H WCQEiKxb4YssDYUr2nOYCtWVIwtLlLu1I5HqBPMvZq1D5/SutzG9BRqTne1f5TD4736i p5dFwsTl3ww4QsSQpuVER+X8OvFWrVDNsXnkpCmE96hLHurGJRhgJy5oaj8mvZ9hDtXV cmsMX/8u3tiozAX5CUybYqj1uaHjMAbfdTGcGn5UDx0r3qd1e8x63gBTOCgDaJoV70eh fyqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=lxLNDse8Ei0csG1NXSZK8/mJCzbf1lqzUhFTeuOtKnw=; b=qZ3kLvIDQElUgqQp6RVaCuATiEWLzd0oZLBHyETBTYz1j+GO5CokJMlBfs0D6gK5g8 rCIBTsMAJmNmrK+H6vlqM3cy/7D7DO6d2YdFgipnodhDofP/5KNFtvRiSs15+WXH6zUf cDBhGC1q0sDrWGGryEMC9FTcfUCFTz/SxzN4YpQBNmRUY3Rq8M4NK17bM9nBPG8ywZRT Vf5uPQmPh4zw6eY7QwaWgYRUs41eF0epcHCkzaPJQ4WwU6Wr5z1sY4tECCq2UAIdtFNe 6tVeorv0djd4K7KphOcarQcGoUuAC9b39s2F2JbupPrvHilfmtsSvTaO2XqnALlc1SRn tUjA== 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 s15-20020a50ab0f000000b00453e1c676c2si14892515edc.357.2022.09.26.06.53.46; Mon, 26 Sep 2022 06:54:13 -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 S235360AbiIZNQy (ORCPT + 99 others); Mon, 26 Sep 2022 09:16:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234061AbiIZNQX (ORCPT ); Mon, 26 Sep 2022 09:16:23 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA75C58DFD; Mon, 26 Sep 2022 04:44:30 -0700 (PDT) Received: from fraeml740-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Mbgk446V2z687qR; Mon, 26 Sep 2022 19:38:20 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml740-chm.china.huawei.com (10.206.15.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 26 Sep 2022 13:43:18 +0200 Received: from [10.48.156.245] (10.48.156.245) 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; Mon, 26 Sep 2022 12:43:18 +0100 Message-ID: <88299002-3aa1-d208-0451-d5b8601c0edc@huawei.com> Date: Mon, 26 Sep 2022 12:43:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2 6/8] scsi: libsas: use sas_phy_match_dev_addr() instead of open coded To: Jason Yan , , CC: , , , , , References: <20220924073455.2186805-1-yanaijie@huawei.com> <20220924073455.2186805-7-yanaijie@huawei.com> From: John Garry In-Reply-To: <20220924073455.2186805-7-yanaijie@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.48.156.245] X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 On 24/09/2022 08:34, Jason Yan wrote: > @@ -2115,8 +2109,7 @@ int sas_find_attached_phy(struct expander_device *ex_dev, > > for (phy_id = 0; phy_id < ex_dev->num_phys; phy_id++) { > phy = &ex_dev->ex_phy[phy_id]; > - if (SAS_ADDR(phy->attached_sas_addr) > - == SAS_ADDR(dev->sas_addr)) > + if (sas_phy_match_dev_addr(dev, phy)) It would be nice if the series was arranged such that sas_phy_match_dev_addr() is available when you introduce sas_phy_match_dev_addr() > return phy_id; > } Thanks, John