From patchwork Mon Jun 20 15:47:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9187853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 201CD6075E for ; Mon, 20 Jun 2016 15:50:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C12723B23 for ; Mon, 20 Jun 2016 15:50:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2C5826861; Mon, 20 Jun 2016 15:50:21 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 846C123B23 for ; Mon, 20 Jun 2016 15:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932299AbcFTPtH (ORCPT ); Mon, 20 Jun 2016 11:49:07 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:65083 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932446AbcFTPsY (ORCPT ); Mon, 20 Jun 2016 11:48:24 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0LwVC7-1bSBdT0vL5-018Hsx; Mon, 20 Jun 2016 17:47:00 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Arnd Bergmann , mchehab@osg.samsung.com, Greg Kroah-Hartman , Laurent Pinchart , Thaissa Falbo , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] staging: davinci_vpfe: fix W=1 build warnings Date: Mon, 20 Jun 2016 17:47:56 +0200 Message-Id: <20160620154852.2336421-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:uhGiIlROMfMh4v40uPK/X9akNsxDZfMEZczFmFLptx5Y09jpCoC IDLADG72i/qKvlSEsEK7ta66j3aMvaDpklAfHUwCob5txv4+sJpwCHaQLFLl/Ov6OMOuXJq XgvPAjgazQBXwAprTvoK4m8emQWVSblnY6EC4M+XQl97uSx2PunhveugyCXWHq3xj7heJM0 qQRI5uQUgX+8Unr2pn9dA== X-UI-Out-Filterresults: notjunk:1; V01:K0:PsPZLbtVmJw=:sGFlBMEJCD0lvOKyVauMLG SGK49nnEAZaE6zka1m8jtYUE4kj2taUAMy7U0N6drP46IreVTPoYOnUKZ1gs7Y1egW+aB4mox 5o+pDXrhYBGfarjb4u6NYApffRgOcpU96znfiRFvPmAO26FF2n9QrI70rd/3+4B7yFr+Vts5W 8W9ibEmoC6uMHOW1IjX4m+Lj7T+q8si9+UU8u5u9VC4e0Y/WhEIuzD+l8+OluUbfEu2Ezh84u 9ZW8kTzdLkclQq2AdrX0PeSij+8yWCMX9hwSIoE4U219bxwiz89oZ5SQ7nMGVVobsROLsxtjm 8A0nIGbmRHGQQ70zzI8hNXiriVpwspmlhLcf/BKNcnNRlQWLWu+4MDzBkbsPAfFIITBSsnH/z e5r0mi82H34PW1Mgtp3wCD05cnaFSLnXWC61I3Mf2k/YZhTEXISv8b+EDCGARyReIUJTCnzYA fzZob3YAb/KB1Te+8ac7QvL3jumAt7rJTogFyy17PaYxGwXmggb+eXK/UMWyc3ZRv0lxtJWZM MzRLq0/ySWzeUSeZdICg6E2pdlbruCbKZKuVOuHfnJFVRaTmPXpgKL9S152Q66gZwsTlmjrvy TBX+Gx6Mbx0GQkk8BErg67nuoT5AqgoSq74i4cqNWQCqb+X8rcq64GG5ej+aZO4FS305eEtZC D9boi8rFpOS0JRsLPBJGSdket9LqwxPmJCJRYkRWAaTKXn6KULYDAGpI2QlAOwiosYrA= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When building with "make W=1", we get multiple harmless build warnings for the vpfe driver: drivers/staging/media/davinci_vpfe/dm365_resizer.c:241:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] drivers/staging/media/davinci_vpfe/dm365_resizer.c: In function 'resizer_set_defualt_configuration': drivers/staging/media/davinci_vpfe/dm365_resizer.c:831:16: error: initialized field overwritten [-Werror=override-init] drivers/staging/media/davinci_vpfe/dm365_resizer.c:831:16: note: (near initialization for 'rsz_default_config.rsz_rsc_param[0].h_typ_c') drivers/staging/media/davinci_vpfe/dm365_resizer.c:849:16: error: initialized field overwritten [-Werror=override-init] drivers/staging/media/davinci_vpfe/dm365_resizer.c:849:16: note: (near initialization for 'rsz_default_config.rsz_rsc_param[1].h_typ_c') All of them are trivial to fix without changing the behavior of the driver, as "static const" is interpreted the same as "const static", and VPFE_RSZ_INTP_CUBIC is defined as zero, so the initializations are not really needed. Signed-off-by: Arnd Bergmann Acked-by: Laurent Pinchart --- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index 3cd56cc132c7..567f995fd0f9 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c @@ -237,9 +237,8 @@ resizer_calculate_resize_ratios(struct vpfe_resizer_device *resizer, int index) ((informat->width) * 256) / (outformat->width); } -void -static resizer_enable_422_420_conversion(struct resizer_params *param, - int index, bool en) +static void resizer_enable_422_420_conversion(struct resizer_params *param, + int index, bool en) { param->rsz_rsc_param[index].cen = en; param->rsz_rsc_param[index].yen = en; @@ -825,7 +824,7 @@ resizer_set_defualt_configuration(struct vpfe_resizer_device *resizer) .o_hsz = WIDTH_O - 1, .v_dif = 256, .v_typ_y = VPFE_RSZ_INTP_CUBIC, - .h_typ_c = VPFE_RSZ_INTP_CUBIC, + .v_typ_c = VPFE_RSZ_INTP_CUBIC, .h_dif = 256, .h_typ_y = VPFE_RSZ_INTP_CUBIC, .h_typ_c = VPFE_RSZ_INTP_CUBIC, @@ -843,7 +842,7 @@ resizer_set_defualt_configuration(struct vpfe_resizer_device *resizer) .o_hsz = WIDTH_O - 1, .v_dif = 256, .v_typ_y = VPFE_RSZ_INTP_CUBIC, - .h_typ_c = VPFE_RSZ_INTP_CUBIC, + .v_typ_c = VPFE_RSZ_INTP_CUBIC, .h_dif = 256, .h_typ_y = VPFE_RSZ_INTP_CUBIC, .h_typ_c = VPFE_RSZ_INTP_CUBIC,