Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp347308rwb; Mon, 26 Sep 2022 20:26:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6RrMCj8vo+inrIopwfVm/FdPxbNzjzNA+5e06QZSEtQCSVJo/9qfm2gXNEdsoU4C0VlLk2 X-Received: by 2002:a05:6402:2789:b0:451:a578:74dd with SMTP id b9-20020a056402278900b00451a57874ddmr25400441ede.72.1664249174356; Mon, 26 Sep 2022 20:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664249174; cv=none; d=google.com; s=arc-20160816; b=AMuVh2bEOL0TFPLvJqkdqB1+ZKtl/+Xso9tXZ23jnTQQXwh0oYoyAYANHBpBNbzI8P Mpc5EBGFIlepsMsLfadpE4v1blNiPKZKZytFpkNkYsCFRegpu4vYxh+d8azVXQhKVqTO a1gKZqxz21gzTBPEErFfyYd6CI7OXRlkntCHfRpvoR9GGfsk4xJlCh0SzZDmWBZdnTT4 RRs+8Wv1Z9tHqfdsGTY3UJa84AG+URsJUnZnnq8z7WBtC6B18D5qSvUiEvYHIqvFf7BZ wFval8Ff4DIKTwi8EWVgCQyxhhYdHWcrymilb1TjPwmtfRQXu29rM38vWQNZxZ4YYn2E GAjg== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature :wdcironportexception:ironport-sdr:ironport-sdr:dkim-signature; bh=GT7geRZ2rFu/wpdkPFVNuxOEo1Q7xRPXXEJkV6IG/Xk=; b=q6ZHp/RGovl0/Ugav5PGoZRYr5d0Sm8Mrl2QsfsAoyVqoZ9/MSpRa9+WXy4gycLzQ7 I6yyAFEwZoA5JMooeffN4/JFjB1obBeonGwttabTLSkeC/1Um44E0N68cvKoe9IHesoP DeTbJXGcEJYS/NluU9FgIw79VlITwuwLPKJNIYUqzXE3X3OhhyBdZ5oI9jU5vpvaR+IT bIIqlB98sPQPKH7XYXbeQLfslFRRveGJIc6qfXc2a+IOrD+jysEFpn6t5Am8YMvbGazN sVALHYBhZfNoNLW8L/E9Q/Yc6V3xn++wBF/i8bgh8vh4Pc8QpXzMS4kuioYg2pfUZHIz ZQjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=ZEqebWDC; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=KVCh2SyQ; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a1709067d4c00b007316843d58bsi67929ejp.925.2022.09.26.20.25.49; Mon, 26 Sep 2022 20:26:14 -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; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=ZEqebWDC; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=KVCh2SyQ; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230195AbiI0CcV (ORCPT + 99 others); Mon, 26 Sep 2022 22:32:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbiI0CcO (ORCPT ); Mon, 26 Sep 2022 22:32:14 -0400 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09FE3E4DA9 for ; Mon, 26 Sep 2022 19:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1664245932; x=1695781932; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=uJlTkEEruO+4B+/IkDjfWJ48o9FBDv2KefDND1Ujq5g=; b=ZEqebWDCPNFMk/W4GCU/CIXS6ABQHmuqhxLbu4Sqe5yt1iZTN9gWmxNr +33LNjt/juIcy2vvSnIujsVyQM4DvQy6bS9XvIJQDLr6onFBULsle2zca cBN/KXQRJOv62yAASy3HN4S1nrvz7+GwlgKp14brm+/0D1y3hjeW7krp/ 0cOVHJQFJeY/NFWQG4PcJufGNqY0fsMRdeByJOxnby8+VTAuLWUuZ3Zdx rnAqS0pSt05o2tge9DybwFwFqI3doNXxdFZ+yZDXMSE3hLyVLX2TGuiY1 kUL7va4xMaVK1Y2Ia4+WsJkifxpNqEQ8u2OcuD2U9gRTS2VS4ot1bz8TM g==; X-IronPort-AV: E=Sophos;i="5.93,347,1654531200"; d="scan'208";a="210705105" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 27 Sep 2022 10:32:08 +0800 IronPort-SDR: UtbRCdRjQT1C8httVhxNtQeMQ9Z584IlD8WUIhJN1HPYE6i4ZCEV3V0m+euIJ7+0j2D2B5+3li XGqDRxadG28DV8n/eKe9CkatK9dxCnz6WXAt/quS6+C6OanZYdiicNiJujCSChMVQztp+OsKoy HY/SzfVDAlPOuHQNejhpjt+zFnZT1WNFT3txMjRhNdrTth517DRUoMyvXE+rogqFzRD/ZUzi++ ZTbjXCu7sv2VZrac8YjNr8yzSOMaS9qdQnjO8Vas3hGJIOOQ9hgHniTcW38xEnGa4Yb+4G0Beq wSSDhUpA3XTmJbawxDuT496m Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 26 Sep 2022 18:46:33 -0700 IronPort-SDR: PC2h09zRyANGEJE0B0GzAQHUGy48EKe0lVkECi6KdjGQnBzRWcrpj2dIrpCC8kjxxcLV4ejHzS 6uDBhId6YRloepNZcUv/n/XlX/aCgFtxx05JudnaGtL4ragI8X4OD3M0JFD20iEjw/JhEi4VBs VMYfJs/Dy9X4iRAeq3dIRdG/IYMByVspbKHx6kMk8MYB423sg2Ekkw8WgQMKcYKIArWC1ZRDm3 bo5VjTfErsoABWXJo+ttib/GNfJV1E1nOlnKPVwXgWQPArqm0qmzL12P/lOjtvgr5cr4TeLs5r 5mk= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 26 Sep 2022 19:32:08 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4Mc3YM4fjHz1RwvT for ; Mon, 26 Sep 2022 19:32:07 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1664245926; x=1666837927; bh=uJlTkEEruO+4B+/IkDjfWJ48o9FBDv2KefD ND1Ujq5g=; b=KVCh2SyQwM/mILMTWMFKyXTo4slhR6mNor1qTp/Zmwb9lIl1kJz HEsmkivvZ4h3nu9xJSOOIoV+vQ7+EYjL0JRhP47DY592d3HGTPym2ctGv7i4ja5c z5J/tRhJp4IAFGIrcGEPeIMKbG6nx6EtT4skz3IpD5tqRcmuiv5bRvISGYay9stZ t/pQDnC3DiDkgwOESqjxO3fTpqSlA56+7ROdoVpah0oSunQIng+hXf7PdROIuRjM U1S91gTUl+v7sWoFYy5S28quNWYWGjUsfhl8UfuF/Acy62aQjfCaU0cWgvjlUcHr Cpb5Wrrc9OjtzKvvvyCJV/1+waLjqYqUBxw== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IyDpVQfW-Osh for ; Mon, 26 Sep 2022 19:32:06 -0700 (PDT) Received: from [10.225.163.91] (unknown [10.225.163.91]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4Mc3YK35Vpz1RvLy; Mon, 26 Sep 2022 19:32:05 -0700 (PDT) Message-ID: <654fe6d2-4556-8d15-bacc-b6ee1e927d91@opensource.wdc.com> Date: Tue, 27 Sep 2022 11:32:04 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v3 8/8] scsi: libsas: use sas_phy_match_port_addr() instead of open coded Content-Language: en-US To: Jason Yan , martin.petersen@oracle.com, jejb@linux.ibm.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, hare@suse.com, hch@lst.de, bvanassche@acm.org, john.garry@huawei.com, jinpu.wang@cloud.ionos.com References: <20220927022941.4029476-1-yanaijie@huawei.com> <20220927022941.4029476-9-yanaijie@huawei.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20220927022941.4029476-9-yanaijie@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 9/27/22 11:29, Jason Yan wrote: > The sas address comparation of asd_sas_port and expander phy is open > coded. Now we can replace it with sas_phy_match_port_addr(). Comparison typo again. > > Signed-off-by: Jason Yan With that fixed, Reviewed-by: Damien Le Moal > --- > 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 f268291b7584..eabc56966f36 100644 > --- a/drivers/scsi/libsas/sas_expander.c > +++ b/drivers/scsi/libsas/sas_expander.c > @@ -1005,8 +1005,7 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) > } > > /* Parent and domain coherency */ > - if (!dev->parent && (SAS_ADDR(ex_phy->attached_sas_addr) == > - SAS_ADDR(dev->port->sas_addr))) { > + if (!dev->parent && sas_phy_match_port_addr(dev->port, ex_phy)) { > sas_add_parent_port(dev, phy_id); > return 0; > } -- Damien Le Moal Western Digital Research