diff mbox

[22/85] drivers: gpu: Mark functions as static in radeon_device.c

Message ID 8af55c93ab10b11d473f9c731eddd6710ae7a418.1389018324.git.rashika.kheria@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rashika Jan. 6, 2014, 3:21 p.m. UTC
Mark functions radeon_doorbell_init() and radeon_doorbell_fini() as
static in drm/radeon/radeon_device.c because they are not used outside
this file.

This eliminates the following warning in drm/radeon/radeon_device.c:
drivers/gpu/drm/radeon/radeon_device.c:252:5: warning: no previous prototype for ‘radeon_doorbell_init’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_device.c:281:6: warning: no previous prototype for ‘radeon_doorbell_fini’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
 drivers/gpu/drm/radeon/radeon_device.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Deucher Jan. 8, 2014, 4:40 p.m. UTC | #1
On Mon, Jan 6, 2014 at 10:21 AM, Rashika Kheria
<rashika.kheria@gmail.com> wrote:
> Mark functions radeon_doorbell_init() and radeon_doorbell_fini() as
> static in drm/radeon/radeon_device.c because they are not used outside
> this file.
>
> This eliminates the following warning in drm/radeon/radeon_device.c:
> drivers/gpu/drm/radeon/radeon_device.c:252:5: warning: no previous prototype for ‘radeon_doorbell_init’ [-Wmissing-prototypes]
> drivers/gpu/drm/radeon/radeon_device.c:281:6: warning: no previous prototype for ‘radeon_doorbell_fini’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>

I've pulled in a subset of these patches:
http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-3.14-wip
I held off on some of the others as I'd rather fix up the headers
properly rather than just cramming everything in radeon.h or
radeon-asic.h for now.

Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_device.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index 39b033b..caf4975 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -249,7 +249,7 @@ void radeon_scratch_free(struct radeon_device *rdev, uint32_t reg)
>   * Init doorbell driver information (CIK)
>   * Returns 0 on success, error on failure.
>   */
> -int radeon_doorbell_init(struct radeon_device *rdev)
> +static int radeon_doorbell_init(struct radeon_device *rdev)
>  {
>         /* doorbell bar mapping */
>         rdev->doorbell.base = pci_resource_start(rdev->pdev, 2);
> @@ -278,7 +278,7 @@ int radeon_doorbell_init(struct radeon_device *rdev)
>   *
>   * Tear down doorbell driver information (CIK)
>   */
> -void radeon_doorbell_fini(struct radeon_device *rdev)
> +static void radeon_doorbell_fini(struct radeon_device *rdev)
>  {
>         iounmap(rdev->doorbell.ptr);
>         rdev->doorbell.ptr = NULL;
> --
> 1.7.9.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Josh Triplett Jan. 9, 2014, 12:07 a.m. UTC | #2
On Wed, Jan 08, 2014 at 11:40:28AM -0500, Alex Deucher wrote:
> On Mon, Jan 6, 2014 at 10:21 AM, Rashika Kheria
> <rashika.kheria@gmail.com> wrote:
> > Mark functions radeon_doorbell_init() and radeon_doorbell_fini() as
> > static in drm/radeon/radeon_device.c because they are not used outside
> > this file.
> >
> > This eliminates the following warning in drm/radeon/radeon_device.c:
> > drivers/gpu/drm/radeon/radeon_device.c:252:5: warning: no previous prototype for ‘radeon_doorbell_init’ [-Wmissing-prototypes]
> > drivers/gpu/drm/radeon/radeon_device.c:281:6: warning: no previous prototype for ‘radeon_doorbell_fini’ [-Wmissing-prototypes]
> >
> > Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> > Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> 
> I've pulled in a subset of these patches:
> http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-3.14-wip
> I held off on some of the others as I'd rather fix up the headers
> properly rather than just cramming everything in radeon.h or
> radeon-asic.h for now.

Can you elaborate on which patches are putting functions in the wrong
header, and what header you'd prefer to see them in?

- Josh Triplett
Alex Deucher Jan. 9, 2014, 2:35 p.m. UTC | #3
On Wed, Jan 8, 2014 at 7:07 PM, Josh Triplett <josh@joshtriplett.org> wrote:
> On Wed, Jan 08, 2014 at 11:40:28AM -0500, Alex Deucher wrote:
>> On Mon, Jan 6, 2014 at 10:21 AM, Rashika Kheria
>> <rashika.kheria@gmail.com> wrote:
>> > Mark functions radeon_doorbell_init() and radeon_doorbell_fini() as
>> > static in drm/radeon/radeon_device.c because they are not used outside
>> > this file.
>> >
>> > This eliminates the following warning in drm/radeon/radeon_device.c:
>> > drivers/gpu/drm/radeon/radeon_device.c:252:5: warning: no previous prototype for ‘radeon_doorbell_init’ [-Wmissing-prototypes]
>> > drivers/gpu/drm/radeon/radeon_device.c:281:6: warning: no previous prototype for ‘radeon_doorbell_fini’ [-Wmissing-prototypes]
>> >
>> > Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
>> > Reviewed-by: Josh Triplett <josh@joshtriplett.org>
>>
>> I've pulled in a subset of these patches:
>> http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-3.14-wip
>> I held off on some of the others as I'd rather fix up the headers
>> properly rather than just cramming everything in radeon.h or
>> radeon-asic.h for now.
>
> Can you elaborate on which patches are putting functions in the wrong
> header, and what header you'd prefer to see them in?

Sure.  atombios.h defines the vbios interface so it shouldn't have any
driver functions defined in it.  radeon_asic.h was only supposed to
include the function definitions for the asic specific callbacks
assigned in radeon_asic.c.  For everything else, I'd rather move to
asic specific headers, e.g., rather than adding r600_*() functions to
radeon.h for example, I'd rather add an r600.h and include that where
r600_*() functions are used, etc.

Thanks,

Alex
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 39b033b..caf4975 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -249,7 +249,7 @@  void radeon_scratch_free(struct radeon_device *rdev, uint32_t reg)
  * Init doorbell driver information (CIK)
  * Returns 0 on success, error on failure.
  */
-int radeon_doorbell_init(struct radeon_device *rdev)
+static int radeon_doorbell_init(struct radeon_device *rdev)
 {
 	/* doorbell bar mapping */
 	rdev->doorbell.base = pci_resource_start(rdev->pdev, 2);
@@ -278,7 +278,7 @@  int radeon_doorbell_init(struct radeon_device *rdev)
  *
  * Tear down doorbell driver information (CIK)
  */
-void radeon_doorbell_fini(struct radeon_device *rdev)
+static void radeon_doorbell_fini(struct radeon_device *rdev)
 {
 	iounmap(rdev->doorbell.ptr);
 	rdev->doorbell.ptr = NULL;