From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932517AbcIFIHL (ORCPT ); Tue, 6 Sep 2016 04:07:11 -0400 Received: from foss.arm.com ([217.140.101.70]:41600 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752380AbcIFIHG (ORCPT ); Tue, 6 Sep 2016 04:07:06 -0400 Date: Tue, 6 Sep 2016 09:07:04 +0100 From: liviu.dudau@arm.com To: Baoyou Xie Cc: brian.starkey@arm.com, malidp@foss.arm.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, arnd@arndb.de, xie.baoyou@zte.com.cn Subject: Re: [PATCH] drm/arm: mark symbols static where possible Message-ID: <20160906080704.GD8917@e106497-lin.cambridge.arm.com> References: <1473146608-23718-1-git-send-email-baoyou.xie@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1473146608-23718-1-git-send-email-baoyou.xie@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 06, 2016 at 03:23:28PM +0800, Baoyou Xie wrote: > We get 2 warnings when building kernel with W=1: > drivers/gpu/drm/arm/malidp_planes.c:49:25: warning: no previous prototype for 'malidp_duplicate_plane_state' [-Wmissing-prototypes] > drivers/gpu/drm/arm/malidp_planes.c:66:6: warning: no previous prototype for 'malidp_destroy_plane_state' [-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 Acked-by: Liviu Dudau > --- > drivers/gpu/drm/arm/malidp_planes.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c > index 725098d..5f8bece 100644 > --- a/drivers/gpu/drm/arm/malidp_planes.c > +++ b/drivers/gpu/drm/arm/malidp_planes.c > @@ -46,7 +46,8 @@ static void malidp_de_plane_destroy(struct drm_plane *plane) > devm_kfree(plane->dev->dev, mp); > } > > -struct drm_plane_state *malidp_duplicate_plane_state(struct drm_plane *plane) > +static struct > +drm_plane_state *malidp_duplicate_plane_state(struct drm_plane *plane) > { > struct malidp_plane_state *state, *m_state; > > @@ -63,7 +64,7 @@ struct drm_plane_state *malidp_duplicate_plane_state(struct drm_plane *plane) > return &state->base; > } > > -void malidp_destroy_plane_state(struct drm_plane *plane, > +static void malidp_destroy_plane_state(struct drm_plane *plane, > struct drm_plane_state *state) > { > struct malidp_plane_state *m_state = to_malidp_plane_state(state); > -- > 2.7.4 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯