From patchwork Fri Sep 28 00:50:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10618817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AE818913 for ; Fri, 28 Sep 2018 00:53:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DFC52B25B for ; Fri, 28 Sep 2018 00:53:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9194B2B2A0; Fri, 28 Sep 2018 00:53:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8F582B25B for ; Fri, 28 Sep 2018 00:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=iVpmRdmdu67XRKwB2fxBV6ZbUI7LlsBHWvcs7ELghy4=; b=Ze0wkCLKl6Kemr U5kSxtzjAa5pi8QMArLTQaecSFWf8CUYLBXN55v/xpfkfULZJ8hZww+E6wb+XcNjnyIMjV050fa+s WqQIOF1xXZcr5nHPiq9+oQHT0q17UY7LySGJjoXWqpLACkkVnTA6wBIykyX8cuv6299uYuZNqJnJ2 gnTUkwFqGu5JtBtHRF8rvQ/k9FiXjCK+OL7iF7SAU/u4pEblvk+4jloQl0ALi6QO9dIO2QM0zQkQo 5y51hIcfVtTQrELbQkGF5sWbJ7ehj/+VXQQmFMZ9BNvXTm35mXGIRHQ4EpeCzUg9rpHL3kqEfIczu Yimdh4VhfMfLdMKw/GAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5h2M-0005Nt-G9; Fri, 28 Sep 2018 00:53:42 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5h1m-0005Gz-PO; Fri, 28 Sep 2018 00:53:08 +0000 Received: by mail-wm1-x341.google.com with SMTP id o18-v6so535983wmc.0; Thu, 27 Sep 2018 17:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ourS0WGbA0LaVCGJzchfzRzVHdFnWXccN2X46zgZjHY=; b=Gvwn8E7yMk2VT24H2Ez86Li0woXga/4m1FA7VeDYJBY+j2v7L3EDv0CQ29xbXWC2uX ibzNRFyeaj1oWOEE9n9EOgYqktylgmxwuirDVeAi8890Ya+vFWXxtd6bNW3OzXymF5wR DG0UeMShEGg/t7EVP+yJwkJUjdTe/SrxQiyKWq30RlGrGk0s4iVJs9h/cIpGIsgHJdUL +B6JoZep+2Bdn82m2kEWzi6ZI0kpp2NwDlA6kREZklD/CVlv6KmWuj8EvYr7eR1XPmA1 BrLa6Voc+mW6uZN1ZcPikJJRUGbiP4kyOfCJDVZi20bQDmFamJ7Fy3rDkiXuLzLsNOCB Ygeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ourS0WGbA0LaVCGJzchfzRzVHdFnWXccN2X46zgZjHY=; b=XkixionWkxC5BbO5AjRXl6FloT6bcXpbYyzUPy7iBDw4WNp7TVd+kzin8pjSJO7Jc2 rogT8vA0rIQe8YPKZjnmcxbQyNWXX/rrW4lg6SpVY9AshwJ1CZ7LrDHNWudEPX6VMAVT Ab09nQNp15dwVoYVHhwmwsDXhzi5NtYS/PYFc4sryJOPBKSy/D99r1peCabKrrNt/2+f BxbSkFlsBX9lpxXMkNrbp7236GbojixneFT6ST/4moyoQEtHX5MlCgZUVn3ufdJ9gxic Ktu3LUjWgUc2lksvBUNBCHK6eUVZlaD4oEsvaVdI80JbK1zebgaQ7jdaKhX63e4j7dFM I0GQ== X-Gm-Message-State: ABuFfogtEFhpoo1hgVZONSwsmJ2bpdzrnZ63t2b5P7trR6RHKTlxj93d T3M0mTtt1pMxfpE5HYAlpsZuGXJ1L+eoFQ== X-Google-Smtp-Source: ACcGV62p7TkQzPJWU3LmYpHNwcPrjMTK/fZ4F43I+3a7PpRDDMo6WTqFJCE4U+uJzxt6Xgj56sdntA== X-Received: by 2002:a1c:838a:: with SMTP id f132-v6mr20431wmd.127.1538095961249; Thu, 27 Sep 2018 17:52:41 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id h71-v6sm460363wmg.4.2018.09.27.17.52.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 17:52:40 -0700 (PDT) From: Nathan Chancellor To: Eric Anholt , Stefan Wahren , Greg Kroah-Hartman Subject: [PATCH] staging: bcm2835-camera: Avoid unneeded internal declaration warning Date: Thu, 27 Sep 2018 17:50:39 -0700 Message-Id: <20180928005038.1697-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_175306_867336_A507345D X-CRM114-Status: GOOD ( 12.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Nick Desaulniers , linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Nathan Chancellor , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Clang warns: drivers/staging/vc04_services/bcm2835-camera/controls.c:59:18: warning: variable 'mains_freq_qmenu' is not needed and will not be emitted [-Wunneeded-internal-declaration] static const s64 mains_freq_qmenu[] = { ^ 1 warning generated. This is because mains_freq_qmenu is currently only used in an ARRAY_SIZE macro, which is a compile time evaluation in this case. Avoid this by adding mains_freq_qmenu as the imenu member of this structure, which matches all other controls that uses the ARRAY_SIZE macro in v4l2_ctrls. This turns out to be a no-op because V4L2_CID_MPEG_VIDEO_BITRATE_MODE is defined as a MMAL_CONTROL_TYPE_STD_MENU, which does not pass the imenu definition along to v4l2_ctrl_new in bm2835_mmal_init_controls. Link: https://github.com/ClangBuiltLinux/linux/issues/122 Signed-off-by: Nathan Chancellor --- drivers/staging/vc04_services/bcm2835-camera/controls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c index cff7b1e07153..a2c55cb2192a 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c @@ -1106,7 +1106,7 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { { V4L2_CID_POWER_LINE_FREQUENCY, MMAL_CONTROL_TYPE_STD_MENU, 0, ARRAY_SIZE(mains_freq_qmenu) - 1, - 1, 1, NULL, + 1, 1, mains_freq_qmenu, MMAL_PARAMETER_FLICKER_AVOID, &ctrl_set_flicker_avoidance, false