From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753860AbcIOPPl convert rfc822-to-8bit (ORCPT ); Thu, 15 Sep 2016 11:15:41 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:41351 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752948AbcIOPPd (ORCPT ); Thu, 15 Sep 2016 11:15:33 -0400 From: Vincent ABRIOU To: Baoyou Xie , "benjamin.gaignard@linaro.org" , "airlied@linux.ie" CC: "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "arnd@arndb.de" , "xie.baoyou@zte.com.cn" Date: Thu, 15 Sep 2016 17:15:15 +0200 Subject: Re: [PATCH] drm/sti: mark symbols static where possible Thread-Topic: [PATCH] drm/sti: mark symbols static where possible Thread-Index: AdIPY/chxXoh75LRT46vulFqg7fVfQ== Message-ID: <19cb207a-10a5-8e72-227b-a96d7dbc16f3@st.com> References: <1473939540-2597-1-git-send-email-baoyou.xie@linaro.org> In-Reply-To: <1473939540-2597-1-git-send-email-baoyou.xie@linaro.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-15_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Vincent Abriou On 09/15/2016 01:39 PM, Baoyou Xie wrote: > We get 4 warnings when building kernel with W=1: > drivers/gpu/drm/sti/sti_gdp.c:476:5: warning: no previous prototype for 'sti_gdp_field_cb' [-Wmissing-prototypes] > drivers/gpu/drm/sti/sti_hqvdp.c:786:5: warning: no previous prototype for 'sti_hqvdp_vtg_cb' [-Wmissing-prototypes] > drivers/gpu/drm/sti/sti_hqvdp.c:1292:5: warning: no previous prototype for 'sti_hqvdp_bind' [-Wmissing-prototypes] > drivers/gpu/drm/sti/sti_drv.c:143:6: warning: no previous prototype for 'sti_drm_dbg_cleanup' [-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 > --- > drivers/gpu/drm/sti/sti_drv.c | 2 +- > drivers/gpu/drm/sti/sti_gdp.c | 2 +- > drivers/gpu/drm/sti/sti_hqvdp.c | 5 +++-- > 3 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c > index 7cd3804..e6f0706 100644 > --- a/drivers/gpu/drm/sti/sti_drv.c > +++ b/drivers/gpu/drm/sti/sti_drv.c > @@ -140,7 +140,7 @@ err: > return ret; > } > > -void sti_drm_dbg_cleanup(struct drm_minor *minor) > +static void sti_drm_dbg_cleanup(struct drm_minor *minor) > { > drm_debugfs_remove_files(sti_drm_dbg_list, > ARRAY_SIZE(sti_drm_dbg_list), minor); > diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c > index b8d942c..4648d1b 100644 > --- a/drivers/gpu/drm/sti/sti_gdp.c > +++ b/drivers/gpu/drm/sti/sti_gdp.c > @@ -473,7 +473,7 @@ static void sti_gdp_disable(struct sti_gdp *gdp) > * RETURNS: > * 0 on success. > */ > -int sti_gdp_field_cb(struct notifier_block *nb, > +static int sti_gdp_field_cb(struct notifier_block *nb, > unsigned long event, void *data) > { > struct sti_gdp *gdp = container_of(nb, struct sti_gdp, vtg_field_nb); > diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c > index b5ee783..7f0dea8 100644 > --- a/drivers/gpu/drm/sti/sti_hqvdp.c > +++ b/drivers/gpu/drm/sti/sti_hqvdp.c > @@ -783,7 +783,8 @@ static void sti_hqvdp_disable(struct sti_hqvdp *hqvdp) > * RETURNS: > * 0 on success. > */ > -int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data) > +static int > +sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data) > { > struct sti_hqvdp *hqvdp = container_of(nb, struct sti_hqvdp, vtg_nb); > int btm_cmd_offset, top_cmd_offest; > @@ -1289,7 +1290,7 @@ static struct drm_plane *sti_hqvdp_create(struct drm_device *drm_dev, > return &hqvdp->plane.drm_plane; > } > > -int sti_hqvdp_bind(struct device *dev, struct device *master, void *data) > +static int sti_hqvdp_bind(struct device *dev, struct device *master, void *data) > { > struct sti_hqvdp *hqvdp = dev_get_drvdata(dev); > struct drm_device *drm_dev = data; >