Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1492022

Re: [PATCH 2/2] drm/rockchip: mark symbols static where possible

From Sean Paul <seanpaul@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] drm/rockchip: mark symbols static where possible
Date 2016-09-27 18:40 +0200
Message-ID <sm3Ae-3oW-35@gated-at.bofh.it> (permalink)
References <slcme-3J7-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Sep 25, 2016 at 3:43 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
> We get 2 warnings when building kernel with W=1:
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c:309:6: warning: no previous prototype for 'rockchip_drm_fb_suspend' [-Wmissing-prototypes]
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c:318:6: warning: no previous prototype for 'rockchip_drm_fb_resume' [-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>

Applied to -misc, thanks.

Sean

> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> index 76eaf1d..38c3be5 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> @@ -309,7 +309,7 @@ static struct drm_driver rockchip_drm_driver = {
>  };
>
>  #ifdef CONFIG_PM_SLEEP
> -void rockchip_drm_fb_suspend(struct drm_device *drm)
> +static void rockchip_drm_fb_suspend(struct drm_device *drm)
>  {
>         struct rockchip_drm_private *priv = drm->dev_private;
>
> @@ -318,7 +318,7 @@ void rockchip_drm_fb_suspend(struct drm_device *drm)
>         console_unlock();
>  }
>
> -void rockchip_drm_fb_resume(struct drm_device *drm)
> +static void rockchip_drm_fb_resume(struct drm_device *drm)
>  {
>         struct rockchip_drm_private *priv = drm->dev_private;
>
> --
> 2.7.4
>

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] drm/rockchip: mark symbols static where possible Baoyou Xie <baoyou.xie@linaro.org> - 2016-09-25 09:50 +0200
  Re: [PATCH 2/2] drm/rockchip: mark symbols static where possible Sean Paul <seanpaul@chromium.org> - 2016-09-27 18:40 +0200

csiph-web