Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp955735rwb; Mon, 26 Sep 2022 07:55:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7uYueBTAQxl4FwGm3khhzZwYEp20ANKHrXNKM1Sd82Xhom75I9VkWxleOCLukmDmvvQZq2 X-Received: by 2002:a17:90b:194a:b0:202:e6eb:4b62 with SMTP id nk10-20020a17090b194a00b00202e6eb4b62mr37694015pjb.33.1664204148089; Mon, 26 Sep 2022 07:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664204148; cv=none; d=google.com; s=arc-20160816; b=xR1Cl3KcoLHMJV5oiCnwtSz7MWbL2Z9ABAyvHy8d+xWvthV+23gmU/hYIp7O5DBzzf p/SuAT5mM0Q4G0gPYjiVQFbZXXug2iS5B93G6iEHhCeNBa4haNh9gcoH/xx+D/MvYkKD ine/nEMgdIL8IkRNE+EqRHQ+7WBZappvdj4mvXFORRcfcVerLN8puHWS1BMfYzEpPgvZ EKpWNYlyCVWFtrVZHpLlsEycM1IkyEwP4z3kIbPUoAxX5iJGc3QVSHNv4hZZvgIl5PWK LLPX1QTVWxFpHZTbIQla/2B0Jb6bXvL1uKQGTpiPRk6KXbhwmj5GlbTOCGnti45Fm5vA ipmA== 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=uqn0a1szuw2NaSBPtoJkrBa9xv7bj0SlJvqCPoykxfo=; b=dNDUHl/eiexebvKhYLKzCZxK96DweHxQegqlTLCPUP9lHwsy5zWgEVKcZalmneDz1C WY939OmrMdE3gikngCKC+zkn6/qmR0E6nWIHAqrGREtEvggORRrJjaVSFEETCiGo6gvd JI4g0SU6sAf0YKvJErDU+FFvwQJENo9uWphsSUShaEVTNUcaXzzBB+ap1n16+uMoZ3to YTAm1GNMB1fwWcm+ttL9qAwERTcOXTbvMfYrn0B/ByJiOTacz70OuJActOcc85CkLHcU HiyAOJeuBFBi6NawDAD9fdSDw+GBTmyZ4NVFzN94OlPHXB8pHrN7Z4VXMwGyVpiiIkPN NnzQ== 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 m9-20020a056a00080900b0053e5ac66c3csi21601721pfk.38.2022.09.26.07.55.07; Mon, 26 Sep 2022 07:55:48 -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 S234730AbiIZO33 (ORCPT + 99 others); Mon, 26 Sep 2022 10:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234017AbiIZO2w (ORCPT ); Mon, 26 Sep 2022 10:28:52 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDF85F8F98; Mon, 26 Sep 2022 05:41:16 -0700 (PDT) Received: from fraeml734-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Mbgr04GKwz688nT; Mon, 26 Sep 2022 19:43:28 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml734-chm.china.huawei.com (10.206.15.215) 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:44:39 +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:44:38 +0100 Message-ID: <41f4fee1-d05c-94cf-480e-4e9f6cf873bb@huawei.com> Date: Mon, 26 Sep 2022 12:44:41 +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 5/8] scsi: libsas: introduce sas address comparation helpers To: Jason Yan , , CC: , , , , , References: <20220924073455.2186805-1-yanaijie@huawei.com> <20220924073455.2186805-6-yanaijie@huawei.com> From: John Garry In-Reply-To: <20220924073455.2186805-6-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: > +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. Thanks, John > +{ > + return SAS_ADDR(p1->attached_sas_addr) == SAS_ADDR(p2->attached_sas_addr); > +} > +