From patchwork Fri May 5 21:28:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Jiang X-Patchwork-Id: 90594 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp704924vqo; Fri, 5 May 2023 14:43:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6TbPHglgsbM9gGPQI5cLa6//M1Tehv2lz8m4023spHarrceEEZ+14DQp07UTu/OsmGyIyJ X-Received: by 2002:a05:6a20:9384:b0:f2:e399:b114 with SMTP id x4-20020a056a20938400b000f2e399b114mr3626919pzh.1.1683323005915; Fri, 05 May 2023 14:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683323005; cv=none; d=google.com; s=arc-20160816; b=T89fkaB08smgPs0MYg1ARIp9tkrz5UrW3od0NZ9GEmrTk4MTh2M5Za5hU8v5mOIUCp uuz6dx4gsdb6YRfTqCNGfZLrxa6sTqnpYlHyxY6AVfdH5kW2Cf3F9YUQV8Tux5BpXp53 J374HOYAnRh3wY7sotTtgyJGf4/LuLUNx1rhp9z4IeSE9f2B2jeumG+haZ1lgZlwBweD 3ZFr16b3+mV2owmDEIvUpZHwkHNwXmjLzfy+VXMbFL4CShFH96MWjCf9XckZ0vwAlg7H zqyrmCchi63lPDFCDGY5OXaYZdnjCR42hEMezmFWN4tmt20L6qHPWP7lJyoBgNdPgEae pfvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=NqIVp8fOJsjWs6+oTPbkYFEC9jeu/Xcjgi94TB1DwGo=; b=NuFTvHXH78LawpcjXjV9DfB0eSoGYsvGdb0Q5x3LiB9y59Muv9dKJnCDCrW34LOZY7 aXMFDiiq087rZPdyww7h8g39h/PSEDg1RLFdV+/KeK2qT9weqszn5CL9zB1Jjx00Ovox TRqiFEwYM+d8ct02iQqTgfvHLEa/q5lLzmnzxaCO3CGFMAWEZJYfkW1vypdLgTwUVtd9 zAKk6dM6V7tm3rc0Oa3n6pEmj46plZZbF2bUulZZ8Gdzlg0SxAwboxvSZNy7oFq+pnod NRrrhVOZ7U/vseckgQPD0dODaVbD31oai/vXKL1FlihLNnMzZAiXLsyQwerlru2jjQiV wYZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jYg9vUGS; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l184-20020a6391c1000000b00512fab8c401si2893982pge.427.2023.05.05.14.43.11; Fri, 05 May 2023 14:43:25 -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=pass header.i=@intel.com header.s=Intel header.b=jYg9vUGS; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233508AbjEEV3D (ORCPT + 99 others); Fri, 5 May 2023 17:29:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233487AbjEEV3B (ORCPT ); Fri, 5 May 2023 17:29:01 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4190F213F for ; Fri, 5 May 2023 14:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683322136; x=1714858136; h=subject:from:to:cc:date:message-id:mime-version: content-transfer-encoding; bh=ct9jA8uj0TBlJubhPsdKuhSkXFE3pWNvQDrir/VFsbw=; b=jYg9vUGSjJMdCH7D1VwHQaFyN3cUW14PJKNzm5OY+WolD6SzLIHKDSX7 UG0SL/EuK5I3AunZ8Td4atB288ZQANEDRYaqbgi+MAuNiTeAv1VoW4AvJ F239hRYM2cfKUX6UWuOEa/KH61O9YDsov806bYqQ3E14isaQOKIPBUEEk cWdqmZLhpCUaKlyvplJsySHFBvetlJr8PVC6b1YWG5MFyW7HdrUvxPs8s ok4igmhF0HitVoosK39Ki84jYx6aF5fOc41rha8Luk0n+D+wvm9mPjhAw hNoMMNsKa9cFEuL9i36m8doGZ/RXEGOEC9nxWQAHvK4PniXEIFkwaeejh w==; X-IronPort-AV: E=McAfee;i="6600,9927,10701"; a="346770402" X-IronPort-AV: E=Sophos;i="5.99,253,1677571200"; d="scan'208";a="346770402" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2023 14:28:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10701"; a="762610735" X-IronPort-AV: E=Sophos;i="5.99,253,1677571200"; d="scan'208";a="762610735" Received: from djiang5-mobl3.amr.corp.intel.com (HELO [192.168.1.177]) ([10.212.77.78]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2023 14:28:55 -0700 Subject: [PATCH] base/node: Use 'property' to identify an access parameter From: Dave Jiang To: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Cc: Dan Williams , Dan Williams , rafael@kernel.org, dan.j.williams@intel.com Date: Fri, 05 May 2023 14:28:55 -0700 Message-ID: <168332213518.2189163.18377767521423011290.stgit@djiang5-mobl3> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765092104037776987?= X-GMAIL-MSGID: =?utf-8?q?1765092104037776987?= Usage of 'attr' and 'name' in the context of a sysfs attribute definition are confusing because those read as being related to: struct attribute .name Rename 'name' to 'property' in preparation for renaming 'struct node_hmem_attr' to a more generic name that can be used in more contexts ('struct access_coordinate'), and not be confused with 'struct attribute'. Suggested-by: Dan Williams Reviewed-by: Dan Williams Signed-off-by: Dave Jiang --- drivers/base/node.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index b46db17124f3..2cada01c70da 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -162,15 +162,15 @@ static struct node_access_nodes *node_init_node_access(struct node *node, } #ifdef CONFIG_HMEM_REPORTING -#define ACCESS_ATTR(name) \ -static ssize_t name##_show(struct device *dev, \ +#define ACCESS_ATTR(property) \ +static ssize_t property##_show(struct device *dev, \ struct device_attribute *attr, \ char *buf) \ { \ return sysfs_emit(buf, "%u\n", \ - to_access_nodes(dev)->hmem_attrs.name); \ + to_access_nodes(dev)->hmem_attrs.property); \ } \ -static DEVICE_ATTR_RO(name) +static DEVICE_ATTR_RO(property) ACCESS_ATTR(read_bandwidth); ACCESS_ATTR(read_latency);