From patchwork Thu Apr 5 17:54:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10325139 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 74ED86053F for ; Thu, 5 Apr 2018 17:54:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 652CA27F8F for ; Thu, 5 Apr 2018 17:54:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59DC0285E4; Thu, 5 Apr 2018 17:54:52 +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=ham 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 2D0D829189 for ; Thu, 5 Apr 2018 17:54:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751862AbeDERyt (ORCPT ); Thu, 5 Apr 2018 13:54:49 -0400 Received: from osg.samsung.com ([64.30.133.232]:49436 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434AbeDERy0 (ORCPT ); Thu, 5 Apr 2018 13:54:26 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 038CE305F0; Thu, 5 Apr 2018 10:54:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5KKieWydJ7w9; Thu, 5 Apr 2018 10:54:25 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [177.133.19.105]) by osg.samsung.com (Postfix) with ESMTPSA id 9F54930579; Thu, 5 Apr 2018 10:54:20 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f495V-0009jo-RA; Thu, 05 Apr 2018 13:54:17 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Hans Verkuil , Bhumika Goyal , Al Viro , Geliang Tang , Arvind Yadav , Kees Cook Subject: [PATCH 04/16] media: fsl-viu: mark static functions as such Date: Thu, 5 Apr 2018 13:54:04 -0400 Message-Id: <289b37167682c342bf799b58679a9133dd23f4a2.1522949748.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) 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 There are several functions that are used only inside the driver. Stop exposing that to global symbolspace. Get rid of the following gcc warnings: drivers/media/platform/fsl-viu.c:240:17: warning: no previous prototype for ‘format_by_fourcc’ [-Wmissing-prototypes] struct viu_fmt *format_by_fourcc(int fourcc) ^~~~~~~~~~~~~~~~ drivers/media/platform/fsl-viu.c:253:6: warning: no previous prototype for ‘viu_start_dma’ [-Wmissing-prototypes] void viu_start_dma(struct viu_dev *dev) ^~~~~~~~~~~~~ drivers/media/platform/fsl-viu.c:262:6: warning: no previous prototype for ‘viu_stop_dma’ [-Wmissing-prototypes] void viu_stop_dma(struct viu_dev *dev) ^~~~~~~~~~~~ drivers/media/platform/fsl-viu.c:807:5: warning: no previous prototype for ‘vidioc_g_fbuf’ [-Wmissing-prototypes] int vidioc_g_fbuf(struct file *file, void *priv, struct v4l2_framebuffer *arg) ^~~~~~~~~~~~~ drivers/media/platform/fsl-viu.c:818:5: warning: no previous prototype for ‘vidioc_s_fbuf’ [-Wmissing-prototypes] int vidioc_s_fbuf(struct file *file, void *priv, const struct v4l2_framebuffer *arg) ^~~~~~~~~~~~~ drivers/media/platform/fsl-viu.c: In function ‘viu_open’: drivers/media/platform/fsl-viu.c:1170:6: warning: variable ‘status_cfg’ set but not used [-Wunused-but-set-variable] u32 status_cfg; ^~~~~~~~~~ drivers/media/platform/fsl-viu.c: At top level: drivers/media/platform/fsl-viu.c:1304:6: warning: no previous prototype for ‘viu_reset’ [-Wmissing-prototypes] void viu_reset(struct viu_reg *reg) ^~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/fsl-viu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index 200c47c69a75..9abe79779659 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c @@ -229,7 +229,7 @@ enum status_config { static irqreturn_t viu_intr(int irq, void *dev_id); -struct viu_fmt *format_by_fourcc(int fourcc) +static struct viu_fmt *format_by_fourcc(int fourcc) { int i; @@ -242,7 +242,7 @@ struct viu_fmt *format_by_fourcc(int fourcc) return NULL; } -void viu_start_dma(struct viu_dev *dev) +static void viu_start_dma(struct viu_dev *dev) { struct viu_reg *vr = dev->vr; @@ -253,7 +253,7 @@ void viu_start_dma(struct viu_dev *dev) out_be32(&vr->status_cfg, INT_FIELD_EN); } -void viu_stop_dma(struct viu_dev *dev) +static void viu_stop_dma(struct viu_dev *dev) { struct viu_reg *vr = dev->vr; int cnt = 100; @@ -802,7 +802,7 @@ static int vidioc_overlay(struct file *file, void *priv, unsigned int on) return 0; } -int vidioc_g_fbuf(struct file *file, void *priv, struct v4l2_framebuffer *arg) +static int vidioc_g_fbuf(struct file *file, void *priv, struct v4l2_framebuffer *arg) { struct viu_fh *fh = priv; struct viu_dev *dev = fh->dev; @@ -813,7 +813,7 @@ int vidioc_g_fbuf(struct file *file, void *priv, struct v4l2_framebuffer *arg) return 0; } -int vidioc_s_fbuf(struct file *file, void *priv, const struct v4l2_framebuffer *arg) +static int vidioc_s_fbuf(struct file *file, void *priv, const struct v4l2_framebuffer *arg) { struct viu_fh *fh = priv; struct viu_dev *dev = fh->dev; @@ -1305,7 +1305,7 @@ static int viu_release(struct file *file) return 0; } -void viu_reset(struct viu_reg *reg) +static void viu_reset(struct viu_reg *reg) { out_be32(®->status_cfg, 0); out_be32(®->luminance, 0x9512a254);