mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Boris Brezillon" <boris.brezillon@collabora.com>,
	"Arnd Bergmann" <arnd@kernel.org>
Cc: "Steven Price" <steven.price@arm.com>,
	"Liviu Dudau" <liviu.dudau@arm.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Dave Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Adrián Larumbe" <adrian.larumbe@collabora.com>,
	"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
	"Florent Tomasin" <florent.tomasin@arm.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/panthor: fix building without CONFIG_DEBUG_FS
Date: Thu, 24 Apr 2025 14:10:16 +0200	[thread overview]
Message-ID: <41cd0579-698c-4e1e-82c4-3d46a1cd5e3e@app.fastmail.com> (raw)
In-Reply-To: <20250424134105.087ec2f8@collabora.com>

On Thu, Apr 24, 2025, at 13:41, Boris Brezillon wrote:
> On Thu, 24 Apr 2025 13:25:47 +0200
>> +#ifdef CONFIG_DEBUG_FS
>>  	bo->debugfs.flags = usage_flags | PANTHOR_DEBUGFS_GEM_USAGE_FLAG_INITIALIZED;
>> -}
>> -
>> -#else
>> -void panthor_gem_debugfs_set_usage_flags(struct panthor_gem_object *bo, u32 usage_flags) {};
>>  #endif
>> +}
>>  
>
> Oops. I actually don't see a good reason to expose this function, so
> could we go for something like that instead?

I think moving it into pantor_gem.c makes sense, and it certainly
avoids the build warning.

>  #else
>  static void panthor_gem_debugfs_bo_add(struct panthor_device *ptdev,
>                                        struct panthor_gem_object *bo)
>  {}
>  static void panthor_gem_debugfs_bo_rm(struct panthor_gem_object *bo) {}
> +static void panthor_gem_debugfs_set_usage_flags(struct 
> panthor_gem_object *bo,
> +                                               u32 usage_flags)
> +{

Side note: I think the panthor_gem_debugfs_bo_{add,rm} stubs could
actually be replaced with an IS_ENABLED() check in the normal
functions, but that wouldn't work for
panthor_gem_debugfs_set_usage_flags or
panthor_gem_debugfs_print_bos().

    Arnd

  reply	other threads:[~2025-04-24 12:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 11:25 Arnd Bergmann
2025-04-24 11:41 ` Boris Brezillon
2025-04-24 12:10   ` Arnd Bergmann [this message]
2025-04-24 12:24     ` Boris Brezillon
2025-04-24 18:46 ` Adrián Larumbe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41cd0579-698c-4e1e-82c4-3d46a1cd5e3e@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=adrian.larumbe@collabora.com \
    --cc=airlied@gmail.com \
    --cc=arnd@kernel.org \
    --cc=boris.brezillon@collabora.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=florent.tomasin@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=steven.price@arm.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®