Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30147858rwd; Thu, 6 Jul 2023 01:21:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlEekzdOXW05qytTzuO8YirkcAlYELW12P5TYLn284VSpYOLzs9hZLR4kGcBKC8ekOwP8kSI X-Received: by 2002:a05:6808:1883:b0:3a3:1dbf:fee7 with SMTP id bi3-20020a056808188300b003a31dbffee7mr1147756oib.37.1688631701854; Thu, 06 Jul 2023 01:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688631701; cv=none; d=google.com; s=arc-20160816; b=n5FggckSdHOTgC5qFolSf1AzNgnFUKYLB1DuEh42Nk/1aHXyFUEBL4Hde975ara+ua D3rCUuf0VaduWETNcACK8CwUnco+sTQiKMg0DLcFR7g4BqWfLfINV3U45kZEUyqEm931 W+XxM26c90I8UT6MBFXICXhtLh547AXyG1UOCng9zXnbi4Y9pl5Gdv+JgIzt20zsyMmV WbNawcMEEwXbrAk+IHDBDmxk2oc9XUgI9gFhg4/delF6ellAt5SbdaMCawZ1ZdSy25Ya vZxF/HB8EoYEERieYNh3JGd8Fiz9K0FGy+36lqwZi442aupOr7Af1ZvWvTEGEYtcRLYe b8XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=vBag2lbJXLZ1VDEz2OvkNuHY0cCWqJkPzFeZCDz6xcc=; fh=1QW/eQCLxFKcHNeqSiEeWrwAZgs4QU1641AXDyWTKEo=; b=08Uzp06pggKzQG2mk51faoEZjb3GNg0u+QzF07ME/UG6ysQhzpPLbdSzllV+JR+uKa aJ4w0mjh96Q9eKnkvdnkqqlWnNdDElFgIrtTMR0Nm6opvUo6IGTvl2Di+LZdQq41F+Ib btjuTS1la0klQ1Uhsb/lSfXLte86HIAISvLIWtUi39VPsbjFR4vzD42nKpsacOPCnnLo EBlv71fLkMornBJnmYYBo7pAssgrPR+98Op8V4NUBTOA2MynSj+AGp2QO/DMatpRMfo/ 3wbGQ1o32SybHhgr6uXetYWkRe0KgBdDxFwsUyWKsqIswDVqHNhVyLM0vjqFIuPA/BJT tsyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ok0dZh80; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020aa78548000000b00666892d1ec3si874369pfn.360.2023.07.06.01.21.27; Thu, 06 Jul 2023 01:21:41 -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=Ok0dZh80; 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 S233818AbjGFINj (ORCPT + 99 others); Thu, 6 Jul 2023 04:13:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232731AbjGFINh (ORCPT ); Thu, 6 Jul 2023 04:13:37 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F05C21726 for ; Thu, 6 Jul 2023 01:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688631217; x=1720167217; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=9Y4RKqquLT3bLD39/xyJkPPz/58Je7W/hNpP2VEk0Fk=; b=Ok0dZh804aO8fLcgoO/xnsyI+4rESA1mGm+fpeHrQftajSdTQ68A/zD+ gIMs/Hz63flTtCb8tiGMKUdxRyI/76u1rvhzKmYcVvOxdz6HRiQQA2Ktw uyuR1wA1BA4/9RVmqZcyQSrgoIgNtpP50QnxSIPuVs4nW6Su3S7eiuQ3/ Vlvb25ObCltvXGKBDH3I0qEAe2t35Z6GU82o22CAdZ9AVPnvTwZV4G2IG rkM92upypM2wVg5qHiuZ9la5MDrAM7WHrpCoATJPP91f2052ugQ85zrV9 Ip6IWB6seYm+Yrmbz46BBLYbpanHmK5iJsH/NTaPP9+/7+kwJAGnWzctQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10762"; a="367026118" X-IronPort-AV: E=Sophos;i="6.01,185,1684825200"; d="scan'208";a="367026118" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2023 01:13:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10762"; a="789461616" X-IronPort-AV: E=Sophos;i="6.01,185,1684825200"; d="scan'208";a="789461616" Received: from jmvuilla-mobl2.ger.corp.intel.com (HELO localhost) ([10.252.41.105]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2023 01:13:32 -0700 From: Jani Nikula To: Minjie Du , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Minjie Du , Stephen Rothwell , "open list:DRM DRIVERS" , open list Cc: opensource.kernel@vivo.com Subject: Re: [PATCH v1] gpu: i915: display: Replace define function In-Reply-To: <20230706072902.4845-1-duminjie@vivo.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20230706072902.4845-1-duminjie@vivo.com> Date: Thu, 06 Jul 2023 11:13:30 +0300 Message-ID: <87fs61zcd1.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 On Thu, 06 Jul 2023, Minjie Du wrote: > Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE. The subject prefix should be "drm/i915/psr: ". Please try git log on the file to see what is commonly used. The subject should say what's being done. "Replace define function" is way too generic to be useful. Even "Prefer DEFINE_DEBUGFS_ATTRIBUTE" is better. Finally, the commit message itself should say *why*. Why are we replacing DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE? BR, Jani. > > Signed-off-by: Minjie Du > --- > drivers/gpu/drm/i915/display/intel_psr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c > index 56c17283b..822858f3e 100644 > --- a/drivers/gpu/drm/i915/display/intel_psr.c > +++ b/drivers/gpu/drm/i915/display/intel_psr.c > @@ -2998,7 +2998,7 @@ i915_edp_psr_debug_get(void *data, u64 *val) > return -ENODEV; > } > > -DEFINE_SIMPLE_ATTRIBUTE(i915_edp_psr_debug_fops, > +DEFINE_DEBUGFS_ATTRIBUTE(i915_edp_psr_debug_fops, > i915_edp_psr_debug_get, i915_edp_psr_debug_set, > "%llu\n"); -- Jani Nikula, Intel Open Source Graphics Center