Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp303232lqt; Thu, 6 Jun 2024 04:19:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV0kvKHq4RnHapLTLXx6Tvhjx3C4O7TK9aFwoFDBc568iQeKIlDP2dzVfxD5S/9t1R+B0oN7k6w5alU9sfu3C+DMLGKFIdPq9CIjCW3yw== X-Google-Smtp-Source: AGHT+IF8iZTHSZYBbH3kr4rRsDeR2/2c58HsUxePtnvPSg/olA9J17gE3e8AxGAHeZb2NSnqdepC X-Received: by 2002:a50:d019:0:b0:57a:2817:477b with SMTP id 4fb4d7f45d1cf-57a8b6f7a0amr4160004a12.22.1717672742157; Thu, 06 Jun 2024 04:19:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717672742; cv=pass; d=google.com; s=arc-20160816; b=BMgad08q7sP07dTC+5VDr0m9QkRPH5iw8n9GsqDaw6MxPIOFnoveVAXF4cTWdQ+g8o aPl2rgnaiPDaJqiCWpgyNXIMw23m+9HU86oTjxC+iDzGl1wqwJ258JcmkqpNZOPAc+e4 dgtj4laOPW1q5OU6bigPFtUCxBW9XNqgZV2eJluC4ex5InQ20roCPq4tv96H3uG2K6fO 1yJskF3LDCcfD9xiE/Oh3hJ05Q0Zyy4EjiIWUkLvgfC+B5J5jXZtQV/nh7TUMDKsILOM ERO2PxwfsrQ4p1mDn8wDWTpgwKiqxhT1yDh+MjysgCp5UJUN3d4+YelI9A/CN/zcw9zH +lJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=AwncMjt4aMvfIhJoSQC5zTR3pXgfAzdEq/545uNx2BU=; fh=+GmelIkesmmWRLBNtwkYz3UghxyVtR3nAjbWaTYBy5E=; b=h25mig4PV4F5Hdogttv9X6on0WG+EjcsAUiz0QAaMx08AIfEqaPhZEyKWK3PSP7Plr 2J+TWW0/lc46IGHRRNt8BRnImLNEpQyfOeGquYa1XLWm4qTap/OFX+UHJDtJ2yulxJg4 GlEdaWrGJQNgx2r/DVBeANiUxjQGoiJAllYx61OoHtmXOv01JU7H+F8yWOFeI801DMl/ zCTIBnKA5oHtV/edaOMS4yuXDh4Djmwp9xRKt7ThaPXKPkuHoONkPl2QOiuK5YpFBJVE fTvFY698vwrdj+mycKrJNrNU9B7KYQjKcXYVs1Mw8Ot04WdLp4Ttk9gXOFHt9dHatLIp JjbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-204166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204166-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae28e117si599600a12.672.2024.06.06.04.19.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 04:19:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-204166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204166-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 am.mirrors.kernel.org (Postfix) with ESMTPS id DBB8B1F234E8 for ; Thu, 6 Jun 2024 11:19:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 877D0195395; Thu, 6 Jun 2024 11:18:55 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55EB7153585 for ; Thu, 6 Jun 2024 11:18:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717672735; cv=none; b=Dgco7KDeh0j9/q+LveXfOEN7C69PFZ+p25FZH0BewieBXz/Lt5XLzYQ2BGHkw0wHHb0WOiFIX9+kNwImw2qEtq4k4Kg557A+dnB9CwIUQhF0us6M7bMlVA0MqdNeWQCkikWxjd6caLafROT6B2WlomTmgzUDtVqE5GHTLEQ03xs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717672735; c=relaxed/simple; bh=7jev0F1MNj88ehg7RxQ/SzvgEtu1Ajfuk8eCFTpmozM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QlqFeKbtmk0KNMswaqVkRjqC2lVBYUCVdNrpo9on5D6YyKALLLoJyew3nchYlBxxqyt7H3fdfxqeVkOYBY7QOwsRW6O53RLSfwBHru2xts28aIMV0TJG7oaTYd9ZfDuXZ/+BVJlZpcbwWFWOedBOVUSgsNw4XNM1rLQTLltIS+M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0D3571576 for ; Thu, 6 Jun 2024 04:19:17 -0700 (PDT) Received: from e110455-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 59BC73F762 for ; Thu, 6 Jun 2024 04:18:52 -0700 (PDT) Date: Thu, 6 Jun 2024 12:18:43 +0100 From: Liviu Dudau To: Jani Nikula Cc: pengfuyuan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, k2ci Subject: Re: [PATCH] arm/komeda: Compile DEFINE_SHOW_ATTRIBUTE() only when CONFIG_DEBUG_FS is enabled Message-ID: References: <20240606075846.1307007-1-pengfuyuan@kylinos.cn> <87ed9abhxx.fsf@intel.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87ed9abhxx.fsf@intel.com> On Thu, Jun 06, 2024 at 11:20:58AM +0300, Jani Nikula wrote: > On Thu, 06 Jun 2024, pengfuyuan wrote: > > We do not call komeda_debugfs_init() and the debugfs core function > > declaration if CONFIG_DEBUG_FS is not defined, but we should not > > compile it either because the debugfs core function declaration is > > not included. > > > > Reported-by: k2ci Can we see what the bot reported? > > Signed-off-by: pengfuyuan > > An interesting alternative might actually be to remove *all* the > CONFIG_DEBUG_FS conditional compilation from the file. Since the debugfs > functions have no-op stubs for CONFIG_DEBUG_FS=n, the compiler will > optimize the rest away, because they're no longer referenced. (For the > same reason, I don't think this patch has an impact for code size.) > > The upside for removing conditional compilation is that you'll actually > do build testing for both CONFIG_DEBUG_FS config values. Assuming most > developers have it enabled, there's not a lot of testing going on for > CONFIG_DEBUG_FS=n, and you might introduce build failures with the > conditional compilation. > > Of course, up to Liviu to decide. Yeah, I quite like the idea of removing the conditional compilation from the file entirely. Pengfuyuan, do you mind sending a new patch removing all the CONFIG_DEBUG_FS from the file, rather than moving things around? Best regards, Liviu > > > BR, > Jani. > > > > --- > > drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > > index 14ee79becacb..7ada8e6f407c 100644 > > --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > > @@ -21,6 +21,7 @@ > > > > #include "komeda_dev.h" > > > > +#ifdef CONFIG_DEBUG_FS > > static int komeda_register_show(struct seq_file *sf, void *x) > > { > > struct komeda_dev *mdev = sf->private; > > @@ -43,7 +44,6 @@ static int komeda_register_show(struct seq_file *sf, void *x) > > > > DEFINE_SHOW_ATTRIBUTE(komeda_register); > > > > -#ifdef CONFIG_DEBUG_FS > > static void komeda_debugfs_init(struct komeda_dev *mdev) > > { > > if (!debugfs_initialized()) > > -- > Jani Nikula, Intel -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯