All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] drm/rockchip: mark symbols static where possible
@ 2016-09-25  7:43 ` Baoyou Xie
  0 siblings, 0 replies; 5+ messages in thread
From: Baoyou Xie @ 2016-09-25  7:43 UTC (permalink / raw)
  To: ck.hu, p.zabel, airlied, matthias.bgg, mark.yao, heiko
  Cc: dri-devel, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-rockchip, arnd, baoyou.xie, xie.baoyou, han.fei,
	tang.qiang007

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>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] drm/rockchip: mark symbols static where possible
@ 2016-09-25  7:43 ` Baoyou Xie
  0 siblings, 0 replies; 5+ messages in thread
From: Baoyou Xie @ 2016-09-25  7:43 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] drm/rockchip: mark symbols static where possible
  2016-09-25  7:43 ` Baoyou Xie
  (?)
@ 2016-09-27 16:34   ` Sean Paul
  -1 siblings, 0 replies; 5+ messages in thread
From: Sean Paul @ 2016-09-27 16:34 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: CK HU, p.zabel, Dave Airlie, Matthias Brugger,
	姚智情,
	Heiko Stübner, dri-devel, Linux ARM Kernel, linux-mediatek,
	Linux Kernel Mailing List, linux-rockchip, Arnd Bergmann,
	Baoyou Xie, han.fei, tang.qiang007

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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] drm/rockchip: mark symbols static where possible
@ 2016-09-27 16:34   ` Sean Paul
  0 siblings, 0 replies; 5+ messages in thread
From: Sean Paul @ 2016-09-27 16:34 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: Arnd Bergmann, linux-rockchip, tang.qiang007, Baoyou Xie,
	Linux Kernel Mailing List, dri-devel, Matthias Brugger,
	linux-mediatek, han.fei, Linux ARM Kernel

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
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] drm/rockchip: mark symbols static where possible
@ 2016-09-27 16:34   ` Sean Paul
  0 siblings, 0 replies; 5+ messages in thread
From: Sean Paul @ 2016-09-27 16:34 UTC (permalink / raw)
  To: linux-arm-kernel

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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-27 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-25  7:43 [PATCH 2/2] drm/rockchip: mark symbols static where possible Baoyou Xie
2016-09-25  7:43 ` Baoyou Xie
2016-09-27 16:34 ` Sean Paul
2016-09-27 16:34   ` Sean Paul
2016-09-27 16:34   ` Sean Paul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.