crc:Fix build errors
Subsystems (3)
PATCH 1/1 crc:Fix build errors
If CONFIG_DRM_NOUVEAU=y,the following errors
are seen while building crc.h.
In file included from /scratch/linux/drivers/gpu/drm/nouveau/nouveau_display.c:47:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_head_crc_late_register’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:109:47: error: parameter name omitted
static inline int nv50_head_crc_late_register(struct nv50_head *) {}
^~~~~~~~~~~~~~~~~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:109:54: warning: no return statement in function returning non-void [-Wreturn-type]
static inline int nv50_head_crc_late_register(struct nv50_head *) {}
^~~~~~~~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_handle_vblank’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:111:57: warning: ‘return’ with a value, in function returning void
nv50_crc_handle_vblank(struct nv50_head *head) { return 0; }
^/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:111:1: note: declared here
nv50_crc_handle_vblank(struct nv50_head *head) { return 0; } ^~~~~~~~~~~~~~~~~~~~~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_check_head’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:114:28: error: parameter name omitted
nv50_crc_atomic_check_head(struct nv50_head *, struct nv50_head_atom *,
^~~~~~~~~~~~~~~~~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:114:48: error: parameter name omitted
nv50_crc_atomic_check_head(struct nv50_head *, struct nv50_head_atom *,
^~~~~~~~~~~~~~~~~~~~~~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:115:7: error: parameter name omitted
struct nv50_head_atom *) {}
^~~~~~~~~~~~~~~~~~~~~~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:115:14: warning: no return statement in function returning non-void [-Wreturn-type]
struct nv50_head_atom *) {}
^~~~~~~~~~~~~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_stop_reporting’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:118:32: error: parameter name omitted
nv50_crc_atomic_stop_reporting(struct drm_atomic_state *) {}
^~~~~~~~~~~~~~~~~~~~~~~~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_init_notifier_contexts’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:120:40: error: parameter name omitted
nv50_crc_atomic_init_notifier_contexts(struct drm_atomic_state *) {}
^~~~~~~~~~~~~~~~~~~~~~~~~/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_release_notifier_contexts’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:122:43: error: parameter name omitted
--- drivers/gpu/drm/nouveau/dispnv50/crc.h | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/crc.h +22 -22
@@ -76,22 +76,22 @@ struct nv50_crc { };void nv50_crc_init (struct drm_device *dev); -int nv50_head_crc_late_register (struct nv50_head *); +int nv50_head_crc_late_register (struct nv50_head *head);void nv50_crc_handle_vblank (struct nv50_head *head); -int nv50_crc_verify_source (struct drm_crtc *,const char *,size_t *); -const char *const *nv50_crc_get_sources (struct drm_crtc *,size_t *); -int nv50_crc_set_source (struct drm_crtc *,const char *); +int nv50_crc_verify_source (struct drm_crtc *crtc,const char *source_name,size_t *values_cnt); +const char *const *nv50_crc_get_sources (struct drm_crtc *crtc,size_t *count); +int nv50_crc_set_source (struct drm_crtc *crtc,const char *source_str); -int nv50_crc_atomic_check_head (struct nv50_head *,struct nv50_head_atom *, -struct nv50_head_atom *); +int nv50_crc_atomic_check_head (struct nv50_head *head,struct nv50_head_atom *asyh, +struct nv50_head_atom *armh);void nv50_crc_atomic_check_outp (struct nv50_atom *atom); -void nv50_crc_atomic_stop_reporting (struct drm_atomic_state *); -void nv50_crc_atomic_init_notifier_contexts (struct drm_atomic_state *); -void nv50_crc_atomic_release_notifier_contexts (struct drm_atomic_state *); -void nv50_crc_atomic_start_reporting (struct drm_atomic_state *); -void nv50_crc_atomic_set (struct nv50_head *,struct nv50_head_atom *); -void nv50_crc_atomic_clr (struct nv50_head *); +void nv50_crc_atomic_stop_reporting (struct drm_atomic_state *state); +void nv50_crc_atomic_init_notifier_contexts (struct drm_atomic_state *state); +void nv50_crc_atomic_release_notifier_contexts (struct drm_atomic_state *state); +void nv50_crc_atomic_start_reporting (struct drm_atomic_state *state); +void nv50_crc_atomic_set (struct nv50_head *head,struct nv50_head_atom *asyh); +void nv50_crc_atomic_clr (struct nv50_head *head);extern const struct nv50_crc_func crc907d;extern const struct nv50_crc_func crcc37d;
@@ -106,26 +106,26 @@ struct nv50_crc_atom {};#define nv50_crc_set_source NULLstatic inline void nv50_crc_init (struct drm_device *dev) {} -static inline int nv50_head_crc_late_register (struct nv50_head *) {} +static inline int nv50_head_crc_late_register (struct nv50_head *head) {return 0 ; }static inline void -nv50_crc_handle_vblank (struct nv50_head *head) {return 0 ; } +nv50_crc_handle_vblank (struct nv50_head *head) {}static inline int -nv50_crc_atomic_check_head (struct nv50_head *,struct nv50_head_atom *, -struct nv50_head_atom *) {} +nv50_crc_atomic_check_head (struct nv50_head *head,struct nv50_head_atom *asyh, +struct nv50_head_atom *armh) {return 0 ; }static inline void nv50_crc_atomic_check_outp (struct nv50_atom *atom) {}static inline void -nv50_crc_atomic_stop_reporting (struct drm_atomic_state *) {} +nv50_crc_atomic_stop_reporting (struct drm_atomic_state *state) {}static inline void -nv50_crc_atomic_init_notifier_contexts (struct drm_atomic_state *) {} +nv50_crc_atomic_init_notifier_contexts (struct drm_atomic_state *state) {}static inline void -nv50_crc_atomic_release_notifier_contexts (struct drm_atomic_state *) {} +nv50_crc_atomic_release_notifier_contexts (struct drm_atomic_state *state) {}static inline void -nv50_crc_atomic_start_reporting (struct drm_atomic_state *) {} +nv50_crc_atomic_start_reporting (struct drm_atomic_state *state) {}static inline void -nv50_crc_atomic_set (struct nv50_head *,struct nv50_head_atom *) {} +nv50_crc_atomic_set (struct nv50_head *head,struct nv50_head_atom *asyh) {}static inline void -nv50_crc_atomic_clr (struct nv50_head *) {} +nv50_crc_atomic_clr (struct nv50_head *head) {}#endif /* IS_ENABLED(CONFIG_DEBUG_FS) */ #endif /* !__NV50_CRC_H__ */
Signature · 1 line
2.7.4
Lyude Paul
maintainerHi, I actually already sent a patch for this:
https://patchwork.freedesktop.org/patch/378202/
I'm guessing it hasn't gotten picked up upstream yet?
Quoted 152 lines · Peng Wu
If
CONFIG_DRM_NOUVEAU=y,thefollowing errors
are seen while buildingcrc.h.In file included from /scratch/linux/drivers/gpu/drm/nouveau/nouveau_display.c:47:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_head_crc_late_register’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:109:47: error:
parameter name omitted
static inline intnv50_head_crc_late_register(struct nv50_head *){}^~~~~~~~~~~~~~~~~~ /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:109:54: warning: no return statement in function returning non-void [-Wreturn-type] static inline int nv50_head_crc_late_register(struct nv50_head *) {} ^~~~~~~~~/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_handle_vblank’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:111:57: warning:
‘return’ with a value, in function returning void
nv50_crc_handle_vblank(struct nv50_head *head){ return 0; }^/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:111:1: note: declared here
nv50_crc_handle_vblank(struct nv50_head *head){ return 0; } ^~~~~~~~~~~~~~~~~~~~~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_check_head’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:114:28: error:
parameter name omitted
nv50_crc_atomic_check_head(structnv50_head*, structnv50_head_atom*,^~~~~~~~~~~~~~~~~~ /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:114:48: error: parameter name omitted nv50_crc_atomic_check_head(struct nv50_head *, struct nv50_head_atom *, ^~~~~~~~~~~~~~~~~~~~~~~ /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:115:7: error: parameter name omitted struct nv50_head_atom *) {} ^~~~~~~~~~~~~~~~~~~~~~~ /scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:115:14: warning: no return statement in function returning non-void [-Wreturn-type] struct nv50_head_atom *) {} ^~~~~~~~~~~~~~/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_stop_reporting’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:118:32: error:
parameter name omitted
nv50_crc_atomic_stop_reporting(struct drm_atomic_state *){}^~~~~~~~~~~~~~~~~~~~~~~~~/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_init_notifier_contexts’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:120:40: error:
parameter name omitted
nv50_crc_atomic_init_notifier_contexts(struct drm_atomic_state *){}^~~~~~~~~~~~~~~~~~~~~~~~~/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_release_notifier_contexts’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:122:43: error:
parameter name omittedSigned-off-by Peng Wu <[email protected]>--- drivers/gpu/drm/nouveau/dispnv50/crc.h | 44 +++++++++++++++++------------ ----- 1 file changed, 22 insertions(+), 22 deletions(-)drivers/gpu/drm/nouveau/dispnv50/crc.h +8
-12@@ -76,22 +76,22 @@ struct nv50_crc { };void nv50_crc_init (struct drm_device *dev); -int nv50_head_crc_late_register (struct nv50_head *); +int nv50_head_crc_late_register (struct nv50_head *head);void nv50_crc_handle_vblank (struct nv50_head *head); -int nv50_crc_verify_source (struct drm_crtc *,const char *,size_t *); -const char *const *nv50_crc_get_sources (struct drm_crtc *,size_t *); -int nv50_crc_set_source (struct drm_crtc *,const char *); +int nv50_crc_verify_source (struct drm_crtc *crtc,const char *source_name,size_t *values_cnt); +const char *const *nv50_crc_get_sources (struct drm_crtc *crtc,size_t *count); +int nv50_crc_set_source (struct drm_crtc *crtc,const char *source_str); -int nv50_crc_atomic_check_head (struct nv50_head *,struct nv50_head_atom *, -struct nv50_head_atom *); +int nv50_crc_atomic_check_head (struct nv50_head *head,struct nv50_head_atom *asyh, +struct nv50_head_atom *armh);void nv50_crc_atomic_check_outp (struct nv50_atom *atom); -void nv50_crc_atomic_stop_reporting (struct drm_atomic_state *); -void nv50_crc_atomic_init_notifier_contexts (struct drm_atomic_state *); -void nv50_crc_atomic_release_notifier_contexts (struct drm_atomic_state *); -void nv50_crc_atomic_start_reporting (struct drm_atomic_state *); -void nv50_crc_atomic_set (struct nv50_head *,struct nv50_head_atom *); -void nv50_crc_atomic_clr (struct nv50_head *); +void nv50_crc_atomic_stop_reporting (struct drm_atomic_state *state); +void nv50_crc_atomic_init_notifier_contexts(struct drm_atomic_state*state);
+voidnv50_crc_atomic_release_notifier_contexts(struct drm_atomic_state *state);drivers/gpu/drm/nouveau/dispnv50/crc.h +2
-0+void nv50_crc_atomic_start_reporting (struct drm_atomic_state *state); +void nv50_crc_atomic_set(struct nv50_head *head, struct nv50_head_atom*asyh);
drivers/gpu/drm/nouveau/dispnv50/crc.h +11
-10+void nv50_crc_atomic_clr (struct nv50_head *head);extern const struct nv50_crc_func crc907d;extern const struct nv50_crc_func crcc37d;@@ -106,26 +106,26 @@ struct nv50_crc_atom {};#define nv50_crc_set_source NULLstatic inline void nv50_crc_init (struct drm_device *dev) {} -static inline int nv50_head_crc_late_register (struct nv50_head *) {} +static inline int nv50_head_crc_late_register (struct nv50_head *head) {return 0 ; }static inline void -nv50_crc_handle_vblank (struct nv50_head *head) {return 0 ; } +nv50_crc_handle_vblank (struct nv50_head *head) {}static inline int -nv50_crc_atomic_check_head (struct nv50_head *,struct nv50_head_atom *, -struct nv50_head_atom *) {} +nv50_crc_atomic_check_head (struct nv50_head *head,struct nv50_head_atom *asyh, +struct nv50_head_atom *armh) {return 0 ; }static inline void nv50_crc_atomic_check_outp (struct nv50_atom *atom) {}static inline void -nv50_crc_atomic_stop_reporting (struct drm_atomic_state *) {} +nv50_crc_atomic_stop_reporting (struct drm_atomic_state *state) {}static inline void -nv50_crc_atomic_init_notifier_contexts (struct drm_atomic_state *) {} +nv50_crc_atomic_init_notifier_contexts (struct drm_atomic_state *state) {}static inline void -nv50_crc_atomic_release_notifier_contexts (struct drm_atomic_state *) {} +nv50_crc_atomic_release_notifier_contexts (struct drm_atomic_state *state) {}static inline void -nv50_crc_atomic_start_reporting (struct drm_atomic_state *) {} +nv50_crc_atomic_start_reporting (struct drm_atomic_state *state) {}static inline void -nv50_crc_atomic_set (struct nv50_head *,struct nv50_head_atom *) {} +nv50_crc_atomic_set (struct nv50_head *head,struct nv50_head_atom *asyh) {}static inline void -nv50_crc_atomic_clr (struct nv50_head *) {} +nv50_crc_atomic_clr (struct nv50_head *head) {}#endif /*
IS_ENABLED(CONFIG_DEBUG_FS)*/
#endif /* !__NV50_CRC_H__ */
Signature · 8 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau