From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3434CC433DB for ; Thu, 7 Jan 2021 12:33:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE81923358 for ; Thu, 7 Jan 2021 12:33:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728320AbhAGMdT (ORCPT ); Thu, 7 Jan 2021 07:33:19 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39410 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728304AbhAGMdS (ORCPT ); Thu, 7 Jan 2021 07:33:18 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 931831F4628C Message-ID: Subject: Re: [PATCH] media: rkvdec: silence ktest bot build warning From: Ezequiel Garcia To: Boris Brezillon , Hans Verkuil Cc: Adrian Ratiu , 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 , kernel test robot Date: Thu, 07 Jan 2021 09:32:28 -0300 In-Reply-To: <20210107124132.3648e789@collabora.com> References: <20201208155540.340583-1-adrian.ratiu@collabora.com> <76b5569c-bc19-3d11-4da7-cf0dbb244433@xs4all.nl> <20210107124132.3648e789@collabora.com> Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2021-01-07 at 12:41 +0100, Boris Brezillon wrote: > On Thu, 7 Jan 2021 10:13:43 +0100 > Hans Verkuil 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