From: Ezequiel Garcia <ezequiel@collabora.com>
To: Boris Brezillon <boris.brezillon@collabora.com>,
Hans Verkuil <hverkuil@xs4all.nl>
Cc: Adrian Ratiu <adrian.ratiu@collabora.com>,
linux-media@vger.kernel.org, kernel@collabora.com,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
devel@driverdev.osuosl.org,
Mauro Carvalho Chehab <mchehab@kernel.org>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] media: rkvdec: silence ktest bot build warning
Date: Thu, 07 Jan 2021 09:32:28 -0300 [thread overview]
Message-ID: <f499532ca147a0d2907a5020fb69def89d4c69a6.camel@collabora.com> (raw)
In-Reply-To: <20210107124132.3648e789@collabora.com>
On Thu, 2021-01-07 at 12:41 +0100, Boris Brezillon wrote:
> On Thu, 7 Jan 2021 10:13:43 +0100
> Hans Verkuil <hverkuil@xs4all.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
prev parent reply other threads:[~2021-01-07 12:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 15:55 Adrian Ratiu
2021-01-07 9:13 ` Hans Verkuil
2021-01-07 11:41 ` Boris Brezillon
2021-01-07 12:32 ` Ezequiel Garcia [this message]
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=f499532ca147a0d2907a5020fb69def89d4c69a6.camel@collabora.com \
--to=ezequiel@collabora.com \
--cc=adrian.ratiu@collabora.com \
--cc=boris.brezillon@collabora.com \
--cc=devel@driverdev.osuosl.org \
--cc=hverkuil@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lkp@intel.com \
--cc=mchehab@kernel.org \
/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®