Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp905928rwb; Mon, 26 Sep 2022 07:19:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6e+cAMwZj6XkXyWzZLq3/XyEcTXRm4AcBY5WNj9tB0fQGts1VB1ICScpA2qJfc8blpPI4M X-Received: by 2002:a05:6a00:b8d:b0:545:e7de:78e5 with SMTP id g13-20020a056a000b8d00b00545e7de78e5mr24075619pfj.72.1664201980227; Mon, 26 Sep 2022 07:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664201980; cv=none; d=google.com; s=arc-20160816; b=mo37Am6B8v5ILuZSboE0Ldex8DsOwgm1LmGlOquStK12mGHjYHEQEskVIdV5nJi5Pd 7OAJDPzCGrF6ueBO4GpCJYT3aknilc1yqS+2aJoscL+GeALosWzclwKzEbE860ILuokM I4J7xPLflrDf06+WwBTUlVMwUkGftjoQH5Q7v4tBX5ySC8iRhOA0oorA3nVhDixAd2PX 1JC2Gv7xp9Iv+I8pvZcIEyJtzQqGToibKg3eoDe26BzdpYK5+SWsRs1QlF4YvJ4cYdVG RjcjRNiZ0LzyS291eCVcdza4/myKj/2LoiiPT2ksBRaxm8UbOM1mPvvGCjm2AtwjZ0Yz Obkg== 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=ZGA0+vd/Y9WTW2+g3PWocapSge2qMiLawGZJNC8QSkg=; b=NFC8Veoaa4dKSR+vmCqsYzLY+vQCwbX2hW1bKIH/RfP4IhImwXHZVfSFF7uYuAS2LJ akak431V3mmvQEbS2rTuYIe6HtE3J5lBcjKT7ElgfyqZydA86ocs3kBNvN5CKvid+0Mo mx8PfZU94l/w+c599txqKTSa8dLpBZ0/s53yJVPW83As/kvWBLF5qyNEoioq6WC/UUPK 96om9vev4+AFwgSX8+WTN43kd5GVzHkM37RFIW2JM1KXpJ/u261nk78rohMcpUh0ZjtS 1/GMFI9qWdUgLP0/PHOuOSioRC8VH6oENHeNZpkKVLD4vwO7H50TzX/JMovTM3hytd9q 61WA== 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 u5-20020a17090a450500b00202c19e9d74si10744518pjg.83.2022.09.26.07.19.25; Mon, 26 Sep 2022 07:19:40 -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 S234223AbiIZOEu (ORCPT + 99 others); Mon, 26 Sep 2022 10:04:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbiIZOEW (ORCPT ); Mon, 26 Sep 2022 10:04:22 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90E9E4DB76; Mon, 26 Sep 2022 05:16:37 -0700 (PDT) Received: from canpemm500004.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MbhVz3l9nzHqJf; Mon, 26 Sep 2022 20:13:47 +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:16:02 +0800 Subject: Re: [PATCH v2 5/8] scsi: libsas: introduce sas address comparation helpers To: John Garry , , CC: , , , , , References: <20220924073455.2186805-1-yanaijie@huawei.com> <20220924073455.2186805-6-yanaijie@huawei.com> <41f4fee1-d05c-94cf-480e-4e9f6cf873bb@huawei.com> From: Jason Yan Message-ID: Date: Mon, 26 Sep 2022 20:16:01 +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: <41f4fee1-d05c-94cf-480e-4e9f6cf873bb@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: 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=-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:44, John Garry wrote: > On 24/09/2022 08:34, Jason Yan wrote: >> +static inline bool sas_phy_match_dev_addr(struct domain_device *dev, >> +                     struct ex_phy *phy) >> +{ >> +    return SAS_ADDR(dev->sas_addr) == SAS_ADDR(phy->attached_sas_addr); >> +} >> + >> +static inline bool sas_phy_match_port_addr(struct asd_sas_port *port, >> +                       struct ex_phy *phy) >> +{ >> +    return SAS_ADDR(port->sas_addr) == SAS_ADDR(phy->attached_sas_addr); >> +} >> + >> +static inline bool sas_phy_addr_same(struct ex_phy *p1, struct ex_phy >> *p2) > > nit: please use "match" or "same" consistently in the naming. My > preference was for "match" to be used. > OK. Thanks, Jason > Thanks, > John > >> +{ >> +    return  SAS_ADDR(p1->attached_sas_addr) == >> SAS_ADDR(p2->attached_sas_addr); >> +} >> + > > .