lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 6 Jan 2014 15:43:38 +0000
From:	"Deucher, Alexander" <Alexander.Deucher@....com>
To:	Rashika Kheria <rashika.kheria@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:	David Airlie <airlied@...ux.ie>,
	"Daenzer, Michel" <Michel.Daenzer@....com>,
	"Koenig, Christian" <Christian.Koenig@....com>,
	Dave Airlie <airlied@...hat.com>,
	Rafał Miłecki <zajec5@...il.com>,
	Damien Lespiau <damien.lespiau@...el.com>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"josh@...htriplett.org" <josh@...htriplett.org>
Subject: RE: [PATCH 32/85] drivers: gpu: Move prototype declarations to
 header file atombios.h

> -----Original Message-----
> From: Rashika Kheria [mailto:rashika.kheria@...il.com]
> Sent: Monday, January 06, 2014 10:38 AM
> To: linux-kernel@...r.kernel.org
> Cc: David Airlie; Deucher, Alexander; Rashika Kheria; Daenzer, Michel;
> Koenig, Christian; Dave Airlie; Rafał Miłecki; Damien Lespiau; dri-
> devel@...ts.freedesktop.org; josh@...htriplett.org
> 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@...il.com>
> Reviewed-by: Josh Triplett <josh@...htriplett.org>
> ---
>  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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ