linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/rockchip: fix some sparse warnings
@ 2016-05-10 16:03 John Keeping
  2016-05-10 16:03 ` [PATCH 1/3] drm/rockchip: dw_hdmi: remove unused #include John Keeping
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: John Keeping @ 2016-05-10 16:03 UTC (permalink / raw)
  To: Mark Yao
  Cc: David Airlie, Heiko Stuebner, dri-devel, linux-arm-kernel,
	linux-rockchip, linux-kernel, John Keeping

The first patch wasn't found by sparse, but is something I noticed while
in the area.  The following two fix all of the sparse warnings inside
drm/rockchip.

John Keeping (3):
  drm/rockchip: dw_hdmi: remove unused #include
  drm/rockchip: fb: add missing header
  drm/rockchip: fix "should it be static?" warnings

 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 1 -
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 ++--
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c  | 7 ++++---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
 drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

-- 
2.8.2.565.gdb84f68.dirty

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

* [PATCH 1/3] drm/rockchip: dw_hdmi: remove unused #include
  2016-05-10 16:03 [PATCH 0/3] drm/rockchip: fix some sparse warnings John Keeping
@ 2016-05-10 16:03 ` John Keeping
  2016-05-10 16:03 ` [PATCH 2/3] drm/rockchip: fb: add missing header John Keeping
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: John Keeping @ 2016-05-10 16:03 UTC (permalink / raw)
  To: Mark Yao
  Cc: David Airlie, Heiko Stuebner, dri-devel, linux-arm-kernel,
	linux-rockchip, linux-kernel, John Keeping

drm_encoder_slave is not used in this file.

Signed-off-by: John Keeping <john@metanate.com>
---
 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index 801110f65a63..0665fb915579 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -15,7 +15,6 @@
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_edid.h>
-#include <drm/drm_encoder_slave.h>
 #include <drm/bridge/dw_hdmi.h>
 
 #include "rockchip_drm_drv.h"
-- 
2.8.2.565.gdb84f68.dirty

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

* [PATCH 2/3] drm/rockchip: fb: add missing header
  2016-05-10 16:03 [PATCH 0/3] drm/rockchip: fix some sparse warnings John Keeping
  2016-05-10 16:03 ` [PATCH 1/3] drm/rockchip: dw_hdmi: remove unused #include John Keeping
@ 2016-05-10 16:03 ` John Keeping
  2016-05-10 16:03 ` [PATCH 3/3] drm/rockchip: fix "should it be static?" warnings John Keeping
  2016-05-23  6:10 ` [PATCH 0/3] drm/rockchip: fix some sparse warnings Mark yao
  3 siblings, 0 replies; 5+ messages in thread
From: John Keeping @ 2016-05-10 16:03 UTC (permalink / raw)
  To: Mark Yao
  Cc: David Airlie, Heiko Stuebner, dri-devel, linux-arm-kernel,
	linux-rockchip, linux-kernel, John Keeping

This fixes the following sparse warnings:

drivers/gpu/drm/rockchip/rockchip_drm_fb.c:32:23: warning: symbol 'rockchip_fb_get_gem_obj' was not declared. Should it be static?
drivers/gpu/drm/rockchip/rockchip_drm_fb.c:315:24: warning: symbol 'rockchip_drm_framebuffer_init' was not declared. Should it be static?
drivers/gpu/drm/rockchip/rockchip_drm_fb.c:329:6: warning: symbol 'rockchip_drm_mode_config_init' was not declared. Should it be static?

Signed-off-by: John Keeping <john@metanate.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
index 8c10163a95bc..85aa87ee12f5 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
@@ -20,6 +20,7 @@
 #include <drm/drm_crtc_helper.h>
 
 #include "rockchip_drm_drv.h"
+#include "rockchip_drm_fb.h"
 #include "rockchip_drm_gem.h"
 
 #define to_rockchip_fb(x) container_of(x, struct rockchip_drm_fb, fb)
-- 
2.8.2.565.gdb84f68.dirty

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

* [PATCH 3/3] drm/rockchip: fix "should it be static?" warnings
  2016-05-10 16:03 [PATCH 0/3] drm/rockchip: fix some sparse warnings John Keeping
  2016-05-10 16:03 ` [PATCH 1/3] drm/rockchip: dw_hdmi: remove unused #include John Keeping
  2016-05-10 16:03 ` [PATCH 2/3] drm/rockchip: fb: add missing header John Keeping
@ 2016-05-10 16:03 ` John Keeping
  2016-05-23  6:10 ` [PATCH 0/3] drm/rockchip: fix some sparse warnings Mark yao
  3 siblings, 0 replies; 5+ messages in thread
From: John Keeping @ 2016-05-10 16:03 UTC (permalink / raw)
  To: Mark Yao
  Cc: David Airlie, Heiko Stuebner, dri-devel, linux-arm-kernel,
	linux-rockchip, linux-kernel, John Keeping

Combined with the previous commit, this fixes all of the sparse warnings
in drm/rockchip.

Signed-off-by: John Keeping <john@metanate.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 ++--
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c  | 6 +++---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
 drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 399adf3c4224..b253f65c3e14 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -287,7 +287,7 @@ static void rockchip_drm_preclose(struct drm_device *dev,
 		rockchip_drm_crtc_cancel_pending_vblank(crtc, file_priv);
 }
 
-void rockchip_drm_lastclose(struct drm_device *dev)
+static void rockchip_drm_lastclose(struct drm_device *dev)
 {
 	struct rockchip_drm_private *priv = dev->dev_private;
 
@@ -307,7 +307,7 @@ static const struct file_operations rockchip_drm_driver_fops = {
 	.release = drm_release,
 };
 
-const struct vm_operations_struct rockchip_drm_vm_ops = {
+static const struct vm_operations_struct rockchip_drm_vm_ops = {
 	.open = drm_gem_vm_open,
 	.close = drm_gem_vm_close,
 };
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
index 85aa87ee12f5..96d91f16e001 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
@@ -275,9 +275,9 @@ void rockchip_drm_atomic_work(struct work_struct *work)
 	rockchip_atomic_commit_complete(commit);
 }
 
-int rockchip_drm_atomic_commit(struct drm_device *dev,
-			       struct drm_atomic_state *state,
-			       bool nonblock)
+static int rockchip_drm_atomic_commit(struct drm_device *dev,
+				      struct drm_atomic_state *state,
+				      bool nonblock)
 {
 	struct rockchip_drm_private *private = dev->dev_private;
 	struct rockchip_atomic_commit *commit = &private->commit;
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index bf55cda356ba..949171a80631 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -779,7 +779,7 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = {
 	.atomic_disable = vop_plane_atomic_disable,
 };
 
-void vop_atomic_plane_reset(struct drm_plane *plane)
+static void vop_atomic_plane_reset(struct drm_plane *plane)
 {
 	struct vop_plane_state *vop_plane_state =
 					to_vop_plane_state(plane->state);
@@ -796,7 +796,7 @@ void vop_atomic_plane_reset(struct drm_plane *plane)
 	plane->state->plane = plane;
 }
 
-struct drm_plane_state *
+static struct drm_plane_state *
 vop_atomic_plane_duplicate_state(struct drm_plane *plane)
 {
 	struct vop_plane_state *old_vop_plane_state;
diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
index 3166b46a5893..52661d116ec2 100644
--- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
+++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
@@ -299,7 +299,7 @@ static int vop_remove(struct platform_device *pdev)
 	return 0;
 }
 
-struct platform_driver vop_platform_driver = {
+static struct platform_driver vop_platform_driver = {
 	.probe = vop_probe,
 	.remove = vop_remove,
 	.driver = {
-- 
2.8.2.565.gdb84f68.dirty

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

* Re: [PATCH 0/3] drm/rockchip: fix some sparse warnings
  2016-05-10 16:03 [PATCH 0/3] drm/rockchip: fix some sparse warnings John Keeping
                   ` (2 preceding siblings ...)
  2016-05-10 16:03 ` [PATCH 3/3] drm/rockchip: fix "should it be static?" warnings John Keeping
@ 2016-05-23  6:10 ` Mark yao
  3 siblings, 0 replies; 5+ messages in thread
From: Mark yao @ 2016-05-23  6:10 UTC (permalink / raw)
  To: John Keeping
  Cc: David Airlie, Heiko Stuebner, dri-devel, linux-arm-kernel,
	linux-rockchip, linux-kernel

On 2016年05月11日 00:03, John Keeping wrote:
> The first patch wasn't found by sparse, but is something I noticed while
> in the area.  The following two fix all of the sparse warnings inside
> drm/rockchip.
>
> John Keeping (3):
>    drm/rockchip: dw_hdmi: remove unused #include
>    drm/rockchip: fb: add missing header
>    drm/rockchip: fix "should it be static?" warnings
>
>   drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 1 -
>   drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 ++--
>   drivers/gpu/drm/rockchip/rockchip_drm_fb.c  | 7 ++++---
>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
>   drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 +-
>   5 files changed, 9 insertions(+), 9 deletions(-)
>

Hi John

Sorry for reply late, this series of patches looks good for me, Applied 
to my branch.

Thanks.

-- 
Mark Yao

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

end of thread, other threads:[~2016-05-23  6:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-10 16:03 [PATCH 0/3] drm/rockchip: fix some sparse warnings John Keeping
2016-05-10 16:03 ` [PATCH 1/3] drm/rockchip: dw_hdmi: remove unused #include John Keeping
2016-05-10 16:03 ` [PATCH 2/3] drm/rockchip: fb: add missing header John Keeping
2016-05-10 16:03 ` [PATCH 3/3] drm/rockchip: fix "should it be static?" warnings John Keeping
2016-05-23  6:10 ` [PATCH 0/3] drm/rockchip: fix some sparse warnings Mark yao

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