Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp953600rwb; Mon, 26 Sep 2022 07:54:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ZbqXAnTcU3BwYFOXgaVURfM3Zql+FKyCkCtgYMRWeUYzcWyhBpNjRlWFtfbwZL1Q93sDA X-Received: by 2002:a05:6402:4009:b0:457:14b:8ce4 with SMTP id d9-20020a056402400900b00457014b8ce4mr11989438eda.332.1664204052404; Mon, 26 Sep 2022 07:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664204052; cv=none; d=google.com; s=arc-20160816; b=zvt15SYvR3cZLYpnoUHPdiI+uONdi+8IUYDwFhttWpkUnqKxPXZOyAWSlyMLVNEV39 BAydE0CsCYUjtBj0j1A/ABr0bzP1zRddU7070Jch3Tca8ECj3/jxn2cV+ob5iNenyyAK CrgXD42jlFEsAGS3qoZGn6v/K2qtXKh97FAi4P0idOz0+CxgV1R899lnvjGX+yJW/60S R3ktCoT+lL4R0UfOeD71jfrCQ2mT+7rZ5BocMLNTUthi4ksL7UmYVc0OiTrYN98PTXFt UP3iBFn8uwiPtd7zhY+EeiZ2PlL/VLlp0x/GP0RieLlXy4hvP6V2qed53cyPJi18Njtm TCwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=DE0TGHPsAefnKYVBxPnFusMyZcghPk5SgQ3gCkIYYjg=; b=y63pv9+uWTifnxq5rqWMJ7b4uR7VCRdaRcanoanagSAQLE4gAhM2PyQ8jXI3YstWas oC24B4FL8ECMchvblRX75fbEH1tpPpbns6H4UD2DWS3ujAoTj18/CilBh55DWfnuRYSE 4dSZ70BN/D+0jJu+3yvlVLePqmW+XwfnP3UXpttjUpgFMPyytaMq/dmo5CYklwKgK2BV Yu8l9RiMbt+S+x4L1IHohfwgEmUM4a7fxQeF02U2nNL+CSpKT9K/1sUxnIbzjymSxnrs f0PSVa/8/lizDBPP3cxrsCTTeMM2r3kPIL2d08LQ/6FmS8LRLPMxnNhupjV7n2mMTMcL /VNQ== 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 x26-20020aa7d39a000000b0045779fb144esi361835edq.57.2022.09.26.07.53.25; Mon, 26 Sep 2022 07:54:12 -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 S234578AbiIZOIf (ORCPT + 99 others); Mon, 26 Sep 2022 10:08:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234617AbiIZOIH (ORCPT ); Mon, 26 Sep 2022 10:08:07 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 506988C467; Mon, 26 Sep 2022 05:19:05 -0700 (PDT) Received: from canpemm500004.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MbhWs67BBz1P74g; Mon, 26 Sep 2022 20:14:33 +0800 (CST) Received: from [10.174.179.14] (10.174.179.14) 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; Mon, 26 Sep 2022 20:18:46 +0800 Subject: Re: [PATCH v2 6/8] scsi: libsas: use sas_phy_match_dev_addr() instead of open coded To: John Garry , , CC: , , , , , References: <20220924073455.2186805-1-yanaijie@huawei.com> <20220924073455.2186805-7-yanaijie@huawei.com> <88299002-3aa1-d208-0451-d5b8601c0edc@huawei.com> From: Jason Yan Message-ID: <8b0f76b2-d65f-2faf-a6e0-3623a71c18f5@huawei.com> Date: Mon, 26 Sep 2022 20:18:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <88299002-3aa1-d208-0451-d5b8601c0edc@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.14] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500004.china.huawei.com (7.192.104.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 On 2022/9/26 19:43, John Garry wrote: > 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() I assume you mean sas_phy_match_dev_addr() should available before introducing sas_find_attached_phy(). Yes, I can make that change. Thanks, Jason > >>               return phy_id; >>       } > > Thanks, > John > .