[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADnq5_O_S2eXif9_2guEB9=DLEfUmw_tFHKfXsDFQ6EJpHw7HQ@mail.gmail.com>
Date: Mon, 24 Oct 2016 12:28:29 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Baoyou Xie <baoyou.xie@...aro.org>
Cc: "Deucher, Alexander" <alexander.deucher@....com>,
Christian Koenig <christian.koenig@....com>,
Dave Airlie <airlied@...ux.ie>,
Nicolai Hähnle <nicolai.haehnle@....com>,
"Zhou, Jammy" <Jammy.Zhou@....com>,
Ken Wang <Qingqing.Wang@....com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Tom St Denis <tom.stdenis@....com>,
"Daenzer, Michel" <michel.daenzer@....com>,
Gustavo Padovan <gustavo.padovan@...labora.co.uk>,
eric.engestrom@...tec.com, Emily Deng <Emily.Deng@....com>,
Chunming Zhou <David1.Zhou@....com>,
Carlos Palminha <CARLOS.PALMINHA@...opsys.com>,
Ville Syrjälä <ville.syrjala@...ux.intel.com>,
Flora Cui <Flora.Cui@....com>,
Vitaly Prosyak <vitaly.prosyak@....com>,
Alexandre Demers <alexandre.f.demers@...il.com>,
Junwei Zhang <Jerry.Zhang@....com>, Rex Zhu <Rex.Zhu@....com>,
"Edward O'Callaghan" <funfunctor@...klore1984.net>,
Arnd Bergmann <arnd@...db.de>, tang.qiang007@....com.cn,
xie.baoyou@....com.cn, LKML <linux-kernel@...r.kernel.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>, han.fei@....com.cn
Subject: Re: [PATCH 3/3] drm/amdgpu: move function declaration to header file
On Sat, Oct 22, 2016 at 4:48 AM, Baoyou Xie <baoyou.xie@...aro.org> wrote:
> We get 1 warning when building kernel with W=1:
> drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:37:6: warning: no previous prototype for 'amdgpu_pm_acpi_event_handler' [-Wmissing-prototypes]
>
> In fact, this function is defined in
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c, but should be declared
> in a header file. So this patch moves the function declaration
> to drivers/gpu/drm/amd/amdgpu/amdgpu.h.
I want to try and avoid making amdgpu.h a random dumping ground for
function defs. Let's put it in amdgpu_pm.h instead. How about the
attached patch?
Alex
>
> Signed-off-by: Baoyou Xie <baoyou.xie@...aro.org>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 1 -
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 039b57e..c0bc42b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -2145,6 +2145,8 @@ void amdgpu_io_wreg(struct amdgpu_device *adev, u32 reg, u32 v);
> u32 amdgpu_mm_rdoorbell(struct amdgpu_device *adev, u32 index);
> void amdgpu_mm_wdoorbell(struct amdgpu_device *adev, u32 index, u32 v);
>
> +void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev);
> +
> /*
> * Registers read & write functions.
> */
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 5796539..d77d630 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -33,7 +33,6 @@
> #include "amd_acpi.h"
> #include "atom.h"
>
> -extern void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev);
> /* Call the ATIF method
> */
> /**
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
View attachment "0001-drm-amdgpu-amdgpu_pm_acpi_event_handler-definition-t.patch" of type "text/x-patch" (1925 bytes)
Powered by blists - more mailing lists