From patchwork Mon Mar 26 21:10:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10308689 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 E7C32600CC for ; Mon, 26 Mar 2018 21:11:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CEEB3298B7 for ; Mon, 26 Mar 2018 21:11:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3881298B8; Mon, 26 Mar 2018 21:11:23 +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 22791298BC for ; Mon, 26 Mar 2018 21:11:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165AbeCZVLV (ORCPT ); Mon, 26 Mar 2018 17:11:21 -0400 Received: from osg.samsung.com ([64.30.133.232]:33551 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751684AbeCZVLA (ORCPT ); Mon, 26 Mar 2018 17:11:00 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 528DA332FC; Mon, 26 Mar 2018 14:11:00 -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 xExuwMnUOgR8; Mon, 26 Mar 2018 14:10:59 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [179.95.60.72]) by osg.samsung.com (Postfix) with ESMTPSA id 44F623329A; Mon, 26 Mar 2018 14:10:55 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f0ZOG-00074u-Jl; Mon, 26 Mar 2018 17:10:52 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Alan Cox , Sakari Ailus , Greg Kroah-Hartman , Hans Verkuil , Paolo Cretaro , Arushi Singhal , Joe Perches , devel@driverdev.osuosl.org Subject: [PATCH 04/18] media: staging atomisp: declare static vars as such Date: Mon, 26 Mar 2018 17:10:37 -0400 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: <8548f74ae86b66d041e7505549453fba9fb9e63d.1522098456.git.mchehab@s-opensource.com> References: <8548f74ae86b66d041e7505549453fba9fb9e63d.1522098456.git.mchehab@s-opensource.com> In-Reply-To: <8548f74ae86b66d041e7505549453fba9fb9e63d.1522098456.git.mchehab@s-opensource.com> References: <8548f74ae86b66d041e7505549453fba9fb9e63d.1522098456.git.mchehab@s-opensource.com> 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 Fix a bunch of warnings: drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c:93:23: warning: symbol 'css_queues' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c:27:32: warning: symbol 'handle_table' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c:32:30: warning: symbol 'refpool' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c:43:30: warning: symbol 'writepool' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c:54:30: warning: symbol 'hmmbufferpool' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_formatter.c:48:12: warning: symbol 'HIVE_IF_BIN_COPY' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c:33:1: warning: symbol 'gp_timer_reg_load' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c:74:33: warning: symbol 'sh_css_sp_output' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug.c:32:25: warning: symbol 'debug_data' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:32:21: warning: symbol 'IB_BUFFER_NULL' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:647:24: warning: symbol 'config' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:2894:10: warning: symbol 'g_param_buffer_dequeue_count' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:2895:10: warning: symbol 'g_param_buffer_enqueue_count' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab --- .../atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug.c | 2 +- .../pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c | 2 +- .../pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c | 4 ++-- .../media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 7 +++---- .../atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 8 ++++---- .../staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c | 6 +++--- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug.c index c412810887b3..dcb9a3127cfe 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug.c @@ -29,7 +29,7 @@ hrt_address debug_buffer_address = (hrt_address)-1; hrt_vaddress debug_buffer_ddr_address = (hrt_vaddress)-1; /* The local copy */ -debug_data_t debug_data; +static debug_data_t debug_data; debug_data_t *debug_data_ptr = &debug_data; void debug_buffer_init(const hrt_address addr) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c index bcfd443f5202..b6b1344786b1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c @@ -29,7 +29,7 @@ gp_timer_reg_load(uint32_t reg); static void gp_timer_reg_store(uint32_t reg, uint32_t value); -uint32_t +static uint32_t gp_timer_reg_load(uint32_t reg) { return ia_css_device_load_uint32( diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c index bd6821e436b2..c9cb8e0621e5 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c @@ -29,7 +29,7 @@ #define ZERO (0x0) #define ONE (1U) -const ib_buffer_t IB_BUFFER_NULL = {0 ,0, 0 }; +static const ib_buffer_t IB_BUFFER_NULL = {0 ,0, 0 }; static input_system_error_t input_system_configure_channel( const channel_cfg_t channel); @@ -644,7 +644,7 @@ static inline void rx_channel_get_state( } // MW: "2400" in the name is not good, but this is to avoid a naming conflict -input_system_cfg2400_t config; +static input_system_cfg2400_t config; static void receiver_rst( const rx_ID_t ID) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c index 01d20b62a630..ffbcdd80d934 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c @@ -90,12 +90,11 @@ struct sh_css_queues { #endif -struct sh_css_queues css_queues; - - /******************************************************* *** Static variables ********************************************************/ +static struct sh_css_queues css_queues; + static int buffer_type_to_queue_id_map[SH_CSS_MAX_SP_THREADS][IA_CSS_NUM_DYNAMIC_BUFFER_TYPE]; static bool queue_availability[SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES]; @@ -266,7 +265,7 @@ static ia_css_queue_t *bufq_get_qhandle( case sh_css_sp2host_isys_event_queue: q = &css_queues.sp2host_isys_event_queue_handle; break; -#endif +#endif case sh_css_host2sp_tag_cmd_queue: q = &css_queues.host2sp_tag_cmd_queue_handle; break; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c index 54239ac9d7c9..a4d8a48f95ba 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c @@ -24,12 +24,12 @@ * @brief VBUF resource handles */ #define NUM_HANDLES 1000 -struct ia_css_rmgr_vbuf_handle handle_table[NUM_HANDLES]; +static struct ia_css_rmgr_vbuf_handle handle_table[NUM_HANDLES]; /* * @brief VBUF resource pool - refpool */ -struct ia_css_rmgr_vbuf_pool refpool = { +static struct ia_css_rmgr_vbuf_pool refpool = { false, /* copy_on_write */ false, /* recycle */ 0, /* size */ @@ -40,7 +40,7 @@ struct ia_css_rmgr_vbuf_pool refpool = { /* * @brief VBUF resource pool - writepool */ -struct ia_css_rmgr_vbuf_pool writepool = { +static struct ia_css_rmgr_vbuf_pool writepool = { true, /* copy_on_write */ false, /* recycle */ 0, /* size */ @@ -51,7 +51,7 @@ struct ia_css_rmgr_vbuf_pool writepool = { /* * @brief VBUF resource pool - hmmbufferpool */ -struct ia_css_rmgr_vbuf_pool hmmbufferpool = { +static struct ia_css_rmgr_vbuf_pool hmmbufferpool = { true, /* copy_on_write */ true, /* recycle */ 32, /* size */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c index fbb36112fe3c..3c0e8f66f59a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c @@ -110,7 +110,7 @@ #define FPNTBL_BYTES(binary) \ (sizeof(char) * (binary)->in_frame_info.res.height * \ (binary)->in_frame_info.padded_width) - + #ifndef ISP2401 #define SCTBL_BYTES(binary) \ @@ -2891,8 +2891,8 @@ ia_css_metadata_free_multiple(unsigned int num_bufs, struct ia_css_metadata **bu } } -unsigned g_param_buffer_dequeue_count = 0; -unsigned g_param_buffer_enqueue_count = 0; +static unsigned g_param_buffer_dequeue_count = 0; +static unsigned g_param_buffer_enqueue_count = 0; enum ia_css_err ia_css_stream_isp_parameters_init(struct ia_css_stream *stream)