[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f499532ca147a0d2907a5020fb69def89d4c69a6.camel@collabora.com>
Date: Thu, 07 Jan 2021 09:32:28 -0300
From: Ezequiel Garcia <ezequiel@...labora.com>
To: Boris Brezillon <boris.brezillon@...labora.com>,
Hans Verkuil <hverkuil@...all.nl>
Cc: Adrian Ratiu <adrian.ratiu@...labora.com>,
linux-media@...r.kernel.org, kernel@...labora.com,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
devel@...verdev.osuosl.org,
Mauro Carvalho Chehab <mchehab@...nel.org>,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] media: rkvdec: silence ktest bot build warning
On Thu, 2021-01-07 at 12:41 +0100, Boris Brezillon wrote:
> On Thu, 7 Jan 2021 10:13:43 +0100
> Hans Verkuil <hverkuil@...all.nl> wrote:
>
> > On 08/12/2020 16:55, Adrian Ratiu wrote:
> > > Some configurations built by the ktest bot produce the following
> > > warn, so mark the struct as __maybe_unused to avoid unnecessary
> > > ML spam.
> > >
> > > > > drivers/staging/media/rkvdec/rkvdec.c:967:34: warning: unused variable 'of_rkvdec_match' [-Wunused-const-variable]
> > > static const struct of_device_id of_rkvdec_match[] = {
> > > ^
> > > 1 warning generated.
> >
> > I suspect that this is because there is no 'depends on OF' in the Kconfig.
> >
> > '__maybe_unused' isn't used for this anywhere else, so this does not seem like the
> > right approach.
>
> It's not uncommon to do that, especially when you want the driver to be
> compile-tested (`git grep -C2 __maybe_unused|grep of_device_id` even
> reports 2 drivers in the media tree :P). A `depends on OF` or an
> `#ifdef CONFIG_OF` section surrounding the of_rkvdec_match declaration
> would also do the trick.
>
I'm fine either way, __maybe_unused or depends on OF.
Thanks,
Ezequiel
Powered by blists - more mailing lists