Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp245375lqt; Thu, 6 Jun 2024 02:15:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmoX2k3X1ZMur1tpOCQI0VChbq1hQFDIrm07za0j/RRsljW218DyMvmYspQhit1g7wREWI8G2XZhxT9N413YgADBRPEWDrDb+4z2Jplg== X-Google-Smtp-Source: AGHT+IGQ2GyLYvknP/ZUkwXJKGaAl5oGmC/MgLe180+vr0uaIWKB84UudUcu+0JJWXanvNfEbbLS X-Received: by 2002:a05:6a20:841b:b0:1af:fe9e:5e43 with SMTP id adf61e73a8af0-1b2b6e5ab8cmr5610730637.11.1717665303132; Thu, 06 Jun 2024 02:15:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717665303; cv=pass; d=google.com; s=arc-20160816; b=Vy9QZMFzBj38kr4sO3baxksAxzuEnMka37wMtY4NFyfbaU8nnOEsohysRQzHGH8RkR e3aiSp7BO+dR/Uf3b270TXoRR2Y1xdlV3/+i9B4ZVOJB1dg8pkWUkGuDlpcD+O4j1Wmt fsXZSeKy1KlhbWVhrQuVD09JjCPV43f9O3qAUo/trAQ7IS1TXoC8FrMmGV7IMXUAsxHQ cNdWrVmWt7hRzCKkXrq3c9ffbCkjC46AKKE6MG7+hZv3d+ug9HjvphTYUZRvpDm5opjn /PnhE/c3FGEonXmMjInp2ZH0jM8U/70JrRpOn5x6fXuz9LAKJ2O8kLIQu65S2FSGAWH3 2tTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=AE8E6PmxDlcDTdyiCg2XGHvcDksJIDFrJLMFg8Gv70k=; fh=T7vIDmlRvaIIGnRgj7tHdAQ8S6H1ns++cKXuuRiuciI=; b=mZe74PpNDoYbeuerruKEg6ievKCuXdxBAh/2NTWgS5wJDSk6293t1dZ1JRovYU+55A SeI2aLRDawggagegMKe2MIbNSKNuQp9S/9Z/KGEOgs2VCQOwNHifUMyk3uwOfJpHll2I ez7eljq0kJgzKOu2MFZFdTKPdiKHj8cRoEBVuEPoUd+7O3hlr5FAbbcEw14CP/ipBqC4 Xxk0vdNrwxj9Hx3sJjcnwJpDHMPKgHxNSSYO7vtgQWius6QU4UcWK52QeR4ZrrEX2sIH U1NWCtZaL2vukhPMfzcr4H8pa0E/N3I+IjNjkkMPqsDIMTNjuusgJYYzPwownsiv6c63 LE8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-203945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd81e0c6si8228495ad.552.2024.06.06.02.15.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 02:15:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-203945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4BE43287935 for ; Thu, 6 Jun 2024 09:12:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 249E213E3FD; Thu, 6 Jun 2024 09:03:51 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6857413E051; Thu, 6 Jun 2024 09:03:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717664630; cv=none; b=Exy+E+/jE4DVVDSgkJC2M68PsL2U+CiORoCT0uDeWpvQ3iTcH3Hi84TWQ1WeBhGI6d99wGrD34ZkWseVeBQCsLTwppelf1JYuBlMcv97fvEx+U7pPEdwoCEZpsLTELudlIfq4x4cEReH4qwoMGsaUlPHKdhUfhPw1wp0qQ32TCA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717664630; c=relaxed/simple; bh=2zYvUiFXb9ziA9s/CGnzNXB/lGHZdt5gQLZKHADzUqk=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sIV6a2S6RxfVrc8YAC4vuKwu81eGvtALvi68bnb8Q+E9Z85I9LC2Oe448vfRMBAvwBZoX665nTenUEU4AweJ5UADdGpfSSAlraLgZwhl2YzIFR8XfNByuMN5nPh5B1YFBIHPuMiVJ7yawTbFmzJGaDslrSogecdcFoSV6w75BbA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Vvyv05TkPz6JBZ1; Thu, 6 Jun 2024 16:59:24 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 8A07B1408F9; Thu, 6 Jun 2024 17:03:45 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 6 Jun 2024 10:03:44 +0100 Date: Thu, 6 Jun 2024 10:03:43 +0100 From: Jonathan Cameron To: Huang Ying CC: "Rafael J . Wysocki" , , , Dave Jiang , "Dan Williams" , Bharata B Rao , Alistair Popple , "Aneesh Kumar K . V" Subject: Re: [PATCH] acpi,hmat: Use ACCESS_COORDINATE_CPU when appropriate Message-ID: <20240606100343.000075ea@Huawei.com> In-Reply-To: <20240606022845.189710-1-ying.huang@intel.com> References: <20240606022845.189710-1-ying.huang@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100002.china.huawei.com (7.191.160.241) To lhrpeml500005.china.huawei.com (7.191.163.240) On Thu, 6 Jun 2024 10:28:45 +0800 Huang Ying wrote: > To improve the readability of the code via replacing the magic number > "1" with ACCESS_COORDINATE_CPU when appropriate. No functionality > change. > > Signed-off-by: "Huang, Ying" > Cc: Jonathan Cameron > Cc: Dave Jiang > Cc: Dan Williams > Cc: Bharata B Rao > Cc: Alistair Popple > Cc: Aneesh Kumar K.V Good to clean this up. Thanks! Reviewed-by: Jonathan Cameron > --- > drivers/acpi/numa/hmat.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c > index 2c8ccc91ebe6..febd9e51350b 100644 > --- a/drivers/acpi/numa/hmat.c > +++ b/drivers/acpi/numa/hmat.c > @@ -408,7 +408,7 @@ static __init void hmat_update_target(unsigned int tgt_pxm, unsigned int init_px > if (target && target->processor_pxm == init_pxm) { > hmat_update_target_access(target, type, value, > ACCESS_COORDINATE_LOCAL); > - /* If the node has a CPU, update access 1 */ > + /* If the node has a CPU, update access ACCESS_COORDINATE_CPU */ > if (node_state(pxm_to_node(init_pxm), N_CPU)) > hmat_update_target_access(target, type, value, > ACCESS_COORDINATE_CPU); > @@ -948,7 +948,7 @@ static int hmat_set_default_dram_perf(void) > target = find_mem_target(pxm); > if (!target) > continue; > - attrs = &target->coord[1]; > + attrs = &target->coord[ACCESS_COORDINATE_CPU]; > rc = mt_set_default_dram_perf(nid, attrs, "ACPI HMAT"); > if (rc) > return rc; > @@ -975,7 +975,7 @@ static int hmat_calculate_adistance(struct notifier_block *self, > hmat_update_target_attrs(target, p_nodes, ACCESS_COORDINATE_CPU); > mutex_unlock(&target_lock); > > - perf = &target->coord[1]; > + perf = &target->coord[ACCESS_COORDINATE_CPU]; > > if (mt_perf_to_adistance(perf, adist)) > return NOTIFY_OK;