[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z_ywYNsYjuZy8v9x@smile.fi.intel.com>
Date: Mon, 14 Apr 2025 09:51:12 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Matt Coster <Matt.Coster@...tec.com>
Cc: Arnd Bergmann <arnd@...nel.org>, Frank Binns <Frank.Binns@...tec.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Andrzej Hajda <andrzej.hajda@...el.com>,
Jani Nikula <jani.nikula@...el.com>,
Alex Deucher <alexander.deucher@....com>,
Alessio Belle <Alessio.Belle@...tec.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/10] drm/imagination: avoid unused-const-variable
warning
On Thu, Apr 10, 2025 at 11:22:05AM +0000, Matt Coster wrote:
> On 09/04/2025 13:22, Arnd Bergmann wrote:
...
> > Rather than adding more #ifdef blocks, address this by changing the
> > existing #ifdef into equivalent IS_ENABLED() checks so gcc can see
> > where the symbol is used but still eliminate it from the object file.
>
> Possibly a silly question, but wouldn't adding __maybe_unused to
> stid_fmts be a simpler change here?
I'm not Arnd (and I just have read his answer), but I would like to add that
__maybe_unused should be the last resort as it has more cons than more invasive
solutions. In particular, it makes build time increase with a lot of work to
be made at link time, and also it might hide the real bugs when somebody simply
forgot to use it (depending on the configuration options) or so.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists