Message ID | 20201106214949.2042120-7-lee.jones@linaro.org |
---|---|
State | New |
Headers | show |
Series | [01/19] drm/ttm/ttm_range_manager: Demote non-conformant kernel-doc header | expand |
On Fri, Nov 6, 2020 at 4:50 PM Lee Jones <lee.jones@linaro.org> wrote: > > Both source files include atom.h, which seems like a reasonable > location to place an atom based function into. > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/radeon/radeon_atombios.c:1791:6: warning: no previous prototype for ‘radeon_atom_get_tv_timings’ [-Wmissing-prototypes] > 1791 | bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > Cc: Alex Deucher <alexander.deucher@amd.com> > Cc: "Christian König" <christian.koenig@amd.com> > Cc: David Airlie <airlied@linux.ie> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> > --- > drivers/gpu/drm/radeon/atom.h | 6 ++++++ > drivers/gpu/drm/radeon/atombios_encoders.c | 4 ---- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h > index 1bf06c91cd959..cb93b83114dbe 100644 > --- a/drivers/gpu/drm/radeon/atom.h > +++ b/drivers/gpu/drm/radeon/atom.h > @@ -154,6 +154,12 @@ bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size, > bool atom_parse_cmd_header(struct atom_context *ctx, int index, > uint8_t *frev, uint8_t *crev); > int atom_allocate_fb_scratch(struct atom_context *ctx); > + > +struct drm_display_mode; > +struct radeon_device; > +bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, > + struct drm_display_mode *mode); > + I'd prefer to add radeon_atombios.h for all of the stuff exported from radeon_atombios.c. When you add the .h file, please take the copyright license from the .c file which implements the functions. Thanks, Alex > #include "atom-types.h" > #include "atombios.h" > #include "ObjectID.h" > diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c > index cc5ee1b3af84f..85f903caf12e1 100644 > --- a/drivers/gpu/drm/radeon/atombios_encoders.c > +++ b/drivers/gpu/drm/radeon/atombios_encoders.c > @@ -296,10 +296,6 @@ static void radeon_atom_backlight_exit(struct radeon_encoder *encoder) > > #endif > > -/* evil but including atombios.h is much worse */ > -bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, > - struct drm_display_mode *mode); > - > static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, > const struct drm_display_mode *mode, > struct drm_display_mode *adjusted_mode) > -- > 2.25.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h index 1bf06c91cd959..cb93b83114dbe 100644 --- a/drivers/gpu/drm/radeon/atom.h +++ b/drivers/gpu/drm/radeon/atom.h @@ -154,6 +154,12 @@ bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size, bool atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t *frev, uint8_t *crev); int atom_allocate_fb_scratch(struct atom_context *ctx); + +struct drm_display_mode; +struct radeon_device; +bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, + struct drm_display_mode *mode); + #include "atom-types.h" #include "atombios.h" #include "ObjectID.h" diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index cc5ee1b3af84f..85f903caf12e1 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -296,10 +296,6 @@ static void radeon_atom_backlight_exit(struct radeon_encoder *encoder) #endif -/* evil but including atombios.h is much worse */ -bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, - struct drm_display_mode *mode); - static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)
Both source files include atom.h, which seems like a reasonable location to place an atom based function into. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_atombios.c:1791:6: warning: no previous prototype for ‘radeon_atom_get_tv_timings’ [-Wmissing-prototypes] 1791 | bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/gpu/drm/radeon/atom.h | 6 ++++++ drivers/gpu/drm/radeon/atombios_encoders.c | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-)