Skip to contentSkip to conversation

drm/nouveau/kms/nv50-: make base917c_format static

PATCH New Ben Dooks 1 participant 3 messages Oct 8, 2019

Subsystems (3)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/3 drm/nouveau/kms/nv50-: make base917c_format static

The base917c_format isn't exported, so make it static to avoid the following warning:

drivers/gpu/drm/nouveau/dispnv50/base917c.c:26:1: warning: symbol 'base917c_format' was not declared. Should it be static?

---
 drivers/gpu/drm/nouveau/dispnv50/base917c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/dispnv50/base917c.c +1 -1
index a1baed4fe0e9..ca260509a4f1 100644
@@ -22,7 +22,7 @@
 #include "base.h"
 #include "atom.h"
 
-const u32
+static const u32
 base917c_format[] = {
 	DRM_FORMAT_C8,
 	DRM_FORMAT_XRGB8888,
Signature · 1 line
2.23.0
author
#1 lore raw

PATCH 2/3 drm/nouveau/kms/nv50-: make unexported items static

Make functions that are not used directly outside the file they are in static to avoid the following warnings:

drivers/gpu/drm/nouveau/dispnv50/headc57d.c:73:1: warning: symbol 'headc57d_olut_clr' was not declared. Should it be static? drivers/gpu/drm/nouveau/dispnv50/headc57d.c:85:1: warning: symbol 'headc57d_olut_set' was not declared. Should it be static? drivers/gpu/drm/nouveau/dispnv50/headc57d.c:155:1: warning: symbol 'headc57d_olut' was not declared. Should it be static?

---
 drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/headc57d.c +3 -3
index 32a7f9e85fb0..f3d46276a7c4 100644
@@ -69,7 +69,7 @@ headc57d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
 	}
 }
 
-void
+static void
 headc57d_olut_clr(struct nv50_head *head)
 {
 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
@@ -81,7 +81,7 @@ headc57d_olut_clr(struct nv50_head *head)
 	}
 }
 
-void
+static void
 headc57d_olut_set(struct nv50_head *head, struct nv50_head_atom *asyh)
 {
 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
@@ -151,7 +151,7 @@ headc57d_olut_load(struct drm_color_lut *in, int size, void __iomem *mem)
 	writew(readw(mem - 4), mem + 4);
 }
 
-void
+static void
 headc57d_olut(struct nv50_head *head, struct nv50_head_atom *asyh)
 {
 	asyh->olut.mode = 2; /* DIRECT10 */
Signature · 1 line
2.23.0
author
#2 lore raw

PATCH 3/3 drm/nouveau/kms/nv50-: include n50_display.h for nv50_display_create

In reply to Ben Dooks

Include n50_display.h for the definition of nv50_display_create to fix the warning (and remove the now non-exported definitions in the n50_display.h to allow the code to build):

drivers/gpu/drm/nouveau/dispnv50/disp.c:2297:1: warning: symbol 'nv50_display_create' was not declared. Should it be static?

---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 ++
 drivers/gpu/drm/nouveau/nv50_display.h  | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/disp.c +2 -0
index b46be8a091e9..f7774cc927d8 100644
@@ -53,6 +53,8 @@
 #include "nouveau_fence.h"
 #include "nouveau_fbcon.h"
 
+#include "nv50_display.h"
+
 #include <subdev/bios/dp.h>
 
 /******************************************************************************
drivers/gpu/drm/nouveau/nv50_display.h +0 -3
index fbd3b15583bc..2421401d1263 100644
@@ -31,7 +31,4 @@
 #include "nouveau_reg.h"
 
 int  nv50_display_create(struct drm_device *);
-void nv50_display_destroy(struct drm_device *);
-int  nv50_display_init(struct drm_device *);
-void nv50_display_fini(struct drm_device *);
 #endif /* __NV50_DISPLAY_H__ */
Signature · 1 line
2.23.0