* [PATCH] drm: msm: mdp4: mark symbols static where possible @ 2016-09-07 10:58 Baoyou Xie [not found] ` <1473245924-655-1-git-send-email-baoyou.xie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 2+ messages in thread From: Baoyou Xie @ 2016-09-07 10:58 UTC (permalink / raw) To: robdclark, airlied, daniel.vetter, CARLOS.PALMINHA, ville.syrjala, architt, daniels, maarten.lankhorst Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, arnd, baoyou.xie, xie.baoyou We get 2 warnings when building kernel with W=1: drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c:96:23: warning: no previous prototype for 'get_connector' [-Wmissing-prototypes] drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c:84:5: warning: no previous prototype for 'mdp4_plane_set_property' [-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 <baoyou.xie@linaro.org> --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c | 2 +- drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c index bc3d8e7..a06b064 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c @@ -93,7 +93,7 @@ static const struct drm_encoder_funcs mdp4_lcdc_encoder_funcs = { }; /* this should probably be a helper: */ -struct drm_connector *get_connector(struct drm_encoder *encoder) +static struct drm_connector *get_connector(struct drm_encoder *encoder) { struct drm_device *dev = encoder->dev; struct drm_connector *connector; diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c index 9f96dfe..c5adef0 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c @@ -81,7 +81,7 @@ static void mdp4_plane_install_properties(struct drm_plane *plane, // XXX } -int mdp4_plane_set_property(struct drm_plane *plane, +static int mdp4_plane_set_property(struct drm_plane *plane, struct drm_property *property, uint64_t val) { // XXX -- 2.7.4 ^ permalink raw reply related [flat|nested] 2+ messages in thread
[parent not found: <1473245924-655-1-git-send-email-baoyou.xie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH] drm: msm: mdp4: mark symbols static where possible [not found] ` <1473245924-655-1-git-send-email-baoyou.xie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2016-09-12 8:49 ` Archit Taneja 0 siblings, 0 replies; 2+ messages in thread From: Archit Taneja @ 2016-09-12 8:49 UTC (permalink / raw) To: Baoyou Xie, robdclark-Re5JQEeQqe8AvxtiuMwx3w Cc: daniels-ZGY8ohtN/8qB+jHODAdFcQ, arnd-r2nGTMty4D4, airlied-cv59FeDIM0c, daniel.vetter-/w4YWyX8dFk, xie.baoyou-Th6q7B73Y6EnDS1+zs4M5A, maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA, CARLOS.PALMINHA-HKixBCOQz3hWk0Htik3J/w, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, ville.syrjala-VuQAYsv1563Yd54FQh9/CA On 09/07/2016 04:28 PM, Baoyou Xie wrote: > We get 2 warnings when building kernel with W=1: > drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c:96:23: warning: no previous prototype for 'get_connector' [-Wmissing-prototypes] > drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c:84:5: warning: no previous prototype for 'mdp4_plane_set_property' [-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'. Reviewed-by: Archit Taneja <architt@codeaurora.org> > > Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org> > --- > drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c | 2 +- > drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c > index bc3d8e7..a06b064 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c > +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c > @@ -93,7 +93,7 @@ static const struct drm_encoder_funcs mdp4_lcdc_encoder_funcs = { > }; > > /* this should probably be a helper: */ > -struct drm_connector *get_connector(struct drm_encoder *encoder) > +static struct drm_connector *get_connector(struct drm_encoder *encoder) > { > struct drm_device *dev = encoder->dev; > struct drm_connector *connector; > diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c > index 9f96dfe..c5adef0 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c > +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c > @@ -81,7 +81,7 @@ static void mdp4_plane_install_properties(struct drm_plane *plane, > // XXX > } > > -int mdp4_plane_set_property(struct drm_plane *plane, > +static int mdp4_plane_set_property(struct drm_plane *plane, > struct drm_property *property, uint64_t val) > { > // XXX > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-12 8:49 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-09-07 10:58 [PATCH] drm: msm: mdp4: mark symbols static where possible Baoyou Xie [not found] ` <1473245924-655-1-git-send-email-baoyou.xie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2016-09-12 8:49 ` Archit Taneja
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).