All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] drm: Fix a bunch of sparse warnings
@ 2016-09-19 13:33 ville.syrjala
  2016-09-19 13:33 ` [PATCH 01/14] drm/atomic-helper: Fix " ville.syrjala
                   ` (13 more replies)
  0 siblings, 14 replies; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

I got a bit fed up from the sparse noise during a full build,
so I tried to shut some of it up. Mostly missing statics or function
declarations.

I didn't touch the main offender (radeon/amdgpu) since there was enough
of this stuff in the other drivers as well. Nouveau was pretty bad too,
but it was spread around mode so I didn't realize how much there was
until I was already half way through. If I had, I probably wouldn't
have bothered. There's still a bunch of warnings left in many of the
drivers (__mmio type of stuff is probably responsible for most of it).

Entire series avaialable here:
git://github.com/vsyrjala/linux.git drm_sparse_warn

Ville Syrjälä (14):
  drm/atomic-helper: Fix sparse warnings
  drm/blend: Fix sparse warnings
  drm/fb-helper: Fix sparse warnings
  drm/arm: Fix sparse warnings
  drm/ast: Fix sparse warnings
  drm/bochs: Fix sparse warnings
  drm/cirrus: Fix sparse warnings
  drm/mgag200: Fix sparse warnings
  drm/msm: Fix sparse warnings
  drm/nouveau: Fix sparse warnings
  drm/rockchip: Fix sparse warnings
  drm/sti: Fix sparse warnings
  drm/sun4i: Fix sparse warnings
  drm/tilcdc: Fix sparse warnings

 drivers/gpu/drm/arm/malidp_planes.c                |  6 ++--
 drivers/gpu/drm/ast/ast_drv.c                      |  2 +-
 drivers/gpu/drm/ast/ast_ttm.c                      |  2 +-
 drivers/gpu/drm/bochs/bochs_kms.c                  |  2 +-
 drivers/gpu/drm/bochs/bochs_mm.c                   |  2 +-
 drivers/gpu/drm/cirrus/cirrus_drv.c                |  2 +-
 drivers/gpu/drm/cirrus/cirrus_ttm.c                |  2 +-
 drivers/gpu/drm/drm_atomic_helper.c                |  2 +-
 drivers/gpu/drm/drm_blend.c                        |  2 +-
 drivers/gpu/drm/drm_crtc_helper_internal.h         |  7 ++++
 drivers/gpu/drm/drm_fb_helper.c                    |  2 ++
 drivers/gpu/drm/mgag200/mgag200_drv.c              |  2 +-
 drivers/gpu/drm/mgag200/mgag200_ttm.c              |  2 +-
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c   |  2 +-
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c          |  2 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c            | 12 +++----
 drivers/gpu/drm/msm/msm_fb.c                       |  2 +-
 drivers/gpu/drm/nouveau/dispnv04/overlay.c         |  2 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c        |  2 +-
 drivers/gpu/drm/nouveau/nouveau_display.c          |  2 +-
 drivers/gpu/drm/nouveau/nv10_fence.c               |  2 +-
 drivers/gpu/drm/nouveau/nvif/client.c              |  2 +-
 drivers/gpu/drm/nouveau/nvkm/core/firmware.c       |  1 +
 drivers/gpu/drm/nouveau/nvkm/engine/device/user.c  |  2 +-
 .../gpu/drm/nouveau/nvkm/engine/disp/channv50.c    |  8 ++---
 drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg94.c |  2 +-
 .../gpu/drm/nouveau/nvkm/engine/disp/coregp104.c   |  2 +-
 .../gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c    |  2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c  |  2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c |  4 +--
 drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c  |  2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c  |  2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c   |  1 +
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c     |  4 +--
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c     |  4 +--
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c     |  2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c      |  4 +--
 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.c     |  2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c     |  4 +--
 drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c    |  2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c  |  8 ++---
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c     |  1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c     |  1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c   |  2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c      |  2 +-
 .../gpu/drm/nouveau/nvkm/subdev/iccsense/base.c    |  2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c |  4 +--
 drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c       |  2 +-
 .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c    |  2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c   |  4 +--
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c   |  4 +--
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c    |  1 +
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c        |  4 +--
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c      |  1 +
 drivers/gpu/drm/sti/sti_compositor.c               |  4 +--
 drivers/gpu/drm/sti/sti_cursor.c                   |  2 +-
 drivers/gpu/drm/sti/sti_drv.c                      |  2 +-
 drivers/gpu/drm/sti/sti_dvo.c                      |  3 +-
 drivers/gpu/drm/sti/sti_gdp.c                      |  6 ++--
 drivers/gpu/drm/sti/sti_hqvdp.c                    |  7 ++--
 drivers/gpu/drm/sti/sti_mixer.c                    |  2 +-
 drivers/gpu/drm/sti/sti_tvout.c                    |  1 +
 drivers/gpu/drm/sti/sti_vtac.c                     |  2 ++
 drivers/gpu/drm/sti/sti_vtg.c                      |  3 +-
 drivers/gpu/drm/sun4i/sun4i_tv.c                   | 38 +++++++++++-----------
 drivers/gpu/drm/tilcdc/tilcdc_drv.c                |  4 +--
 drivers/gpu/drm/tilcdc/tilcdc_panel.c              |  3 +-
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c             |  3 +-
 include/drm/drm_fb_helper.h                        |  5 ---
 69 files changed, 127 insertions(+), 109 deletions(-)

-- 
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] 25+ messages in thread

* [PATCH 01/14] drm/atomic-helper: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 13:33 ` [PATCH 02/14] drm/blend: " ville.syrjala
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/drm_atomic_helper.c:1696:6: warning: symbol 'plane_crtc_active' was not declared. Should it be static?

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index ea78d70de9f3..c3f83476f996 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1693,7 +1693,7 @@ fail:
 }
 EXPORT_SYMBOL(drm_atomic_helper_prepare_planes);
 
-bool plane_crtc_active(struct drm_plane_state *state)
+static bool plane_crtc_active(const struct drm_plane_state *state)
 {
 	return state->crtc && state->crtc->state->active;
 }
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 02/14] drm/blend: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
  2016-09-19 13:33 ` [PATCH 01/14] drm/atomic-helper: Fix " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-20  6:52   ` Laurent Pinchart
  2016-09-19 13:33 ` [PATCH 03/14] drm/fb-helper: " ville.syrjala
                   ` (11 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Laurent Pinchart, Marek Szyprowski

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/drm_blend.c:207:5: warning: symbol 'drm_atomic_normalize_zpos' was not declared. Should it be static?

Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_blend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
index 0813b7e021be..0a0b9357db35 100644
--- a/drivers/gpu/drm/drm_blend.c
+++ b/drivers/gpu/drm/drm_blend.c
@@ -30,7 +30,7 @@
 #include <linux/slab.h>
 #include <linux/sort.h>
 
-#include "drm_internal.h"
+#include "drm_crtc_internal.h"
 
 /**
  * drm_plane_create_zpos_property - create mutable zpos property
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 03/14] drm/fb-helper: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
  2016-09-19 13:33 ` [PATCH 01/14] drm/atomic-helper: Fix " ville.syrjala
  2016-09-19 13:33 ` [PATCH 02/14] drm/blend: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 14:46   ` Daniel Vetter
  2016-09-19 13:33 ` [PATCH 04/14] drm/arm: " ville.syrjala
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/drm_fb_helper.c:2306:12: warning: symbol 'drm_fb_helper_modinit' was not declared. Should it be static?

While at it, move the lefover static inline to the right place.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_crtc_helper_internal.h | 7 +++++++
 drivers/gpu/drm/drm_fb_helper.c            | 2 ++
 include/drm/drm_fb_helper.h                | 5 -----
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h
index 4e6b57ae7188..28295e5d0d9e 100644
--- a/drivers/gpu/drm/drm_crtc_helper_internal.h
+++ b/drivers/gpu/drm/drm_crtc_helper_internal.h
@@ -29,7 +29,14 @@
 #include <drm/drm_dp_helper.h>
 
 /* drm_fb_helper.c */
+#ifdef CONFIG_DRM_FBDEV_EMULATION
 int drm_fb_helper_modinit(void);
+#else
+static inline int drm_fb_helper_modinit(void)
+{
+	return 0;
+}
+#endif
 
 /* drm_dp_aux_dev.c */
 #ifdef CONFIG_DRM_DP_AUX_CHARDEV
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index dd8e3b68fd53..03414bde1f15 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -41,6 +41,8 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 
+#include "drm_crtc_helper_internal.h"
+
 static bool drm_fbdev_emulation = true;
 module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, 0600);
 MODULE_PARM_DESC(fbdev_emulation,
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 797fb5f80c45..e19458dd1a43 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -287,11 +287,6 @@ int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_
 int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
 				       struct drm_connector *connector);
 #else
-static inline int drm_fb_helper_modinit(void)
-{
-	return 0;
-}
-
 static inline void drm_fb_helper_prepare(struct drm_device *dev,
 					struct drm_fb_helper *helper,
 					const struct drm_fb_helper_funcs *funcs)
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 04/14] drm/arm: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (2 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 03/14] drm/fb-helper: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-20  8:06   ` Liviu Dudau
  2016-09-19 13:33 ` [PATCH 05/14] drm/ast: " ville.syrjala
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Mali DP Maintainers, Liviu Dudau

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/arm/malidp_planes.c:49:24: warning: symbol 'malidp_duplicate_plane_state' was not declared. Should it be static?
drm/arm/malidp_planes.c:66:6: warning: symbol 'malidp_destroy_plane_state' was not declared. Should it be static?

Cc: Liviu Dudau <Liviu.Dudau@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/arm/malidp_planes.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
index 82c193e5e0d6..cc9b8e02904d 100644
--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -46,7 +46,7 @@ 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,8 +63,8 @@ struct drm_plane_state *malidp_duplicate_plane_state(struct drm_plane *plane)
 	return &state->base;
 }
 
-void malidp_destroy_plane_state(struct drm_plane *plane,
-				struct drm_plane_state *state)
+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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 05/14] drm/ast: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (3 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 04/14] drm/arm: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 13:33 ` [PATCH 06/14] drm/bochs: " ville.syrjala
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Dave Airlie

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/ast/ast_drv.c:36:5: warning: symbol 'ast_modeset' was not declared. Should it be static?
drm/ast/ast_ttm.c:227:22: warning: symbol 'ast_bo_driver' was not declared. Should it be static?

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/ast/ast_drv.c | 2 +-
 drivers/gpu/drm/ast/ast_ttm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index f54afd2113a9..3d16d9f1f3ec 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -33,7 +33,7 @@
 
 #include "ast_drv.h"
 
-int ast_modeset = -1;
+static int ast_modeset = -1;
 
 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
 module_param_named(modeset, ast_modeset, int, 0400);
diff --git a/drivers/gpu/drm/ast/ast_ttm.c b/drivers/gpu/drm/ast/ast_ttm.c
index b29a41218fc9..899ee7711f15 100644
--- a/drivers/gpu/drm/ast/ast_ttm.c
+++ b/drivers/gpu/drm/ast/ast_ttm.c
@@ -224,7 +224,7 @@ static void ast_ttm_tt_unpopulate(struct ttm_tt *ttm)
 	ttm_pool_unpopulate(ttm);
 }
 
-struct ttm_bo_driver ast_bo_driver = {
+static struct ttm_bo_driver ast_bo_driver = {
 	.ttm_tt_create = ast_ttm_tt_create,
 	.ttm_tt_populate = ast_ttm_tt_populate,
 	.ttm_tt_unpopulate = ast_ttm_tt_unpopulate,
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 06/14] drm/bochs: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (4 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 05/14] drm/ast: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 13:33 ` [PATCH 07/14] drm/cirrus: " ville.syrjala
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Gerd Hoffmann

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/bochs/bochs_mm.c:196:22: warning: symbol 'bochs_bo_driver' was not declared. Should it be static?
drm/bochs/bochs_kms.c:181:5: warning: symbol 'bochs_connector_get_modes' was not declared. Should it be static?

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/bochs/bochs_kms.c | 2 +-
 drivers/gpu/drm/bochs/bochs_mm.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
index 207a2cbcc113..0b4e5d117043 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -178,7 +178,7 @@ static void bochs_encoder_init(struct drm_device *dev)
 }
 
 
-int bochs_connector_get_modes(struct drm_connector *connector)
+static int bochs_connector_get_modes(struct drm_connector *connector)
 {
 	int count;
 
diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c
index 5c5638a777a1..dafd764134e8 100644
--- a/drivers/gpu/drm/bochs/bochs_mm.c
+++ b/drivers/gpu/drm/bochs/bochs_mm.c
@@ -193,7 +193,7 @@ static struct ttm_tt *bochs_ttm_tt_create(struct ttm_bo_device *bdev,
 	return tt;
 }
 
-struct ttm_bo_driver bochs_bo_driver = {
+static struct ttm_bo_driver bochs_bo_driver = {
 	.ttm_tt_create = bochs_ttm_tt_create,
 	.ttm_tt_populate = ttm_pool_populate,
 	.ttm_tt_unpopulate = ttm_pool_unpopulate,
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 07/14] drm/cirrus: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (5 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 06/14] drm/bochs: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 13:33 ` [PATCH 08/14] drm/mgag200: " ville.syrjala
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Dave Airlie

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/cirrus/cirrus_drv.c:18:5: warning: symbol 'cirrus_modeset' was not declared. Should it be static?
drm/cirrus/cirrus_ttm.c:227:22: warning: symbol 'cirrus_bo_driver' was not declared. Should it be static?

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/cirrus/cirrus_drv.c | 2 +-
 drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c b/drivers/gpu/drm/cirrus/cirrus_drv.c
index 6c76d125995b..94928af5e7a4 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.c
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.c
@@ -15,7 +15,7 @@
 
 #include "cirrus_drv.h"
 
-int cirrus_modeset = -1;
+static int cirrus_modeset = -1;
 int cirrus_bpp = 24;
 
 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c
index 1cc9ee607128..13c2303e1d3e 100644
--- a/drivers/gpu/drm/cirrus/cirrus_ttm.c
+++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c
@@ -224,7 +224,7 @@ static void cirrus_ttm_tt_unpopulate(struct ttm_tt *ttm)
 	ttm_pool_unpopulate(ttm);
 }
 
-struct ttm_bo_driver cirrus_bo_driver = {
+static struct ttm_bo_driver cirrus_bo_driver = {
 	.ttm_tt_create = cirrus_ttm_tt_create,
 	.ttm_tt_populate = cirrus_ttm_tt_populate,
 	.ttm_tt_unpopulate = cirrus_ttm_tt_unpopulate,
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 08/14] drm/mgag200: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (6 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 07/14] drm/cirrus: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 13:33 ` [PATCH 09/14] drm/msm: " ville.syrjala
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Dave Airlie

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/mgag200/mgag200_drv.c:24:5: warning: symbol 'mgag200_modeset' was not declared. Should it be static?
drm/mgag200/mgag200_ttm.c:227:22: warning: symbol 'mgag200_bo_driver' was not declared. Should it be static?

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +-
 drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index 1443b3a34775..9c02a22451d2 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -21,7 +21,7 @@
  * which then performs further device association and calls our graphics init
  * functions
  */
-int mgag200_modeset = -1;
+static int mgag200_modeset = -1;
 
 MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
 module_param_named(modeset, mgag200_modeset, int, 0400);
diff --git a/drivers/gpu/drm/mgag200/mgag200_ttm.c b/drivers/gpu/drm/mgag200/mgag200_ttm.c
index 68268e55d595..88604af23382 100644
--- a/drivers/gpu/drm/mgag200/mgag200_ttm.c
+++ b/drivers/gpu/drm/mgag200/mgag200_ttm.c
@@ -224,7 +224,7 @@ static void mgag200_ttm_tt_unpopulate(struct ttm_tt *ttm)
 	ttm_pool_unpopulate(ttm);
 }
 
-struct ttm_bo_driver mgag200_bo_driver = {
+static struct ttm_bo_driver mgag200_bo_driver = {
 	.ttm_tt_create = mgag200_ttm_tt_create,
 	.ttm_tt_populate = mgag200_ttm_tt_populate,
 	.ttm_tt_unpopulate = mgag200_ttm_tt_unpopulate,
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 09/14] drm/msm: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (7 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 08/14] drm/mgag200: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 13:52   ` Emil Velikov
  2016-09-19 13:33 ` [PATCH 10/14] drm/nouveau: " ville.syrjala
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c:96:22: warning: symbol 'get_connector' was not declared. Should it be static?
drm/msm/mdp/mdp4/mdp4_plane.c:84:5: warning: symbol 'mdp4_plane_set_property' was not declared. Should it be static?
drm/msm/mdp/mdp5/mdp5_cfg.c:25:26: warning: symbol 'msm8x74v1_config' was not declared. Should it be static?
drm/msm/mdp/mdp5/mdp5_cfg.c:95:26: warning: symbol 'msm8x74v2_config' was not declared. Should it be static?
drm/msm/mdp/mdp5/mdp5_cfg.c:165:26: warning: symbol 'apq8084_config' was not declared. Should it be static?
drm/msm/mdp/mdp5/mdp5_cfg.c:243:26: warning: symbol 'msm8x16_config' was not declared. Should it be static?
drm/msm/mdp/mdp5/mdp5_cfg.c:304:26: warning: symbol 'msm8x94_config' was not declared. Should it be static?
drm/msm/mdp/mdp5/mdp5_cfg.c:382:26: warning: symbol 'msm8x96_config' was not declared. Should it be static?

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c |  2 +-
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c        |  2 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c          | 12 ++++++------
 drivers/gpu/drm/msm/msm_fb.c                     |  2 +-
 4 files changed, 9 insertions(+), 9 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 bc3d8e719c6c..a06b064f86c1 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 7c9626d92019..3903dbcda763 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
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
index ac9e4cde1380..94f9d1ad45b1 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
@@ -22,7 +22,7 @@ struct mdp5_cfg_handler {
 /* mdp5_cfg must be exposed (used in mdp5.xml.h) */
 const struct mdp5_cfg_hw *mdp5_cfg = NULL;
 
-const struct mdp5_cfg_hw msm8x74v1_config = {
+static const struct mdp5_cfg_hw msm8x74v1_config = {
 	.name = "msm8x74v1",
 	.mdp = {
 		.count = 1,
@@ -92,7 +92,7 @@ const struct mdp5_cfg_hw msm8x74v1_config = {
 	.max_clk = 200000000,
 };
 
-const struct mdp5_cfg_hw msm8x74v2_config = {
+static const struct mdp5_cfg_hw msm8x74v2_config = {
 	.name = "msm8x74",
 	.mdp = {
 		.count = 1,
@@ -162,7 +162,7 @@ const struct mdp5_cfg_hw msm8x74v2_config = {
 	.max_clk = 200000000,
 };
 
-const struct mdp5_cfg_hw apq8084_config = {
+static const struct mdp5_cfg_hw apq8084_config = {
 	.name = "apq8084",
 	.mdp = {
 		.count = 1,
@@ -240,7 +240,7 @@ const struct mdp5_cfg_hw apq8084_config = {
 	.max_clk = 320000000,
 };
 
-const struct mdp5_cfg_hw msm8x16_config = {
+static const struct mdp5_cfg_hw msm8x16_config = {
 	.name = "msm8x16",
 	.mdp = {
 		.count = 1,
@@ -301,7 +301,7 @@ const struct mdp5_cfg_hw msm8x16_config = {
 	.max_clk = 320000000,
 };
 
-const struct mdp5_cfg_hw msm8x94_config = {
+static const struct mdp5_cfg_hw msm8x94_config = {
 	.name = "msm8x94",
 	.mdp = {
 		.count = 1,
@@ -379,7 +379,7 @@ const struct mdp5_cfg_hw msm8x94_config = {
 	.max_clk = 400000000,
 };
 
-const struct mdp5_cfg_hw msm8x96_config = {
+static const struct mdp5_cfg_hw msm8x96_config = {
 	.name = "msm8x96",
 	.mdp = {
 		.count = 1,
diff --git a/drivers/gpu/drm/msm/msm_fb.c b/drivers/gpu/drm/msm/msm_fb.c
index 95cf8fe72ee5..8c5b399f387e 100644
--- a/drivers/gpu/drm/msm/msm_fb.c
+++ b/drivers/gpu/drm/msm/msm_fb.c
@@ -132,7 +132,7 @@ const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb)
 struct drm_framebuffer *msm_framebuffer_create(struct drm_device *dev,
 		struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd)
 {
-	struct drm_gem_object *bos[4] = {0};
+	struct drm_gem_object *bos[4] = {};
 	struct drm_framebuffer *fb;
 	int ret, i, n = drm_format_num_planes(mode_cmd->pixel_format);
 
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 10/14] drm/nouveau: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (8 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 09/14] drm/msm: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 13:33 ` [PATCH 11/14] drm/rockchip: " ville.syrjala
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Ben Skeggs

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/nouveau/dispnv04/overlay.c:496:1: warning: symbol 'nouveau_overlay_init' was not declared. Should it be static?
drm/nouveau/nouveau_connector.c:63:5: warning: symbol 'nouveau_hdmimhz' was not declared. Should it be static?
drm/nouveau/nouveau_display.c:96:1: warning: symbol 'nouveau_display_scanoutpos_head' was not declared. Should it be static?
drm/nouveau/nv10_fence.c:70:1: warning: symbol 'nv10_fence_context_new' was not declared. Should it be static?
drm/nouveau/nvif/client.c:58:26: warning: symbol 'nvif_drivers' was not declared. Should it be static?
drm/nouveau/nvkm/core/firmware.c:34:1: warning: symbol 'nvkm_firmware_get' was not declared. Should it be static?
drm/nouveau/nvkm/core/firmware.c:58:1: warning: symbol 'nvkm_firmware_put' was not declared. Should it be static?
drm/nouveau/nvkm/engine/device/user.c:330:1: warning: symbol 'nvkm_udevice_new' was not declared. Should it be static?
drm/nouveau/nvkm/engine/disp/channv50.c:157:1: warning: symbol 'nv50_disp_chan_rd32' was not declared. Should it be static?
drm/nouveau/nvkm/engine/disp/channv50.c:167:1: warning: symbol 'nv50_disp_chan_wr32' was not declared. Should it be static?
drm/nouveau/nvkm/engine/disp/channv50.c:177:1: warning: symbol 'nv50_disp_chan_ntfy' was not declared. Should it be static?
drm/nouveau/nvkm/engine/disp/channv50.c:193:1: warning: symbol 'nv50_disp_chan_map' was not declared. Should it be static?
drm/nouveau/nvkm/engine/disp/coreg94.c:30:1: warning: symbol 'g94_disp_core_mthd_sor' was not declared. Should it be static?
drm/nouveau/nvkm/engine/disp/coregp104.c:63:1: warning: symbol 'gp104_disp_core_func' was not declared. Should it be static?
drm/nouveau/nvkm/engine/disp/rootnv50.c:70:1: warning: symbol 'nv50_disp_root_mthd_' was not declared. Should it be static?
drm/nouveau/nvkm/engine/disp/sorg94.c:49:1: warning: symbol 'g94_sor_output_new' was not declared. Should it be static?
drm/nouveau/nvkm/engine/fifo/chang84.c:133:1: warning: symbol 'g84_fifo_chan_engine_init' was not declared. Should it be static?
drm/nouveau/nvkm/engine/fifo/chang84.c:174:1: warning: symbol 'g84_fifo_chan_object_ctor' was not declared. Should it be static?
drm/nouveau/nvkm/engine/gr/ctxgf117.c:222:1: warning: symbol 'gf117_grctx_generate_main' was not declared. Should it be static?
drm/nouveau/nvkm/engine/gr/ctxgm107.c:937:1: warning: symbol 'gm107_grctx_generate_tpcid' was not declared. Should it be static?
drm/nouveau/nvkm/engine/gr/ctxnv50.c:255:1: warning: symbol 'nv50_grctx_fill' was not declared. Should it be static?
drm/nouveau/nvkm/engine/gr/ctxnv50.c:265:1: warning: symbol 'nv50_grctx_init' was not declared. Should it be static?
drm/nouveau/nvkm/engine/gr/gf100.c:1388:1: warning: symbol 'gf100_gr_init_fw' was not declared. Should it be static?
drm/nouveau/nvkm/engine/gr/gf100.c:1705:1: warning: symbol 'gf100_gr_init_' was not declared. Should it be static?
drm/nouveau/nvkm/engine/gr/gf117.c:106:1: warning: symbol 'gf117_gr_fecs_ucode' was not declared. Should it be static?
drm/nouveau/nvkm/engine/gr/gf117.c:116:1: warning: symbol 'gf117_gr_gpccs_ucode' was not declared. Should it be static?
drm/nouveau/nvkm/engine/gr/gm107.c:312:1: warning: symbol 'gm107_gr_init' was not declared. Should it be static?
drm/nouveau/nvkm/engine/pm/base.c:703:1: warning: symbol 'nvkm_perfsrc_new' was not declared. Should it be static?
drm/nouveau/nvkm/engine/pm/base.c:74:21: warning: symbol 'nvkm_perfsig_find' was not declared. Should it be static?
drm/nouveau/nvkm/engine/pm/gf100.c:106:1: warning: symbol 'gf100_pm_part' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/bios/fan.c:29:1: warning: symbol 'nvbios_fan_table' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/bios/fan.c:56:1: warning: symbol 'nvbios_fan_entry' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/clk/gt215.c:184:1: warning: symbol 'gt215_clk_info' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/fb/ramgt215.c:153:1: warning: symbol 'gt215_link_train' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/fb/ramgt215.c:271:1: warning: symbol 'gt215_link_train_init' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/fb/ramgt215.c:337:1: warning: symbol 'gt215_link_train_fini' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/fb/ramgt215.c:99:1: warning: symbol 'gt215_link_train_calc' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/fb/sddr2.c:60:1: warning: symbol 'nvkm_sddr2_calc' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/fb/sddr3.c:69:1: warning: symbol 'nvkm_sddr3_calc' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/gpio/gk104.c:41:1: warning: symbol 'gk104_gpio_intr_mask' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/i2c/aux.c:78:1: warning: symbol 'nvkm_i2c_aux_i2c_algo' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/iccsense/base.c:332:25: warning: symbol 'iccsense_func' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/instmem/base.c:108:1: warning: symbol 'nvkm_instobj_func' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/instmem/base.c:160:1: warning: symbol 'nvkm_instobj_func_slow' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/mc/g84.c:38:1: warning: symbol 'g84_mc_intr' was not declared. Should it be static?
 ../drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c:1206:20: warning: Variable length array is used.
drm/nouveau/nvkm/subdev/secboot/gm200.c:1368:1: warning: symbol 'gm200_secboot_fini' was not declared. Should it be static?
 ../drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c:779:42: warning: Variable length array is used.
drm/nouveau/nvkm/subdev/volt/gk104.c:38:1: warning: symbol 'gk104_volt_get' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/volt/gk104.c:51:1: warning: symbol 'gk104_volt_set' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/volt/gm20b.c:28:23: warning: symbol 'gm20b_cvb_coef' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/volt/gm20b.c:61:11: warning: symbol 'speedo_to_vmin' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/volt/gpio.c:35:1: warning: symbol 'nvkm_voltgpio_get' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/volt/gpio.c:54:1: warning: symbol 'nvkm_voltgpio_set' was not declared. Should it be static?
drm/nouveau/nvkm/subdev/volt/gpio.c:71:1: warning: symbol 'nvkm_voltgpio_init' was not declared. Should it be static?

Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/nouveau/dispnv04/overlay.c           | 2 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c          | 2 +-
 drivers/gpu/drm/nouveau/nouveau_display.c            | 2 +-
 drivers/gpu/drm/nouveau/nv10_fence.c                 | 2 +-
 drivers/gpu/drm/nouveau/nvif/client.c                | 2 +-
 drivers/gpu/drm/nouveau/nvkm/core/firmware.c         | 1 +
 drivers/gpu/drm/nouveau/nvkm/engine/device/user.c    | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c  | 8 ++++----
 drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg94.c   | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp104.c | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c  | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c    | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c   | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c    | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c    | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c     | 1 +
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c       | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c       | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c       | 2 +-
 drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c        | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.c       | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c       | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c      | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c    | 8 ++++----
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c       | 1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c       | 1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c     | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c        | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c  | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c   | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c         | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c  | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c     | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c     | 4 ++--
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c      | 1 +
 35 files changed, 49 insertions(+), 44 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/overlay.c b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
index ec444eac6258..486401f6dab8 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/overlay.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
@@ -27,6 +27,7 @@
 #include <drm/drm_crtc.h>
 #include <drm/drm_fourcc.h>
 
+#include "disp.h"
 #include "nouveau_drv.h"
 
 #include "nouveau_bo.h"
@@ -34,7 +35,6 @@
 #include "nouveau_display.h"
 #include "nvreg.h"
 
-
 struct nouveau_plane {
 	struct drm_plane base;
 	bool flip;
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index c1084088f9e4..61f3f67b5f09 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -60,7 +60,7 @@ int nouveau_duallink = 1;
 module_param_named(duallink, nouveau_duallink, int, 0400);
 
 MODULE_PARM_DESC(hdmimhz, "Force a maximum HDMI pixel clock (in MHz)");
-int nouveau_hdmimhz = 0;
+static int nouveau_hdmimhz;
 module_param_named(hdmimhz, nouveau_hdmimhz, int, 0400);
 
 struct nouveau_encoder *
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index afbf557b23d4..b60ee21f4571 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -92,7 +92,7 @@ calc(int blanks, int blanke, int total, int line)
 	return line;
 }
 
-int
+static int
 nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
 				ktime_t *stime, ktime_t *etime)
 {
diff --git a/drivers/gpu/drm/nouveau/nv10_fence.c b/drivers/gpu/drm/nouveau/nv10_fence.c
index 4e3de34ff6f4..619f79de5859 100644
--- a/drivers/gpu/drm/nouveau/nv10_fence.c
+++ b/drivers/gpu/drm/nouveau/nv10_fence.c
@@ -66,7 +66,7 @@ nv10_fence_context_del(struct nouveau_channel *chan)
 	nouveau_fence_context_free(&fctx->base);
 }
 
-int
+static int
 nv10_fence_context_new(struct nouveau_channel *chan)
 {
 	struct nv10_fence_chan *fctx;
diff --git a/drivers/gpu/drm/nouveau/nvif/client.c b/drivers/gpu/drm/nouveau/nvif/client.c
index 1ee9294eca2e..29c20dfd894d 100644
--- a/drivers/gpu/drm/nouveau/nvif/client.c
+++ b/drivers/gpu/drm/nouveau/nvif/client.c
@@ -55,7 +55,7 @@ nvif_client_fini(struct nvif_client *client)
 	}
 }
 
-const struct nvif_driver *
+static const struct nvif_driver *
 nvif_drivers[] = {
 #ifdef __KERNEL__
 	&nvif_driver_nvkm,
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/firmware.c b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
index 34ecd4a7e0c1..058ff46b5f16 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/firmware.c
@@ -20,6 +20,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 #include <core/device.h>
+#include <core/firmware.h>
 
 /**
  * nvkm_firmware_get - load firmware from the official nvidia/chip/ directory
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
index 79a8f71cf788..513ee6b79553 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/user.c
@@ -326,7 +326,7 @@ nvkm_udevice = {
 	.sclass = nvkm_udevice_child_get,
 };
 
-int
+static int
 nvkm_udevice_new(const struct nvkm_oclass *oclass, void *data, u32 size,
 		 struct nvkm_object **pobject)
 {
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
index dd2953bc9264..26990d44ae75 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c
@@ -153,7 +153,7 @@ nv50_disp_chan_uevent = {
 	.fini = nv50_disp_chan_uevent_fini,
 };
 
-int
+static int
 nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data)
 {
 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
@@ -163,7 +163,7 @@ nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data)
 	return 0;
 }
 
-int
+static int
 nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data)
 {
 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
@@ -173,7 +173,7 @@ nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data)
 	return 0;
 }
 
-int
+static int
 nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type,
 		    struct nvkm_event **pevent)
 {
@@ -189,7 +189,7 @@ nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type,
 	return -EINVAL;
 }
 
-int
+static int
 nv50_disp_chan_map(struct nvkm_object *object, u64 *addr, u32 *size)
 {
 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg94.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg94.c
index 019379a3a01c..b94db5e68cab 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg94.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/coreg94.c
@@ -26,7 +26,7 @@
 
 #include <nvif/class.h>
 
-const struct nv50_disp_mthd_list
+static const struct nv50_disp_mthd_list
 g94_disp_core_mthd_sor = {
 	.mthd = 0x0040,
 	.addr = 0x000008,
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp104.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp104.c
index 6922f4007b61..e356f87fbe60 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp104.c
@@ -59,7 +59,7 @@ gp104_disp_core_init(struct nv50_disp_dmac *chan)
 	return 0;
 }
 
-const struct nv50_disp_dmac_func
+static const struct nv50_disp_dmac_func
 gp104_disp_core_func = {
 	.init = gp104_disp_core_init,
 	.fini = gf119_disp_core_fini,
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
index 2f9cecd81d04..6424b396dcde 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
@@ -66,7 +66,7 @@ nv50_disp_root_scanoutpos(NV50_DISP_MTHD_V0)
 	return 0;
 }
 
-int
+static int
 nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size)
 {
 	union {
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c
index 1bb9d661e9b3..bae51b5ba51d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorg94.c
@@ -45,7 +45,7 @@ static const struct nvkm_output_func
 g94_sor_output_func = {
 };
 
-int
+static int
 g94_sor_output_new(struct nvkm_disp *disp, int index,
 		   struct dcb_output *dcbE, struct nvkm_output **poutp)
 {
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c
index aeb3387a3fb0..15a992b3580a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c
@@ -129,7 +129,7 @@ g84_fifo_chan_engine_fini(struct nvkm_fifo_chan *base,
 }
 
 
-int
+static int
 g84_fifo_chan_engine_init(struct nvkm_fifo_chan *base,
 			  struct nvkm_engine *engine)
 {
@@ -170,7 +170,7 @@ g84_fifo_chan_engine_ctor(struct nvkm_fifo_chan *base,
 	return nvkm_object_bind(object, NULL, 0, &chan->engn[engn]);
 }
 
-int
+static int
 g84_fifo_chan_object_ctor(struct nvkm_fifo_chan *base,
 			  struct nvkm_object *object)
 {
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
index c925ade5880e..74a64e3fd59a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
@@ -218,7 +218,7 @@ gf117_grctx_generate_attrib(struct gf100_grctx *info)
 	}
 }
 
-void
+static void
 gf117_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
 {
 	struct nvkm_device *device = gr->base.engine.subdev.device;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
index 6d3c5011e18c..4c4b5ab6e46d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
@@ -933,7 +933,7 @@ gm107_grctx_generate_attrib(struct gf100_grctx *info)
 	}
 }
 
-void
+static void
 gm107_grctx_generate_tpcid(struct gf100_gr *gr)
 {
 	struct nvkm_device *device = gr->base.engine.subdev.device;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c
index 1e13278cf306..c8bb9191f9a2 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c
@@ -106,6 +106,7 @@
 #define CP_SEEK_2      0x00c800ff
 
 #include "ctxnv40.h"
+#include "nv50.h"
 
 #include <subdev/fb.h>
 
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
index 157919c788e6..eccdee04107d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
@@ -1384,7 +1384,7 @@ gf100_gr_intr(struct nvkm_gr *base)
 	nvkm_fifo_chan_put(device->fifo, flags, &chan);
 }
 
-void
+static void
 gf100_gr_init_fw(struct gf100_gr *gr, u32 fuc_base,
 		 struct gf100_gr_fuc *code, struct gf100_gr_fuc *data)
 {
@@ -1701,7 +1701,7 @@ gf100_gr_oneinit(struct nvkm_gr *base)
 	return 0;
 }
 
-int
+static int
 gf100_gr_init_(struct nvkm_gr *base)
 {
 	struct gf100_gr *gr = gf100_gr(base);
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c
index 70335f65c51e..0124e468086e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c
@@ -102,7 +102,7 @@ gf117_gr_pack_mmio[] = {
 
 #include "fuc/hubgf117.fuc3.h"
 
-struct gf100_gr_ucode
+static struct gf100_gr_ucode
 gf117_gr_fecs_ucode = {
 	.code.data = gf117_grhub_code,
 	.code.size = sizeof(gf117_grhub_code),
@@ -112,7 +112,7 @@ gf117_gr_fecs_ucode = {
 
 #include "fuc/gpcgf117.fuc3.h"
 
-struct gf100_gr_ucode
+static struct gf100_gr_ucode
 gf117_gr_gpccs_ucode = {
 	.code.data = gf117_grgpc_code,
 	.code.size = sizeof(gf117_grgpc_code),
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
index 45f965f608a7..2c67fac576d1 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
@@ -308,7 +308,7 @@ gm107_gr_init_bios(struct gf100_gr *gr)
 	}
 }
 
-int
+static int
 gm107_gr_init(struct gf100_gr *gr)
 {
 	struct nvkm_device *device = gr->base.engine.subdev.device;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c
index 8616636ad7b4..dde89a4a0f5b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c
@@ -71,7 +71,7 @@ nvkm_perfdom_find(struct nvkm_pm *pm, int di)
 	return NULL;
 }
 
-struct nvkm_perfsig *
+static struct nvkm_perfsig *
 nvkm_perfsig_find(struct nvkm_pm *pm, u8 di, u8 si, struct nvkm_perfdom **pdom)
 {
 	struct nvkm_perfdom *dom = *pdom;
@@ -699,7 +699,7 @@ nvkm_pm_oclass_get(struct nvkm_oclass *oclass, int index,
 	return 1;
 }
 
-int
+static int
 nvkm_perfsrc_new(struct nvkm_pm *pm, struct nvkm_perfsig *sig,
 		 const struct nvkm_specsrc *spec)
 {
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.c
index d2901e9a7808..fe2532ee4145 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.c
@@ -102,7 +102,7 @@ gf100_pm_gpc[] = {
 	{}
 };
 
-const struct nvkm_specdom
+static const struct nvkm_specdom
 gf100_pm_part[] = {
 	{ 0xe0, (const struct nvkm_specsig[]) {
 			{ 0x0f, "part00_pbfb_00", gf100_pbfb_sources },
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c
index 80fed7e78dcb..e2905815049b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c
@@ -25,7 +25,7 @@
 #include <subdev/bios/bit.h>
 #include <subdev/bios/fan.h>
 
-u16
+static u16
 nvbios_fan_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
 {
 	struct bit_entry bit_P;
@@ -52,7 +52,7 @@ nvbios_fan_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
 	return 0x0000;
 }
 
-u16
+static u16
 nvbios_fan_entry(struct nvkm_bios *bios, int idx, u8 *ver, u8 *hdr,
 		 u8 *cnt, u8 *len)
 {
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c
index 056702ef69aa..96e0941c8edd 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c
@@ -180,7 +180,7 @@ gt215_clk_read(struct nvkm_clk *base, enum nv_clk_src src)
 	return 0;
 }
 
-int
+static int
 gt215_clk_info(struct nvkm_clk *base, int idx, u32 khz,
 	       struct gt215_clk_info *info)
 {
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
index d15ea886df27..f10664372161 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
@@ -95,7 +95,7 @@ struct gt215_ram {
 	struct gt215_ltrain ltrain;
 };
 
-void
+static void
 gt215_link_train_calc(u32 *vals, struct gt215_ltrain *train)
 {
 	int i, lo, hi;
@@ -149,7 +149,7 @@ gt215_link_train_calc(u32 *vals, struct gt215_ltrain *train)
 /*
  * Link training for (at least) DDR3
  */
-int
+static int
 gt215_link_train(struct gt215_ram *ram)
 {
 	struct gt215_ltrain *train = &ram->ltrain;
@@ -267,7 +267,7 @@ out:
 	return ret;
 }
 
-int
+static int
 gt215_link_train_init(struct gt215_ram *ram)
 {
 	static const u32 pattern[16] = {
@@ -333,7 +333,7 @@ gt215_link_train_init(struct gt215_ram *ram)
 	return 0;
 }
 
-void
+static void
 gt215_link_train_fini(struct gt215_ram *ram)
 {
 	if (ram->ltrain.mem)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c
index b9f1ffdfc602..4dcd8742f2da 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c
@@ -23,6 +23,7 @@
  *          Ben Skeggs
  */
 #include "priv.h"
+#include "ram.h"
 
 struct ramxlat {
 	int id;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c
index 26900333b1d6..eca8a445eab3 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c
@@ -23,6 +23,7 @@
  * 	    Roy Spliet <rspliet@eclipso.eu>
  */
 #include "priv.h"
+#include "ram.h"
 
 struct ramxlat {
 	int id;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c
index 3f45afd17d5a..2ead515b8530 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/gk104.c
@@ -37,7 +37,7 @@ gk104_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo)
 	nvkm_wr32(device, 0x00dc80, intr1);
 }
 
-void
+static void
 gk104_gpio_intr_mask(struct nvkm_gpio *gpio, u32 type, u32 mask, u32 data)
 {
 	struct nvkm_device *device = gpio->subdev.device;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
index f0851d57df2f..01d5c5a56e2e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
@@ -74,7 +74,7 @@ nvkm_i2c_aux_i2c_func(struct i2c_adapter *adap)
 	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-const struct i2c_algorithm
+static const struct i2c_algorithm
 nvkm_i2c_aux_i2c_algo = {
 	.master_xfer = nvkm_i2c_aux_i2c_xfer,
 	.functionality = nvkm_i2c_aux_i2c_func
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
index 41bd5d0f7692..6c49beec5bde 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c
@@ -329,7 +329,7 @@ nvkm_iccsense_init(struct nvkm_subdev *subdev)
 	return 0;
 }
 
-struct nvkm_subdev_func iccsense_func = {
+static const struct nvkm_subdev_func iccsense_func = {
 	.oneinit = nvkm_iccsense_oneinit,
 	.init = nvkm_iccsense_init,
 	.dtor = nvkm_iccsense_dtor,
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c
index 8ed8f65ff664..10c987a654ec 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c
@@ -104,7 +104,7 @@ nvkm_instobj_dtor(struct nvkm_memory *memory)
 	return iobj;
 }
 
-const struct nvkm_memory_func
+static const struct nvkm_memory_func
 nvkm_instobj_func = {
 	.dtor = nvkm_instobj_dtor,
 	.target = nvkm_instobj_target,
@@ -156,7 +156,7 @@ nvkm_instobj_wr32_slow(struct nvkm_memory *memory, u64 offset, u32 data)
 	return nvkm_wo32(iobj->parent, offset, data);
 }
 
-const struct nvkm_memory_func
+static const struct nvkm_memory_func
 nvkm_instobj_func_slow = {
 	.dtor = nvkm_instobj_dtor,
 	.target = nvkm_instobj_target,
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c
index c3d66ef5dc12..430a61c3df44 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c
@@ -34,7 +34,7 @@ g84_mc_reset[] = {
 	{}
 };
 
-const struct nvkm_mc_map
+static const struct nvkm_mc_map
 g84_mc_intr[] = {
 	{ 0x04000000, NVKM_ENGINE_DISP },
 	{ 0x00020000, NVKM_ENGINE_VP },
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c
index f1e2dc914366..ec48e4ace37a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c
@@ -1364,7 +1364,7 @@ gm200_secboot_init(struct nvkm_secboot *sb)
 	return 0;
 }
 
-int
+static int
 gm200_secboot_fini(struct nvkm_secboot *sb, bool suspend)
 {
 	struct gm200_secboot *gsb = gm200_secboot(sb);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c
index 420bd84d8483..1527d12aa222 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c
@@ -34,7 +34,7 @@ struct gk104_volt {
 	struct nvbios_volt bios;
 };
 
-int
+static int
 gk104_volt_get(struct nvkm_volt *base)
 {
 	struct nvbios_volt *bios = &gk104_volt(base)->bios;
@@ -47,7 +47,7 @@ gk104_volt_get(struct nvkm_volt *base)
 	return bios->base + bios->pwm_range * duty / div;
 }
 
-int
+static int
 gk104_volt_set(struct nvkm_volt *base, u32 uv)
 {
 	struct nvbios_volt *bios = &gk104_volt(base)->bios;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c
index 74db4d28930f..2925b9cae681 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gm20b.c
@@ -25,7 +25,7 @@
 
 #include <core/tegra.h>
 
-const struct cvb_coef gm20b_cvb_coef[] = {
+static const struct cvb_coef gm20b_cvb_coef[] = {
 	/* KHz,             c0,      c1,   c2 */
 	/*  76800 */ { 1786666,  -85625, 1632 },
 	/* 153600 */ { 1846729,  -87525, 1632 },
@@ -58,7 +58,7 @@ static const struct cvb_coef gm20b_na_cvb_coef[] = {
 	/* 998400 */ { 1316991, 8144, -940, 808, -21583, 226 },
 };
 
-const u32 speedo_to_vmin[] = {
+static const u32 speedo_to_vmin[] = {
 	/*   0,      1,      2,      3,      4, */
 	950000, 840000, 818750, 840000, 810000,
 };
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c
index d2bac1d77819..cb749a0ba582 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/volt/gpio.c
@@ -22,6 +22,7 @@
  * Authors: Ben Skeggs
  */
 #include <subdev/volt.h>
+#include <subdev/volt/priv.h>
 #include <subdev/bios.h>
 #include <subdev/bios/gpio.h>
 #include <subdev/gpio.h>
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 11/14] drm/rockchip: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (9 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 10/14] drm/nouveau: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 13:33 ` [PATCH 12/14] drm/sti: " ville.syrjala
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/rockchip/rockchip_drm_drv.c:312:6: warning: symbol 'rockchip_drm_fb_suspend' was not declared. Should it be static?
drm/rockchip/rockchip_drm_drv.c:321:6: warning: symbol 'rockchip_drm_fb_resume' was not declared. Should it be static?
drm/rockchip/rockchip_drm_fbdev.c:130:5: warning: symbol 'rockchip_drm_fbdev_init' was not declared. Should it be static?
drm/rockchip/rockchip_drm_fbdev.c:173:6: warning: symbol 'rockchip_drm_fbdev_fini' was not declared. Should it be static?

Cc: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c   | 4 ++--
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 76eaf1de52e4..38c3be5f2c67 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;
 
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
index 207e01de6e32..a16c69f96ed5 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
@@ -20,6 +20,7 @@
 #include "rockchip_drm_drv.h"
 #include "rockchip_drm_gem.h"
 #include "rockchip_drm_fb.h"
+#include "rockchip_drm_fbdev.h"
 
 #define PREFERRED_BPP		32
 #define to_drm_private(x) \
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 12/14] drm/sti: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (10 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 11/14] drm/rockchip: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 14:52   ` Vincent ABRIOU
  2016-09-19 13:33 ` [PATCH 13/14] drm/sun4i: " ville.syrjala
  2016-09-19 13:33 ` [PATCH 14/14] drm/tilcdc: " ville.syrjala
  13 siblings, 1 reply; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Vincent Abriou

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/sti/sti_mixer.c:361:6: warning: symbol 'sti_mixer_set_matrix' was not declared. Should it be static?
drm/sti/sti_gdp.c:476:5: warning: symbol 'sti_gdp_field_cb' was not declared. Should it be static?
drm/sti/sti_gdp.c:885:24: warning: symbol 'sti_gdp_plane_helpers_funcs' was not declared. Should it be static?
drm/sti/sti_cursor.c:348:24: warning: symbol 'sti_cursor_plane_helpers_funcs' was not declared. Should it be static?
drm/sti/sti_compositor.c:28:28: warning: symbol 'stih407_compositor_data' was not declared. Should it be static?
drm/sti/sti_compositor.c:49:28: warning: symbol 'stih416_compositor_data' was not declared. Should it be static?
drm/sti/sti_vtg.c:75:1: warning: symbol 'vtg_lookup' was not declared. Should it be static?
drm/sti/sti_vtg.c:476:24: warning: symbol 'sti_vtg_driver' was not declared. Should it be static?
drm/sti/sti_dvo.c:109:5: warning: symbol 'dvo_awg_generate_code' was not declared. Should it be static?
drm/sti/sti_dvo.c:602:24: warning: symbol 'sti_dvo_driver' was not declared. Should it be static?
drm/sti/sti_vtac.c:209:24: warning: symbol 'sti_vtac_driver' was not declared. Should it be static?
drm/sti/sti_tvout.c:914:24: warning: symbol 'sti_tvout_driver' was not declared. Should it be static?
drm/sti/sti_hqvdp.c:786:5: warning: symbol 'sti_hqvdp_vtg_cb' was not declared. Should it be static?
drm/sti/sti_hqvdp.c:1253:24: warning: symbol 'sti_hqvdp_plane_helpers_funcs' was not declared. Should it be static?
drm/sti/sti_hqvdp.c:1292:5: warning: symbol 'sti_hqvdp_bind' was not declared. Should it be static?
drm/sti/sti_hqvdp.c:1385:24: warning: symbol 'sti_hqvdp_driver' was not declared. Should it be static?
drm/sti/sti_drv.c:143:6: warning: symbol 'sti_drm_dbg_cleanup' was not declared. Should it be static?

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/sti/sti_compositor.c | 4 ++--
 drivers/gpu/drm/sti/sti_cursor.c     | 2 +-
 drivers/gpu/drm/sti/sti_drv.c        | 2 +-
 drivers/gpu/drm/sti/sti_dvo.c        | 3 ++-
 drivers/gpu/drm/sti/sti_gdp.c        | 6 +++---
 drivers/gpu/drm/sti/sti_hqvdp.c      | 7 ++++---
 drivers/gpu/drm/sti/sti_mixer.c      | 2 +-
 drivers/gpu/drm/sti/sti_tvout.c      | 1 +
 drivers/gpu/drm/sti/sti_vtac.c       | 2 ++
 drivers/gpu/drm/sti/sti_vtg.c        | 3 ++-
 10 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
index 134201ecc6fd..a8441ae2623a 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -25,7 +25,7 @@
 /*
  * stiH407 compositor properties
  */
-struct sti_compositor_data stih407_compositor_data = {
+static const struct sti_compositor_data stih407_compositor_data = {
 	.nb_subdev = 8,
 	.subdev_desc = {
 			{STI_CURSOR_SUBDEV, (int)STI_CURSOR, 0x000},
@@ -46,7 +46,7 @@ struct sti_compositor_data stih407_compositor_data = {
  * Moreover, GDPx is different for Main and Aux Mixer. So this subdev map does
  * not fit for stiH416 if we want to enable the MIXER_AUX.
  */
-struct sti_compositor_data stih416_compositor_data = {
+static const struct sti_compositor_data stih416_compositor_data = {
 	.nb_subdev = 3,
 	.subdev_desc = {
 			{STI_GPD_SUBDEV, (int)STI_GDP_0, 0x100},
diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c
index 3b53f7f2e3fc..651f231c4615 100644
--- a/drivers/gpu/drm/sti/sti_cursor.c
+++ b/drivers/gpu/drm/sti/sti_cursor.c
@@ -345,7 +345,7 @@ static int sti_cursor_late_register(struct drm_plane *drm_plane)
 	return cursor_debugfs_init(cursor, drm_plane->dev->primary);
 }
 
-struct drm_plane_funcs sti_cursor_plane_helpers_funcs = {
+static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
 	.destroy = sti_cursor_destroy,
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
index 7cd3804c6dee..e6f0706bc6c7 100644
--- a/drivers/gpu/drm/sti/sti_drv.c
+++ b/drivers/gpu/drm/sti/sti_drv.c
@@ -140,7 +140,7 @@ err:
 	return ret;
 }
 
-void sti_drm_dbg_cleanup(struct drm_minor *minor)
+static void sti_drm_dbg_cleanup(struct drm_minor *minor)
 {
 	drm_debugfs_remove_files(sti_drm_dbg_list,
 				 ARRAY_SIZE(sti_drm_dbg_list), minor);
diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index 00881eb4536e..e8c1ed08a9f7 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -17,6 +17,7 @@
 #include <drm/drm_panel.h>
 
 #include "sti_awg_utils.h"
+#include "sti_drv.h"
 #include "sti_mixer.h"
 
 /* DVO registers */
@@ -106,7 +107,7 @@ struct sti_dvo_connector {
 	container_of(x, struct sti_dvo_connector, drm_connector)
 
 #define BLANKING_LEVEL 16
-int dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code)
+static int dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code)
 {
 	struct drm_display_mode *mode = &dvo->mode;
 	struct dvo_config *config = dvo->config;
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
index b8d942ca45e8..9873b4c360b9 100644
--- a/drivers/gpu/drm/sti/sti_gdp.c
+++ b/drivers/gpu/drm/sti/sti_gdp.c
@@ -473,8 +473,8 @@ static void sti_gdp_disable(struct sti_gdp *gdp)
  * RETURNS:
  * 0 on success.
  */
-int sti_gdp_field_cb(struct notifier_block *nb,
-		unsigned long event, void *data)
+static int sti_gdp_field_cb(struct notifier_block *nb,
+			    unsigned long event, void *data)
 {
 	struct sti_gdp *gdp = container_of(nb, struct sti_gdp, vtg_field_nb);
 
@@ -882,7 +882,7 @@ static int sti_gdp_late_register(struct drm_plane *drm_plane)
 	return gdp_debugfs_init(gdp, drm_plane->dev->primary);
 }
 
-struct drm_plane_funcs sti_gdp_plane_helpers_funcs = {
+static const struct drm_plane_funcs sti_gdp_plane_helpers_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
 	.destroy = sti_gdp_destroy,
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index b5ee783e3e7c..04546ebb75d7 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -17,6 +17,7 @@
 #include "sti_hqvdp_lut.h"
 #include "sti_plane.h"
 #include "sti_vtg.h"
+#include "sti_drv.h"
 
 /* Firmware name */
 #define HQVDP_FMW_NAME          "hqvdp-stih407.bin"
@@ -783,7 +784,7 @@ static void sti_hqvdp_disable(struct sti_hqvdp *hqvdp)
  * RETURNS:
  * 0 on success.
  */
-int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data)
+static int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data)
 {
 	struct sti_hqvdp *hqvdp = container_of(nb, struct sti_hqvdp, vtg_nb);
 	int btm_cmd_offset, top_cmd_offest;
@@ -1250,7 +1251,7 @@ static int sti_hqvdp_late_register(struct drm_plane *drm_plane)
 	return hqvdp_debugfs_init(hqvdp, drm_plane->dev->primary);
 }
 
-struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = {
+static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
 	.destroy = sti_hqvdp_destroy,
@@ -1289,7 +1290,7 @@ static struct drm_plane *sti_hqvdp_create(struct drm_device *drm_dev,
 	return &hqvdp->plane.drm_plane;
 }
 
-int sti_hqvdp_bind(struct device *dev, struct device *master, void *data)
+static int sti_hqvdp_bind(struct device *dev, struct device *master, void *data)
 {
 	struct sti_hqvdp *hqvdp = dev_get_drvdata(dev);
 	struct drm_device *drm_dev = data;
diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
index 7d9aea805eab..b78cec538aaa 100644
--- a/drivers/gpu/drm/sti/sti_mixer.c
+++ b/drivers/gpu/drm/sti/sti_mixer.c
@@ -358,7 +358,7 @@ int sti_mixer_set_plane_status(struct sti_mixer *mixer,
 	return 0;
 }
 
-void sti_mixer_set_matrix(struct sti_mixer *mixer)
+static void sti_mixer_set_matrix(struct sti_mixer *mixer)
 {
 	unsigned int i;
 
diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
index e25995b35715..cc07e069a770 100644
--- a/drivers/gpu/drm/sti/sti_tvout.c
+++ b/drivers/gpu/drm/sti/sti_tvout.c
@@ -18,6 +18,7 @@
 #include <drm/drm_crtc_helper.h>
 
 #include "sti_crtc.h"
+#include "sti_drv.h"
 #include "sti_vtg.h"
 
 /* glue registers */
diff --git a/drivers/gpu/drm/sti/sti_vtac.c b/drivers/gpu/drm/sti/sti_vtac.c
index b1eb0d77630d..cf7fe8a1db42 100644
--- a/drivers/gpu/drm/sti/sti_vtac.c
+++ b/drivers/gpu/drm/sti/sti_vtac.c
@@ -12,6 +12,8 @@
 
 #include <drm/drmP.h>
 
+#include "sti_drv.h"
+
 /* registers offset */
 #define VTAC_CONFIG                     0x00
 #define VTAC_RX_FIFO_CONFIG             0x04
diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
index 0bdc385eec17..a8882bdd0f8b 100644
--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -13,6 +13,7 @@
 
 #include <drm/drmP.h>
 
+#include "sti_drv.h"
 #include "sti_vtg.h"
 
 #define VTG_MODE_MASTER         0
@@ -72,7 +73,7 @@
 #define AWG_DELAY_ED        (-8)
 #define AWG_DELAY_SD        (-7)
 
-LIST_HEAD(vtg_lookup);
+static LIST_HEAD(vtg_lookup);
 
 /*
  * STI VTG register offset structure
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 13/14] drm/sun4i: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (11 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 12/14] drm/sti: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-19 19:54   ` Maxime Ripard
  2016-09-19 13:33 ` [PATCH 14/14] drm/tilcdc: " ville.syrjala
  13 siblings, 1 reply; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/sun4i/sun4i_tv.c:181:21: warning: symbol 'ntsc_video_levels' was not declared. Should it be static?
drm/sun4i/sun4i_tv.c:185:21: warning: symbol 'pal_video_levels' was not declared. Should it be static?
drm/sun4i/sun4i_tv.c:189:21: warning: symbol 'ntsc_burst_levels' was not declared. Should it be static?
drm/sun4i/sun4i_tv.c:193:21: warning: symbol 'pal_burst_levels' was not declared. Should it be static?
drm/sun4i/sun4i_tv.c:197:20: warning: symbol 'ntsc_color_gains' was not declared. Should it be static?
drm/sun4i/sun4i_tv.c:201:20: warning: symbol 'pal_color_gains' was not declared. Should it be static?
drm/sun4i/sun4i_tv.c:205:26: warning: symbol 'ntsc_resync_parameters' was not declared. Should it be static?
drm/sun4i/sun4i_tv.c:209:26: warning: symbol 'pal_resync_parameters' was not declared. Should it be static?
drm/sun4i/sun4i_tv.c:213:16: warning: symbol 'tv_modes' was not declared. Should it be static?

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/sun4i/sun4i_tv.c | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index b84147896294..3d69bd34f36c 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -161,10 +161,10 @@ struct tv_mode {
 	bool		dac3_en;
 	bool		dac_bit25_en;
 
-	struct color_gains		*color_gains;
-	struct burst_levels		*burst_levels;
-	struct video_levels		*video_levels;
-	struct resync_parameters	*resync_params;
+	const struct color_gains	*color_gains;
+	const struct burst_levels	*burst_levels;
+	const struct video_levels	*video_levels;
+	const struct resync_parameters	*resync_params;
 };
 
 struct sun4i_tv {
@@ -178,39 +178,39 @@ struct sun4i_tv {
 	struct sun4i_drv	*drv;
 };
 
-struct video_levels ntsc_video_levels = {
+static const struct video_levels ntsc_video_levels = {
 	.black = 282,	.blank = 240,
 };
 
-struct video_levels pal_video_levels = {
+static const struct video_levels pal_video_levels = {
 	.black = 252,	.blank = 252,
 };
 
-struct burst_levels ntsc_burst_levels = {
+static const struct burst_levels ntsc_burst_levels = {
 	.cb = 79,	.cr = 0,
 };
 
-struct burst_levels pal_burst_levels = {
+static const struct burst_levels pal_burst_levels = {
 	.cb = 40,	.cr = 40,
 };
 
-struct color_gains ntsc_color_gains = {
+static const struct color_gains ntsc_color_gains = {
 	.cb = 160,	.cr = 160,
 };
 
-struct color_gains pal_color_gains = {
+static const struct color_gains pal_color_gains = {
 	.cb = 224,	.cr = 224,
 };
 
-struct resync_parameters ntsc_resync_parameters = {
+static const struct resync_parameters ntsc_resync_parameters = {
 	.field = false,	.line = 14,	.pixel = 12,
 };
 
-struct resync_parameters pal_resync_parameters = {
+static const struct resync_parameters pal_resync_parameters = {
 	.field = true,	.line = 13,	.pixel = 12,
 };
 
-struct tv_mode tv_modes[] = {
+static const struct tv_mode tv_modes[] = {
 	{
 		.name		= "NTSC",
 		.mode		= SUN4I_TVE_CFG0_RES_480i,
@@ -289,13 +289,13 @@ drm_connector_to_sun4i_tv(struct drm_connector *connector)
  * So far, it doesn't seem to be preserved when the mode is passed by
  * to mode_set for some reason.
  */
-static struct tv_mode *sun4i_tv_find_tv_by_mode(struct drm_display_mode *mode)
+static const struct tv_mode *sun4i_tv_find_tv_by_mode(const struct drm_display_mode *mode)
 {
 	int i;
 
 	/* First try to identify the mode by name */
 	for (i = 0; i < ARRAY_SIZE(tv_modes); i++) {
-		struct tv_mode *tv_mode = &tv_modes[i];
+		const struct tv_mode *tv_mode = &tv_modes[i];
 
 		DRM_DEBUG_DRIVER("Comparing mode %s vs %s",
 				 mode->name, tv_mode->name);
@@ -306,7 +306,7 @@ static struct tv_mode *sun4i_tv_find_tv_by_mode(struct drm_display_mode *mode)
 
 	/* Then by number of lines */
 	for (i = 0; i < ARRAY_SIZE(tv_modes); i++) {
-		struct tv_mode *tv_mode = &tv_modes[i];
+		const struct tv_mode *tv_mode = &tv_modes[i];
 
 		DRM_DEBUG_DRIVER("Comparing mode %s vs %s (X: %d vs %d)",
 				 mode->name, tv_mode->name,
@@ -319,7 +319,7 @@ static struct tv_mode *sun4i_tv_find_tv_by_mode(struct drm_display_mode *mode)
 	return NULL;
 }
 
-static void sun4i_tv_mode_to_drm_mode(struct tv_mode *tv_mode,
+static void sun4i_tv_mode_to_drm_mode(const struct tv_mode *tv_mode,
 				      struct drm_display_mode *mode)
 {
 	DRM_DEBUG_DRIVER("Creating mode %s\n", mode->name);
@@ -386,7 +386,7 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder,
 	struct sun4i_tv *tv = drm_encoder_to_sun4i_tv(encoder);
 	struct sun4i_drv *drv = tv->drv;
 	struct sun4i_tcon *tcon = drv->tcon;
-	struct tv_mode *tv_mode = sun4i_tv_find_tv_by_mode(mode);
+	const struct tv_mode *tv_mode = sun4i_tv_find_tv_by_mode(mode);
 
 	sun4i_tcon1_mode_set(tcon, mode);
 
@@ -508,7 +508,7 @@ static int sun4i_tv_comp_get_modes(struct drm_connector *connector)
 
 	for (i = 0; i < ARRAY_SIZE(tv_modes); i++) {
 		struct drm_display_mode *mode = drm_mode_create(connector->dev);
-		struct tv_mode *tv_mode = &tv_modes[i];
+		const struct tv_mode *tv_mode = &tv_modes[i];
 
 		strcpy(mode->name, tv_mode->name);
 
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 14/14] drm/tilcdc: Fix sparse warnings
  2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
                   ` (12 preceding siblings ...)
  2016-09-19 13:33 ` [PATCH 13/14] drm/sun4i: " ville.syrjala
@ 2016-09-19 13:33 ` ville.syrjala
  2016-09-22 20:29   ` Jyri Sarha
  13 siblings, 1 reply; 25+ messages in thread
From: ville.syrjala @ 2016-09-19 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Tomi Valkeinen, Jyri Sarha

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/tilcdc/tilcdc_tfp410.c:385:24: warning: symbol 'tfp410_driver' was not declared. Should it be static?
drm/tilcdc/tilcdc_tfp410.c:395:12: warning: symbol 'tilcdc_tfp410_init' was not declared. Should it be static?
drm/tilcdc/tilcdc_tfp410.c:400:13: warning: symbol 'tilcdc_tfp410_fini' was not declared. Should it be static?
drm/tilcdc/tilcdc_panel.c:436:24: warning: symbol 'panel_driver' was not declared. Should it be static?
drm/tilcdc/tilcdc_panel.c:446:12: warning: symbol 'tilcdc_panel_init' was not declared. Should it be static?
drm/tilcdc/tilcdc_panel.c:451:13: warning: symbol 'tilcdc_panel_fini' was not declared. Should it be static?
drm/tilcdc/tilcdc_drv.c:78:5: warning: symbol 'tilcdc_atomic_check' was not declared. Should it be static?

Cc: Jyri Sarha <jsarha@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c    | 4 ++--
 drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 3 ++-
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index f8892e9ad169..d6f8780e41df 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -75,8 +75,8 @@ static void tilcdc_fb_output_poll_changed(struct drm_device *dev)
 	drm_fbdev_cma_hotplug_event(priv->fbdev);
 }
 
-int tilcdc_atomic_check(struct drm_device *dev,
-			struct drm_atomic_state *state)
+static int tilcdc_atomic_check(struct drm_device *dev,
+			       struct drm_atomic_state *state)
 {
 	int ret;
 
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index 7b3650901930..b8dbcc2a4b7c 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -25,6 +25,7 @@
 #include <drm/drm_atomic_helper.h>
 
 #include "tilcdc_drv.h"
+#include "tilcdc_panel.h"
 
 struct panel_module {
 	struct tilcdc_module base;
@@ -433,7 +434,7 @@ static struct of_device_id panel_of_match[] = {
 		{ },
 };
 
-struct platform_driver panel_driver = {
+static struct platform_driver panel_driver = {
 	.probe = panel_probe,
 	.remove = panel_remove,
 	.driver = {
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
index c6a70da6473d..2247150f326a 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
@@ -23,6 +23,7 @@
 #include <drm/drm_atomic_helper.h>
 
 #include "tilcdc_drv.h"
+#include "tilcdc_tfp410.h"
 
 struct tfp410_module {
 	struct tilcdc_module base;
@@ -382,7 +383,7 @@ static struct of_device_id tfp410_of_match[] = {
 		{ },
 };
 
-struct platform_driver tfp410_driver = {
+static struct platform_driver tfp410_driver = {
 	.probe = tfp410_probe,
 	.remove = tfp410_remove,
 	.driver = {
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 09/14] drm/msm: Fix sparse warnings
  2016-09-19 13:33 ` [PATCH 09/14] drm/msm: " ville.syrjala
@ 2016-09-19 13:52   ` Emil Velikov
  2016-09-19 15:33     ` Jani Nikula
  0 siblings, 1 reply; 25+ messages in thread
From: Emil Velikov @ 2016-09-19 13:52 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: ML dri-devel

On 19 September 2016 at 14:33,  <ville.syrjala@linux.intel.com> wrote:

> --- a/drivers/gpu/drm/msm/msm_fb.c
> +++ b/drivers/gpu/drm/msm/msm_fb.c
> @@ -132,7 +132,7 @@ const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb)
>  struct drm_framebuffer *msm_framebuffer_create(struct drm_device *dev,
>                 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd)
>  {
> -       struct drm_gem_object *bos[4] = {0};
> +       struct drm_gem_object *bos[4] = {};
Fwiw I was reminded using empty initializers isn't standard C [1].

Regards,
Emil

[1] http://stackoverflow.com/questions/17589533/is-an-empty-initializer-list-valid-c-code
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 03/14] drm/fb-helper: Fix sparse warnings
  2016-09-19 13:33 ` [PATCH 03/14] drm/fb-helper: " ville.syrjala
@ 2016-09-19 14:46   ` Daniel Vetter
  0 siblings, 0 replies; 25+ messages in thread
From: Daniel Vetter @ 2016-09-19 14:46 UTC (permalink / raw)
  To: ville.syrjala; +Cc: Daniel Vetter, dri-devel

On Mon, Sep 19, 2016 at 04:33:44PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> drm/drm_fb_helper.c:2306:12: warning: symbol 'drm_fb_helper_modinit' was not declared. Should it be static?
> 
> While at it, move the lefover static inline to the right place.
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Sean Paul <seanpaul@chromium.org>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Merged the first 3 core patches to drm-misc. For the others a bit more
soaking time for maintainers to ack them I guess.
-Daniel

> ---
>  drivers/gpu/drm/drm_crtc_helper_internal.h | 7 +++++++
>  drivers/gpu/drm/drm_fb_helper.c            | 2 ++
>  include/drm/drm_fb_helper.h                | 5 -----
>  3 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h
> index 4e6b57ae7188..28295e5d0d9e 100644
> --- a/drivers/gpu/drm/drm_crtc_helper_internal.h
> +++ b/drivers/gpu/drm/drm_crtc_helper_internal.h
> @@ -29,7 +29,14 @@
>  #include <drm/drm_dp_helper.h>
>  
>  /* drm_fb_helper.c */
> +#ifdef CONFIG_DRM_FBDEV_EMULATION
>  int drm_fb_helper_modinit(void);
> +#else
> +static inline int drm_fb_helper_modinit(void)
> +{
> +	return 0;
> +}
> +#endif
>  
>  /* drm_dp_aux_dev.c */
>  #ifdef CONFIG_DRM_DP_AUX_CHARDEV
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index dd8e3b68fd53..03414bde1f15 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -41,6 +41,8 @@
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
>  
> +#include "drm_crtc_helper_internal.h"
> +
>  static bool drm_fbdev_emulation = true;
>  module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, 0600);
>  MODULE_PARM_DESC(fbdev_emulation,
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 797fb5f80c45..e19458dd1a43 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -287,11 +287,6 @@ int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_
>  int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
>  				       struct drm_connector *connector);
>  #else
> -static inline int drm_fb_helper_modinit(void)
> -{
> -	return 0;
> -}
> -
>  static inline void drm_fb_helper_prepare(struct drm_device *dev,
>  					struct drm_fb_helper *helper,
>  					const struct drm_fb_helper_funcs *funcs)
> -- 
> 2.7.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 12/14] drm/sti: Fix sparse warnings
  2016-09-19 13:33 ` [PATCH 12/14] drm/sti: " ville.syrjala
@ 2016-09-19 14:52   ` Vincent ABRIOU
  0 siblings, 0 replies; 25+ messages in thread
From: Vincent ABRIOU @ 2016-09-19 14:52 UTC (permalink / raw)
  To: ville.syrjala, dri-devel

Acked-by: Vincent Abriou <vincent.abriou@st.com>

On 09/19/2016 03:33 PM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> drm/sti/sti_mixer.c:361:6: warning: symbol 'sti_mixer_set_matrix' was not declared. Should it be static?
> drm/sti/sti_gdp.c:476:5: warning: symbol 'sti_gdp_field_cb' was not declared. Should it be static?
> drm/sti/sti_gdp.c:885:24: warning: symbol 'sti_gdp_plane_helpers_funcs' was not declared. Should it be static?
> drm/sti/sti_cursor.c:348:24: warning: symbol 'sti_cursor_plane_helpers_funcs' was not declared. Should it be static?
> drm/sti/sti_compositor.c:28:28: warning: symbol 'stih407_compositor_data' was not declared. Should it be static?
> drm/sti/sti_compositor.c:49:28: warning: symbol 'stih416_compositor_data' was not declared. Should it be static?
> drm/sti/sti_vtg.c:75:1: warning: symbol 'vtg_lookup' was not declared. Should it be static?
> drm/sti/sti_vtg.c:476:24: warning: symbol 'sti_vtg_driver' was not declared. Should it be static?
> drm/sti/sti_dvo.c:109:5: warning: symbol 'dvo_awg_generate_code' was not declared. Should it be static?
> drm/sti/sti_dvo.c:602:24: warning: symbol 'sti_dvo_driver' was not declared. Should it be static?
> drm/sti/sti_vtac.c:209:24: warning: symbol 'sti_vtac_driver' was not declared. Should it be static?
> drm/sti/sti_tvout.c:914:24: warning: symbol 'sti_tvout_driver' was not declared. Should it be static?
> drm/sti/sti_hqvdp.c:786:5: warning: symbol 'sti_hqvdp_vtg_cb' was not declared. Should it be static?
> drm/sti/sti_hqvdp.c:1253:24: warning: symbol 'sti_hqvdp_plane_helpers_funcs' was not declared. Should it be static?
> drm/sti/sti_hqvdp.c:1292:5: warning: symbol 'sti_hqvdp_bind' was not declared. Should it be static?
> drm/sti/sti_hqvdp.c:1385:24: warning: symbol 'sti_hqvdp_driver' was not declared. Should it be static?
> drm/sti/sti_drv.c:143:6: warning: symbol 'sti_drm_dbg_cleanup' was not declared. Should it be static?
>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/sti/sti_compositor.c | 4 ++--
>  drivers/gpu/drm/sti/sti_cursor.c     | 2 +-
>  drivers/gpu/drm/sti/sti_drv.c        | 2 +-
>  drivers/gpu/drm/sti/sti_dvo.c        | 3 ++-
>  drivers/gpu/drm/sti/sti_gdp.c        | 6 +++---
>  drivers/gpu/drm/sti/sti_hqvdp.c      | 7 ++++---
>  drivers/gpu/drm/sti/sti_mixer.c      | 2 +-
>  drivers/gpu/drm/sti/sti_tvout.c      | 1 +
>  drivers/gpu/drm/sti/sti_vtac.c       | 2 ++
>  drivers/gpu/drm/sti/sti_vtg.c        | 3 ++-
>  10 files changed, 19 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
> index 134201ecc6fd..a8441ae2623a 100644
> --- a/drivers/gpu/drm/sti/sti_compositor.c
> +++ b/drivers/gpu/drm/sti/sti_compositor.c
> @@ -25,7 +25,7 @@
>  /*
>   * stiH407 compositor properties
>   */
> -struct sti_compositor_data stih407_compositor_data = {
> +static const struct sti_compositor_data stih407_compositor_data = {
>  	.nb_subdev = 8,
>  	.subdev_desc = {
>  			{STI_CURSOR_SUBDEV, (int)STI_CURSOR, 0x000},
> @@ -46,7 +46,7 @@ struct sti_compositor_data stih407_compositor_data = {
>   * Moreover, GDPx is different for Main and Aux Mixer. So this subdev map does
>   * not fit for stiH416 if we want to enable the MIXER_AUX.
>   */
> -struct sti_compositor_data stih416_compositor_data = {
> +static const struct sti_compositor_data stih416_compositor_data = {
>  	.nb_subdev = 3,
>  	.subdev_desc = {
>  			{STI_GPD_SUBDEV, (int)STI_GDP_0, 0x100},
> diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c
> index 3b53f7f2e3fc..651f231c4615 100644
> --- a/drivers/gpu/drm/sti/sti_cursor.c
> +++ b/drivers/gpu/drm/sti/sti_cursor.c
> @@ -345,7 +345,7 @@ static int sti_cursor_late_register(struct drm_plane *drm_plane)
>  	return cursor_debugfs_init(cursor, drm_plane->dev->primary);
>  }
>
> -struct drm_plane_funcs sti_cursor_plane_helpers_funcs = {
> +static const struct drm_plane_funcs sti_cursor_plane_helpers_funcs = {
>  	.update_plane = drm_atomic_helper_update_plane,
>  	.disable_plane = drm_atomic_helper_disable_plane,
>  	.destroy = sti_cursor_destroy,
> diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
> index 7cd3804c6dee..e6f0706bc6c7 100644
> --- a/drivers/gpu/drm/sti/sti_drv.c
> +++ b/drivers/gpu/drm/sti/sti_drv.c
> @@ -140,7 +140,7 @@ err:
>  	return ret;
>  }
>
> -void sti_drm_dbg_cleanup(struct drm_minor *minor)
> +static void sti_drm_dbg_cleanup(struct drm_minor *minor)
>  {
>  	drm_debugfs_remove_files(sti_drm_dbg_list,
>  				 ARRAY_SIZE(sti_drm_dbg_list), minor);
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index 00881eb4536e..e8c1ed08a9f7 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -17,6 +17,7 @@
>  #include <drm/drm_panel.h>
>
>  #include "sti_awg_utils.h"
> +#include "sti_drv.h"
>  #include "sti_mixer.h"
>
>  /* DVO registers */
> @@ -106,7 +107,7 @@ struct sti_dvo_connector {
>  	container_of(x, struct sti_dvo_connector, drm_connector)
>
>  #define BLANKING_LEVEL 16
> -int dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code)
> +static int dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code)
>  {
>  	struct drm_display_mode *mode = &dvo->mode;
>  	struct dvo_config *config = dvo->config;
> diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
> index b8d942ca45e8..9873b4c360b9 100644
> --- a/drivers/gpu/drm/sti/sti_gdp.c
> +++ b/drivers/gpu/drm/sti/sti_gdp.c
> @@ -473,8 +473,8 @@ static void sti_gdp_disable(struct sti_gdp *gdp)
>   * RETURNS:
>   * 0 on success.
>   */
> -int sti_gdp_field_cb(struct notifier_block *nb,
> -		unsigned long event, void *data)
> +static int sti_gdp_field_cb(struct notifier_block *nb,
> +			    unsigned long event, void *data)
>  {
>  	struct sti_gdp *gdp = container_of(nb, struct sti_gdp, vtg_field_nb);
>
> @@ -882,7 +882,7 @@ static int sti_gdp_late_register(struct drm_plane *drm_plane)
>  	return gdp_debugfs_init(gdp, drm_plane->dev->primary);
>  }
>
> -struct drm_plane_funcs sti_gdp_plane_helpers_funcs = {
> +static const struct drm_plane_funcs sti_gdp_plane_helpers_funcs = {
>  	.update_plane = drm_atomic_helper_update_plane,
>  	.disable_plane = drm_atomic_helper_disable_plane,
>  	.destroy = sti_gdp_destroy,
> diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
> index b5ee783e3e7c..04546ebb75d7 100644
> --- a/drivers/gpu/drm/sti/sti_hqvdp.c
> +++ b/drivers/gpu/drm/sti/sti_hqvdp.c
> @@ -17,6 +17,7 @@
>  #include "sti_hqvdp_lut.h"
>  #include "sti_plane.h"
>  #include "sti_vtg.h"
> +#include "sti_drv.h"
>
>  /* Firmware name */
>  #define HQVDP_FMW_NAME          "hqvdp-stih407.bin"
> @@ -783,7 +784,7 @@ static void sti_hqvdp_disable(struct sti_hqvdp *hqvdp)
>   * RETURNS:
>   * 0 on success.
>   */
> -int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data)
> +static int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data)
>  {
>  	struct sti_hqvdp *hqvdp = container_of(nb, struct sti_hqvdp, vtg_nb);
>  	int btm_cmd_offset, top_cmd_offest;
> @@ -1250,7 +1251,7 @@ static int sti_hqvdp_late_register(struct drm_plane *drm_plane)
>  	return hqvdp_debugfs_init(hqvdp, drm_plane->dev->primary);
>  }
>
> -struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = {
> +static const struct drm_plane_funcs sti_hqvdp_plane_helpers_funcs = {
>  	.update_plane = drm_atomic_helper_update_plane,
>  	.disable_plane = drm_atomic_helper_disable_plane,
>  	.destroy = sti_hqvdp_destroy,
> @@ -1289,7 +1290,7 @@ static struct drm_plane *sti_hqvdp_create(struct drm_device *drm_dev,
>  	return &hqvdp->plane.drm_plane;
>  }
>
> -int sti_hqvdp_bind(struct device *dev, struct device *master, void *data)
> +static int sti_hqvdp_bind(struct device *dev, struct device *master, void *data)
>  {
>  	struct sti_hqvdp *hqvdp = dev_get_drvdata(dev);
>  	struct drm_device *drm_dev = data;
> diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
> index 7d9aea805eab..b78cec538aaa 100644
> --- a/drivers/gpu/drm/sti/sti_mixer.c
> +++ b/drivers/gpu/drm/sti/sti_mixer.c
> @@ -358,7 +358,7 @@ int sti_mixer_set_plane_status(struct sti_mixer *mixer,
>  	return 0;
>  }
>
> -void sti_mixer_set_matrix(struct sti_mixer *mixer)
> +static void sti_mixer_set_matrix(struct sti_mixer *mixer)
>  {
>  	unsigned int i;
>
> diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
> index e25995b35715..cc07e069a770 100644
> --- a/drivers/gpu/drm/sti/sti_tvout.c
> +++ b/drivers/gpu/drm/sti/sti_tvout.c
> @@ -18,6 +18,7 @@
>  #include <drm/drm_crtc_helper.h>
>
>  #include "sti_crtc.h"
> +#include "sti_drv.h"
>  #include "sti_vtg.h"
>
>  /* glue registers */
> diff --git a/drivers/gpu/drm/sti/sti_vtac.c b/drivers/gpu/drm/sti/sti_vtac.c
> index b1eb0d77630d..cf7fe8a1db42 100644
> --- a/drivers/gpu/drm/sti/sti_vtac.c
> +++ b/drivers/gpu/drm/sti/sti_vtac.c
> @@ -12,6 +12,8 @@
>
>  #include <drm/drmP.h>
>
> +#include "sti_drv.h"
> +
>  /* registers offset */
>  #define VTAC_CONFIG                     0x00
>  #define VTAC_RX_FIFO_CONFIG             0x04
> diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
> index 0bdc385eec17..a8882bdd0f8b 100644
> --- a/drivers/gpu/drm/sti/sti_vtg.c
> +++ b/drivers/gpu/drm/sti/sti_vtg.c
> @@ -13,6 +13,7 @@
>
>  #include <drm/drmP.h>
>
> +#include "sti_drv.h"
>  #include "sti_vtg.h"
>
>  #define VTG_MODE_MASTER         0
> @@ -72,7 +73,7 @@
>  #define AWG_DELAY_ED        (-8)
>  #define AWG_DELAY_SD        (-7)
>
> -LIST_HEAD(vtg_lookup);
> +static LIST_HEAD(vtg_lookup);
>
>  /*
>   * STI VTG register offset structure
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 09/14] drm/msm: Fix sparse warnings
  2016-09-19 13:52   ` Emil Velikov
@ 2016-09-19 15:33     ` Jani Nikula
  2016-09-19 16:01       ` Emil Velikov
  0 siblings, 1 reply; 25+ messages in thread
From: Jani Nikula @ 2016-09-19 15:33 UTC (permalink / raw)
  To: Emil Velikov, Ville Syrjälä; +Cc: ML dri-devel

On Mon, 19 Sep 2016, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> On 19 September 2016 at 14:33,  <ville.syrjala@linux.intel.com> wrote:
>
>> --- a/drivers/gpu/drm/msm/msm_fb.c
>> +++ b/drivers/gpu/drm/msm/msm_fb.c
>> @@ -132,7 +132,7 @@ const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb)
>>  struct drm_framebuffer *msm_framebuffer_create(struct drm_device *dev,
>>                 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd)
>>  {
>> -       struct drm_gem_object *bos[4] = {0};
>> +       struct drm_gem_object *bos[4] = {};
> Fwiw I was reminded using empty initializers isn't standard C [1].

Well, meh, we're not doing -std=c11 -pedantic. Arguably {} is neater.

I guess the commit message lacks the sparse warning about using plain
integer 0 as NULL pointer.

BR,
Jani.



>
> Regards,
> Emil
>
> [1] http://stackoverflow.com/questions/17589533/is-an-empty-initializer-list-valid-c-code
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 09/14] drm/msm: Fix sparse warnings
  2016-09-19 15:33     ` Jani Nikula
@ 2016-09-19 16:01       ` Emil Velikov
  0 siblings, 0 replies; 25+ messages in thread
From: Emil Velikov @ 2016-09-19 16:01 UTC (permalink / raw)
  To: Jani Nikula; +Cc: ML dri-devel

On 19 September 2016 at 16:33, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Mon, 19 Sep 2016, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>> On 19 September 2016 at 14:33,  <ville.syrjala@linux.intel.com> wrote:
>>
>>> --- a/drivers/gpu/drm/msm/msm_fb.c
>>> +++ b/drivers/gpu/drm/msm/msm_fb.c
>>> @@ -132,7 +132,7 @@ const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb)
>>>  struct drm_framebuffer *msm_framebuffer_create(struct drm_device *dev,
>>>                 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd)
>>>  {
>>> -       struct drm_gem_object *bos[4] = {0};
>>> +       struct drm_gem_object *bos[4] = {};
>> Fwiw I was reminded using empty initializers isn't standard C [1].
>
> Well, meh, we're not doing -std=c11 -pedantic. Arguably {} is neater.
>
> I guess the commit message lacks the sparse warning about using plain
> integer 0 as NULL pointer.
>
Ack. Just pointing it out for people, who weren't familiar. Fwiw this
is one of the bigger bikesheding topics I've seen, esp. since
different compiler (versions) produce warnings for each permutation
:-\

Sparse shouldn't produce warning since the spec explicitly states that
0 should be 'good enough' for anyone ;-)

Regards,
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 13/14] drm/sun4i: Fix sparse warnings
  2016-09-19 13:33 ` [PATCH 13/14] drm/sun4i: " ville.syrjala
@ 2016-09-19 19:54   ` Maxime Ripard
  0 siblings, 0 replies; 25+ messages in thread
From: Maxime Ripard @ 2016-09-19 19:54 UTC (permalink / raw)
  To: ville.syrjala; +Cc: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1364 bytes --]

1;4402;0c
On Mon, Sep 19, 2016 at 04:33:54PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> drm/sun4i/sun4i_tv.c:181:21: warning: symbol 'ntsc_video_levels' was not declared. Should it be static?
> drm/sun4i/sun4i_tv.c:185:21: warning: symbol 'pal_video_levels' was not declared. Should it be static?
> drm/sun4i/sun4i_tv.c:189:21: warning: symbol 'ntsc_burst_levels' was not declared. Should it be static?
> drm/sun4i/sun4i_tv.c:193:21: warning: symbol 'pal_burst_levels' was not declared. Should it be static?
> drm/sun4i/sun4i_tv.c:197:20: warning: symbol 'ntsc_color_gains' was not declared. Should it be static?
> drm/sun4i/sun4i_tv.c:201:20: warning: symbol 'pal_color_gains' was not declared. Should it be static?
> drm/sun4i/sun4i_tv.c:205:26: warning: symbol 'ntsc_resync_parameters' was not declared. Should it be static?
> drm/sun4i/sun4i_tv.c:209:26: warning: symbol 'pal_resync_parameters' was not declared. Should it be static?
> drm/sun4i/sun4i_tv.c:213:16: warning: symbol 'tv_modes' was not declared. Should it be static?
> 
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 02/14] drm/blend: Fix sparse warnings
  2016-09-19 13:33 ` [PATCH 02/14] drm/blend: " ville.syrjala
@ 2016-09-20  6:52   ` Laurent Pinchart
  0 siblings, 0 replies; 25+ messages in thread
From: Laurent Pinchart @ 2016-09-20  6:52 UTC (permalink / raw)
  To: ville.syrjala; +Cc: dri-devel, Marek Szyprowski

Hi Ville,

Thank you for the patch.

On Monday 19 Sep 2016 16:33:43 ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> drm/drm_blend.c:207:5: warning: symbol 'drm_atomic_normalize_zpos' was not
> declared. Should it be static?
> 
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/drm_blend.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
> index 0813b7e021be..0a0b9357db35 100644
> --- a/drivers/gpu/drm/drm_blend.c
> +++ b/drivers/gpu/drm/drm_blend.c
> @@ -30,7 +30,7 @@
>  #include <linux/slab.h>
>  #include <linux/sort.h>
> 
> -#include "drm_internal.h"
> +#include "drm_crtc_internal.h"
> 
>  /**
>   * drm_plane_create_zpos_property - create mutable zpos property

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 04/14] drm/arm: Fix sparse warnings
  2016-09-19 13:33 ` [PATCH 04/14] drm/arm: " ville.syrjala
@ 2016-09-20  8:06   ` Liviu Dudau
  2016-09-20 12:44     ` Liviu Dudau
  0 siblings, 1 reply; 25+ messages in thread
From: Liviu Dudau @ 2016-09-20  8:06 UTC (permalink / raw)
  To: ville.syrjala; +Cc: Mali DP Maintainers, dri-devel

On Mon, Sep 19, 2016 at 04:33:45PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> drm/arm/malidp_planes.c:49:24: warning: symbol 'malidp_duplicate_plane_state' was not declared. Should it be static?
> drm/arm/malidp_planes.c:66:6: warning: symbol 'malidp_destroy_plane_state' was not declared. Should it be static?
> 
> Cc: Liviu Dudau <Liviu.Dudau@arm.com>

Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>

Thanks for cleaning it up!

Liviu

> Cc: Brian Starkey <brian.starkey@arm.com>
> Cc: Mali DP Maintainers <malidp@foss.arm.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/arm/malidp_planes.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
> index 82c193e5e0d6..cc9b8e02904d 100644
> --- a/drivers/gpu/drm/arm/malidp_planes.c
> +++ b/drivers/gpu/drm/arm/malidp_planes.c
> @@ -46,7 +46,7 @@ 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,8 +63,8 @@ struct drm_plane_state *malidp_duplicate_plane_state(struct drm_plane *plane)
>  	return &state->base;
>  }
>  
> -void malidp_destroy_plane_state(struct drm_plane *plane,
> -				struct drm_plane_state *state)
> +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!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 04/14] drm/arm: Fix sparse warnings
  2016-09-20  8:06   ` Liviu Dudau
@ 2016-09-20 12:44     ` Liviu Dudau
  0 siblings, 0 replies; 25+ messages in thread
From: Liviu Dudau @ 2016-09-20 12:44 UTC (permalink / raw)
  To: ville.syrjala; +Cc: Mali DP Maintainers, dri-devel

On Tue, Sep 20, 2016 at 09:06:24AM +0100, Liviu Dudau wrote:
> On Mon, Sep 19, 2016 at 04:33:45PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > drm/arm/malidp_planes.c:49:24: warning: symbol 'malidp_duplicate_plane_state' was not declared. Should it be static?
> > drm/arm/malidp_planes.c:66:6: warning: symbol 'malidp_destroy_plane_state' was not declared. Should it be static?
> > 
> > Cc: Liviu Dudau <Liviu.Dudau@arm.com>
> 

BTW, I have already acked this patch when Baoyou Xie submitted it!

https://lists.freedesktop.org/archives/dri-devel/2016-September/117624.html

Maybe you should acknowledge his contribution if that was the case?

Best regards,
Liviu

> Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>
> 
> Thanks for cleaning it up!
> 
> Liviu
> 
> > Cc: Brian Starkey <brian.starkey@arm.com>
> > Cc: Mali DP Maintainers <malidp@foss.arm.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/arm/malidp_planes.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
> > index 82c193e5e0d6..cc9b8e02904d 100644
> > --- a/drivers/gpu/drm/arm/malidp_planes.c
> > +++ b/drivers/gpu/drm/arm/malidp_planes.c
> > @@ -46,7 +46,7 @@ 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,8 +63,8 @@ struct drm_plane_state *malidp_duplicate_plane_state(struct drm_plane *plane)
> >  	return &state->base;
> >  }
> >  
> > -void malidp_destroy_plane_state(struct drm_plane *plane,
> > -				struct drm_plane_state *state)
> > +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!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 14/14] drm/tilcdc: Fix sparse warnings
  2016-09-19 13:33 ` [PATCH 14/14] drm/tilcdc: " ville.syrjala
@ 2016-09-22 20:29   ` Jyri Sarha
  0 siblings, 0 replies; 25+ messages in thread
From: Jyri Sarha @ 2016-09-22 20:29 UTC (permalink / raw)
  To: ville.syrjala, dri-devel; +Cc: Tomi Valkeinen

On 09/19/16 16:33, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> drm/tilcdc/tilcdc_tfp410.c:385:24: warning: symbol 'tfp410_driver' was not declared. Should it be static?
> drm/tilcdc/tilcdc_tfp410.c:395:12: warning: symbol 'tilcdc_tfp410_init' was not declared. Should it be static?
> drm/tilcdc/tilcdc_tfp410.c:400:13: warning: symbol 'tilcdc_tfp410_fini' was not declared. Should it be static?
> drm/tilcdc/tilcdc_panel.c:436:24: warning: symbol 'panel_driver' was not declared. Should it be static?
> drm/tilcdc/tilcdc_panel.c:446:12: warning: symbol 'tilcdc_panel_init' was not declared. Should it be static?
> drm/tilcdc/tilcdc_panel.c:451:13: warning: symbol 'tilcdc_panel_fini' was not declared. Should it be static?
> drm/tilcdc/tilcdc_drv.c:78:5: warning: symbol 'tilcdc_atomic_check' was not declared. Should it be static?
> 
> Cc: Jyri Sarha <jsarha@ti.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Thanks,
But I have picked already picked these two patches:

https://lists.freedesktop.org/archives/dri-devel/2016-September/117900.html

http://www.spinics.net/lists/kernel/msg2340400.html

I think, I'll send anothet pull request still to nininght to avoid more
fixes being generated :).

Best regards,
Jyri

> ---
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c    | 4 ++--
>  drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 3 ++-
>  drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 3 ++-
>  3 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> index f8892e9ad169..d6f8780e41df 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -75,8 +75,8 @@ static void tilcdc_fb_output_poll_changed(struct drm_device *dev)
>  	drm_fbdev_cma_hotplug_event(priv->fbdev);
>  }
>  
> -int tilcdc_atomic_check(struct drm_device *dev,
> -			struct drm_atomic_state *state)
> +static int tilcdc_atomic_check(struct drm_device *dev,
> +			       struct drm_atomic_state *state)
>  {
>  	int ret;
>  
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
> index 7b3650901930..b8dbcc2a4b7c 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
> @@ -25,6 +25,7 @@
>  #include <drm/drm_atomic_helper.h>
>  
>  #include "tilcdc_drv.h"
> +#include "tilcdc_panel.h"
>  
>  struct panel_module {
>  	struct tilcdc_module base;
> @@ -433,7 +434,7 @@ static struct of_device_id panel_of_match[] = {
>  		{ },
>  };
>  
> -struct platform_driver panel_driver = {
> +static struct platform_driver panel_driver = {
>  	.probe = panel_probe,
>  	.remove = panel_remove,
>  	.driver = {
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
> index c6a70da6473d..2247150f326a 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
> @@ -23,6 +23,7 @@
>  #include <drm/drm_atomic_helper.h>
>  
>  #include "tilcdc_drv.h"
> +#include "tilcdc_tfp410.h"
>  
>  struct tfp410_module {
>  	struct tilcdc_module base;
> @@ -382,7 +383,7 @@ static struct of_device_id tfp410_of_match[] = {
>  		{ },
>  };
>  
> -struct platform_driver tfp410_driver = {
> +static struct platform_driver tfp410_driver = {
>  	.probe = tfp410_probe,
>  	.remove = tfp410_remove,
>  	.driver = {
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2016-09-22 20:29 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 13:33 [PATCH 00/14] drm: Fix a bunch of sparse warnings ville.syrjala
2016-09-19 13:33 ` [PATCH 01/14] drm/atomic-helper: Fix " ville.syrjala
2016-09-19 13:33 ` [PATCH 02/14] drm/blend: " ville.syrjala
2016-09-20  6:52   ` Laurent Pinchart
2016-09-19 13:33 ` [PATCH 03/14] drm/fb-helper: " ville.syrjala
2016-09-19 14:46   ` Daniel Vetter
2016-09-19 13:33 ` [PATCH 04/14] drm/arm: " ville.syrjala
2016-09-20  8:06   ` Liviu Dudau
2016-09-20 12:44     ` Liviu Dudau
2016-09-19 13:33 ` [PATCH 05/14] drm/ast: " ville.syrjala
2016-09-19 13:33 ` [PATCH 06/14] drm/bochs: " ville.syrjala
2016-09-19 13:33 ` [PATCH 07/14] drm/cirrus: " ville.syrjala
2016-09-19 13:33 ` [PATCH 08/14] drm/mgag200: " ville.syrjala
2016-09-19 13:33 ` [PATCH 09/14] drm/msm: " ville.syrjala
2016-09-19 13:52   ` Emil Velikov
2016-09-19 15:33     ` Jani Nikula
2016-09-19 16:01       ` Emil Velikov
2016-09-19 13:33 ` [PATCH 10/14] drm/nouveau: " ville.syrjala
2016-09-19 13:33 ` [PATCH 11/14] drm/rockchip: " ville.syrjala
2016-09-19 13:33 ` [PATCH 12/14] drm/sti: " ville.syrjala
2016-09-19 14:52   ` Vincent ABRIOU
2016-09-19 13:33 ` [PATCH 13/14] drm/sun4i: " ville.syrjala
2016-09-19 19:54   ` Maxime Ripard
2016-09-19 13:33 ` [PATCH 14/14] drm/tilcdc: " ville.syrjala
2016-09-22 20:29   ` Jyri Sarha

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.