From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757588AbcIHM6j (ORCPT ); Thu, 8 Sep 2016 08:58:39 -0400 Received: from arroyo.ext.ti.com ([198.47.19.12]:37681 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751895AbcIHM6h (ORCPT ); Thu, 8 Sep 2016 08:58:37 -0400 Subject: Re: [PATCH] drm/tilcdc: mark symbols static where possible To: Baoyou Xie , , , , , , References: <1473334164-25882-1-git-send-email-baoyou.xie@linaro.org> From: Jyri Sarha Message-ID: <84e257f1-3926-1bb3-d791-85709a865886@ti.com> Date: Thu, 8 Sep 2016 15:58:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1473334164-25882-1-git-send-email-baoyou.xie@linaro.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/08/16 14:29, Baoyou Xie wrote: > We get 3 warnings when building kernel with W=1: > drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c:142:29: warning: no previous prototype for 'tilcdc_get_overlay' [-Wmissing-prototypes] > drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c:198:13: warning: no previous prototype for 'tilcdc_convert_slave_node' [-Wmissing-prototypes] > drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c:264:12: warning: no previous prototype for 'tilcdc_slave_compat_init' [-Wmissing-prototypes] > > In fact, these functions are only used in the file in which they are > declared and don't need a declaration, but can be made static. > So this patch marks these functions with 'static'. > > Signed-off-by: Baoyou Xie I'll pick this up. Thanks, Jyri > --- > drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c b/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c > index f9c79da..dd8de260 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c > @@ -139,7 +139,7 @@ static void __init tilcdc_node_disable(struct device_node *node) > of_update_property(node, prop); > } > > -struct device_node * __init tilcdc_get_overlay(struct kfree_table *kft) > +static struct device_node * __init tilcdc_get_overlay(struct kfree_table *kft) > { > const int size = __dtb_tilcdc_slave_compat_end - > __dtb_tilcdc_slave_compat_begin; > @@ -195,7 +195,7 @@ static const char * const tilcdc_slave_props[] __initconst = { > NULL > }; > > -void __init tilcdc_convert_slave_node(void) > +static void __init tilcdc_convert_slave_node(void) > { > struct device_node *slave = NULL, *lcdc = NULL; > struct device_node *i2c = NULL, *fragment = NULL; > @@ -261,7 +261,7 @@ out: > of_node_put(fragment); > } > > -int __init tilcdc_slave_compat_init(void) > +static int __init tilcdc_slave_compat_init(void) > { > tilcdc_convert_slave_node(); > return 0; >