RE: [PATCH 32/85] drivers: gpu: Move prototype declarations to header file atombios.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Rashika Kheria [mailto:rashika.kheria@xxxxxxxxx]
> Sent: Monday, January 06, 2014 10:38 AM
> To: linux-kernel@xxxxxxxxxxxxxxx
> Cc: David Airlie; Deucher, Alexander; Rashika Kheria; Daenzer, Michel;
> Koenig, Christian; Dave Airlie; Rafał Miłecki; Damien Lespiau; dri-
> devel@xxxxxxxxxxxxxxxxxxxxx; josh@xxxxxxxxxxxxxxxx
> Subject: [PATCH 32/85] drivers: gpu: Move prototype declarations to header
> file atombios.h
> 
> Move prototype declarations of functions radeon_atom_get_tv_timings()
> and radeon_atombios_connected_scratch_regs() to header file
> drm/radeon/atombios.h because they are used by more than one file.
> 
> Include the header file in atombios_encoders.c, radeon_atombios.c and
> radeon_connectors.c because they use the function whose prototype
> declarations are present in it.

It would be better to add these to radeon_mode.h for consistency with combios.

Alex

> 
> This eliminates the following warnings in drm/radeon/radeon_atombios.c:
> drivers/gpu/drm/radeon/radeon_atombios.c:1766:6: warning: no previous
> prototype for ‘radeon_atom_get_tv_timings’ [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_atombios.c:4012:1: warning: no previous
> prototype for ‘radeon_atombios_connected_scratch_regs’ [-Wmissing-
> prototypes]
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@xxxxxxxxx>
> Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/radeon/atombios.h          |    8 ++++++++
>  drivers/gpu/drm/radeon/atombios_encoders.c |    6 +-----
>  drivers/gpu/drm/radeon/radeon_atombios.c   |    1 +
>  drivers/gpu/drm/radeon/radeon_connectors.c |    5 +----
>  4 files changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/atombios.h
> b/drivers/gpu/drm/radeon/atombios.h
> index 92be50c..72a3aa7c 100644
> --- a/drivers/gpu/drm/radeon/atombios.h
> +++ b/drivers/gpu/drm/radeon/atombios.h
> @@ -193,6 +193,14 @@
>  #define	OFFSET_TO_GET_ATOMBIOS_STRINGS_NUMBER
> 	0x002f
>  #define	OFFSET_TO_GET_ATOMBIOS_STRINGS_START
> 	0x006e
> 
> +bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
> +				struct drm_display_mode *mode);
> +void
> +radeon_atombios_connected_scratch_regs(struct drm_connector
> *connector,
> +				       struct drm_encoder *encoder,
> +				       bool connected);
> +
> +
>  /* Common header for all ROM Data tables.
>    Every table pointed  _ATOM_MASTER_DATA_TABLE has this common
> header.
>    And the pointer actually points to this header. */
> diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c
> b/drivers/gpu/drm/radeon/atombios_encoders.c
> index a42d615..641298d 100644
> --- a/drivers/gpu/drm/radeon/atombios_encoders.c
> +++ b/drivers/gpu/drm/radeon/atombios_encoders.c
> @@ -28,6 +28,7 @@
>  #include <drm/radeon_drm.h>
>  #include "radeon.h"
>  #include "atom.h"
> +#include "atombios.h"
>  #include <linux/backlight.h>
> 
>  extern int atom_debug;
> @@ -283,11 +284,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 inline bool radeon_encoder_is_digital(struct drm_encoder *encoder)
>  {
>  	struct radeon_encoder *radeon_encoder =
> to_radeon_encoder(encoder);
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c
> b/drivers/gpu/drm/radeon/radeon_atombios.c
> index 5c39bf7..39f1fd6 100644
> --- a/drivers/gpu/drm/radeon/radeon_atombios.c
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
> @@ -28,6 +28,7 @@
>  #include "radeon.h"
> 
>  #include "atom.h"
> +#include "atombios.h"
>  #include "atom-bits.h"
> 
>  /* from radeon_encoder.c */
> diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c
> b/drivers/gpu/drm/radeon/radeon_connectors.c
> index 20a768a..9070487 100644
> --- a/drivers/gpu/drm/radeon/radeon_connectors.c
> +++ b/drivers/gpu/drm/radeon/radeon_connectors.c
> @@ -30,6 +30,7 @@
>  #include <drm/radeon_drm.h>
>  #include "radeon.h"
>  #include "atom.h"
> +#include "atombios.h"
> 
>  #include <linux/pm_runtime.h>
> 
> @@ -37,10 +38,6 @@ extern void
>  radeon_combios_connected_scratch_regs(struct drm_connector
> *connector,
>  				      struct drm_encoder *encoder,
>  				      bool connected);
> -extern void
> -radeon_atombios_connected_scratch_regs(struct drm_connector
> *connector,
> -				       struct drm_encoder *encoder,
> -				       bool connected);
> 
>  void radeon_connector_hotplug(struct drm_connector *connector)
>  {
> --
> 1.7.9.5
> 

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





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux