Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp509960lqt; Thu, 6 Jun 2024 09:46:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMxvVfRw1cKy2qSscNB62RAVEcrpLhKspQWJBcvHreF4uPcBY23ceU2PSy0IDt5HCRV4lPAdvzva/9M3YemnK/SzzsFU4Zv+O7P1N7EA== X-Google-Smtp-Source: AGHT+IFJ6cugPpIm1enUsQIve0R2t+HBn4o/5lBx/I5ZkXuHPatc9frMRO6X5nEFo4qlOQHp/9cV X-Received: by 2002:a05:6300:8088:b0:1af:acd5:b462 with SMTP id adf61e73a8af0-1b2f9c8a7dbmr42460637.50.1717692381646; Thu, 06 Jun 2024 09:46:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717692381; cv=pass; d=google.com; s=arc-20160816; b=KtMJHd/1NY3uy+DxjMDmnX1x91qaRz/YpeEItG4EfY4qIb6MxVlG2xia8+iBZrb4tA 9wnuw3fxzJOnSUy0r8a9dCQUB8jJawjbLWnVg0nARAm7IUwqMKvSLPGy4vDkj56GFp5U yKvwrdtcWfiLC+UobWhxkRKXyQK4sxth5P7KQWPgfm0mBdomA3HeB0j92N6OhPejDeMc fgEIdFL4UYptFM9+5gewlUk6WAKWHTQtMlrryMfFb9uab/bmWn8BTZzQPQ4Ul6VBlVDl t5rzL5DZR/NB/FsKqr0pA5hvHpghu3eGrkCr+go1UC+qyUz525uEPy7/LdkzQLQFBeJ4 azPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=6PxcFEgs2yD8q4pwEs8S73qd2jiKrNVFkVtUiRXcNRs=; fh=HB1J+cdPXXcM4ux3otbKtLzAMwg1NtysE+oEeIWTzdo=; b=nnfAnSNelZ2aP4usf9bclfa7hasH6VGU5cmJQ/k8F+nX94xtin5sKZ26g6dGOfZz9L uzLhA6MZK5r7AdPIUUDzENF6G3mPsxUa6qiG76oezcwErtFxihiGNZOVuZB+TlH1q/TD WASzsFy5/5bZX07KZQx/Nw08npJ1Px3J49HSoXCuyJn5o1anqGa/vgbp3hVsQ62hfMlH 7XXI8sNM82GGBgga29JA1NOH50RA53/auIqW/jBx4mKyAteRXA+ikC/mzlBEBVElrbpM H6DGgSz0Ktpt8r0IoYORIM7w223K6apftkutD4lWe9wlB0n7HEnHdRw7HkL9D/U04Pez Z/HA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A4yAHgot; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-204631-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de28957497si1422726a12.610.2024.06.06.09.46.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 09:46:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204631-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A4yAHgot; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-204631-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D6CC2B2B4CF for ; Thu, 6 Jun 2024 15:59:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AEA9D197A75; Thu, 6 Jun 2024 15:59:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="A4yAHgot" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 EB04213C690; Thu, 6 Jun 2024 15:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717689559; cv=none; b=IoxMvn2+iNy5lRttPFAfM9opFpmzqCJKFo1QGQqCZQIywTnqBhUJ85rP2/w8doCtJ3GHOVLAKCxE0WuT6CceVw0LxadmU4tfHSYYKIsweE2cxRHGMSQ+M94iq+EQ2z7y9qZ7Pr6qIzpeoXvQIbL3aszBWwrI/00mvE6ayHKhbBM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717689559; c=relaxed/simple; bh=iqq/X15Hld5HWTihI8ZbQsjQV9XWsw2ETmVkWvF4SBE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LK+gIE4s+he+j5hm7vpxTPez0bZh0Zi7Uhy3eMx6BVWE0nbV3wVp6+w2FtCPNAjqINIZ+tVPuTuuaJO769xTUfzs+2g0yL4PdzN+Mz0wejOZcgp60ULTgQcyG7Uo+fu9m6okXEA4gXOIfPt1z4LTA7WbZDri5bMRStzNIueeHzc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=A4yAHgot; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717689558; x=1749225558; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=iqq/X15Hld5HWTihI8ZbQsjQV9XWsw2ETmVkWvF4SBE=; b=A4yAHgotXyBwEpNFeFVx0eR3GvBn1gNWcyLvh5uamepWgWyGWbxipxu9 b468H87Ji2IS7wexhZC5w6bF6dqEHTRzIf3I4c/PPNa+7PAH+kV30OI8h Vgp0Z14OuHxchbSV53QlTRE+6Fi3ylddyyyNzptLZ54ldVXTlZ56dD1es FxkDT/Mj0ZP1RhZlV5cbU8GviGi1nqa5q2QqwLcpx0iYCrrnutKHfLLbC 3pO7ajLGHLlmgZpci7HhAbPQ1HupoN1E4ozimZsIaXL1UVwGPlIJaz/Ma IHwnOA70Ge3AwElAiFmfRSdz0E0aBYaAWqdX1vdOLHMw3ujhdAvQDHfZP g==; X-CSE-ConnectionGUID: 44p6bXD1TTGqmbL2Mg9OcQ== X-CSE-MsgGUID: fZ2DJJzBRmqBg2VVfLANzg== X-IronPort-AV: E=McAfee;i="6600,9927,11095"; a="31866612" X-IronPort-AV: E=Sophos;i="6.08,219,1712646000"; d="scan'208";a="31866612" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2024 08:59:17 -0700 X-CSE-ConnectionGUID: l3igcPGLRcOTpGBJDCR8HQ== X-CSE-MsgGUID: ilwo1/p1R5epsYFiM7/Mvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,219,1712646000"; d="scan'208";a="42472612" Received: from mgoodin-mobl2.amr.corp.intel.com (HELO [10.125.109.168]) ([10.125.109.168]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2024 08:59:17 -0700 Message-ID: <7ad9261c-115b-451d-9b93-832f98124116@intel.com> Date: Thu, 6 Jun 2024 08:59:15 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] acpi,hmat: Use ACCESS_COORDINATE_CPU when appropriate To: Huang Ying , "Rafael J . Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , Dan Williams , Bharata B Rao , Alistair Popple , "Aneesh Kumar K . V" References: <20240606022845.189710-1-ying.huang@intel.com> Content-Language: en-US From: Dave Jiang In-Reply-To: <20240606022845.189710-1-ying.huang@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/5/24 7:28 PM, 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 Thanks for this. Looks like I missed a few. Reviewed-by: Dave Jiang > --- > 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;