From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 548E3C433E0 for ; Thu, 7 Jan 2021 22:30:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11710235FD for ; Thu, 7 Jan 2021 22:30:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728799AbhAGWaD (ORCPT ); Thu, 7 Jan 2021 17:30:03 -0500 Received: from mga14.intel.com ([192.55.52.115]:12757 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727865AbhAGWaD (ORCPT ); Thu, 7 Jan 2021 17:30:03 -0500 IronPort-SDR: UfuOZDwrtAm8+/FTa+YphTnwqo+wQz9/kqYxdAMlCyMyr44o4cS88LwxeuGTk4SEIFUAbj93PV CpF5BpY4J6QA== X-IronPort-AV: E=McAfee;i="6000,8403,9857"; a="176728705" X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="176728705" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 14:29:16 -0800 IronPort-SDR: GzC942YKdS29oUlMaYhhxheHOEXQ50ohrsnXrMzcAUig5MAMgCsJiGcXO3bGdcBXVnhOsvxdi8 5u6Vv0DHV53Q== X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="566279705" Received: from rchatre-mobl3.amr.corp.intel.com (HELO [10.212.132.29]) ([10.212.132.29]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 14:29:15 -0800 Subject: Re: [PATCH] x86/kernel/cpu/resctrl: replace 'of->kn->priv' with of_rft() To: zhouchuangao , fenghua.yu@intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, zhouchuangao References: <1609758533-14337-1-git-send-email-zhouchuangao@xiaomi.com> From: Reinette Chatre Message-ID: <614d7092-6234-a8e1-456a-752dcbf23f4f@intel.com> Date: Thu, 7 Jan 2021 14:29:14 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <1609758533-14337-1-git-send-email-zhouchuangao@xiaomi.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 1/4/2021 3:08 AM, zhouchuangao wrote: > The use of 'of->kn->priv' to get rftype can be found in several > places in arch/x86/kernel/cpu/resctrl/rdtgroup.c, which may reduce > readability. > > So replace the direct use 'of->kn->priv' with inline function > of_rft(), which is more readable. Readability can be subjective. The current assignment appears succinct and in my opinion the additional layer of indirection does not improve the readability. Reinette