From: Arnd Bergmann <arnd@kernel.org>
To: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Lijo Lazar" <lijo.lazar@amd.com>, "Le Ma" <le.ma@amd.com>
Cc: Tim Huang <tim.huang@amd.com>,
Jingyu Wang <jingyuwang_vip@163.com>,
Arnd Bergmann <arnd@arndb.de>, Bokun Zhang <Bokun.Zhang@amd.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org,
Hans de Goede <hdegoede@redhat.com>,
Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH 5/5] drm/amdgpu: fix acpi build warnings
Date: Mon, 22 May 2023 13:50:32 +0200 [thread overview]
Message-ID: <20230522115047.1169839-5-arnd@kernel.org> (raw)
In-Reply-To: <20230522115047.1169839-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
Two newly introduced functions are in the global namespace but have no prototypes
or callers outside of amdgpu_acpi.c, another function is static but only has
a caller inside of an #ifdef:
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:902:13: error: no previous prototype for 'amdgpu_acpi_get_node_id' [-Werror=missing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:928:30: error: no previous prototype for 'amdgpu_acpi_get_dev' [-Werror=missing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:860:33: error: 'amdgpu_acpi_get_numa_info' defined but not used [-Werror=unused-function]
Avoid the warnings by marking all of them static and ensuring that the compiler is
able to see the callsites.
Fixes: c34db97b8217 ("drm/amdgpu: Add API to get numa information of XCC")
Fixes: 1f6f659d06e1 ("drm/amdgpu: Store additional numa node information")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 873532c4adbe..1dbcd0e62478 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -899,13 +899,15 @@ static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm)
*
* Returns ACPI STATUS OK with Node ID on success or the corresponding failure reason
*/
-acpi_status amdgpu_acpi_get_node_id(acpi_handle handle,
+static acpi_status amdgpu_acpi_get_node_id(acpi_handle handle,
struct amdgpu_numa_info **numa_info)
{
-#ifdef CONFIG_ACPI_NUMA
u64 pxm;
acpi_status status;
+ if (!IS_ENABLED(CONFIG_ACPI_NUMA))
+ return_ACPI_STATUS(AE_NOT_EXIST);
+
if (!numa_info)
return_ACPI_STATUS(AE_ERROR);
@@ -920,12 +922,9 @@ acpi_status amdgpu_acpi_get_node_id(acpi_handle handle,
return_ACPI_STATUS(AE_ERROR);
return_ACPI_STATUS(AE_OK);
-#else
- return_ACPI_STATUS(AE_NOT_EXIST);
-#endif
}
-struct amdgpu_acpi_dev_info *amdgpu_acpi_get_dev(u16 bdf)
+static struct amdgpu_acpi_dev_info *amdgpu_acpi_get_dev(u16 bdf)
{
struct amdgpu_acpi_dev_info *acpi_dev;
--
2.39.2
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Lijo Lazar" <lijo.lazar@amd.com>, "Le Ma" <le.ma@amd.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Tim Huang <tim.huang@amd.com>,
Mario Limonciello <mario.limonciello@amd.com>,
Bokun Zhang <Bokun.Zhang@amd.com>,
Jingyu Wang <jingyuwang_vip@163.com>,
Hans de Goede <hdegoede@redhat.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] drm/amdgpu: fix acpi build warnings
Date: Mon, 22 May 2023 13:50:32 +0200 [thread overview]
Message-ID: <20230522115047.1169839-5-arnd@kernel.org> (raw)
In-Reply-To: <20230522115047.1169839-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
Two newly introduced functions are in the global namespace but have no prototypes
or callers outside of amdgpu_acpi.c, another function is static but only has
a caller inside of an #ifdef:
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:902:13: error: no previous prototype for 'amdgpu_acpi_get_node_id' [-Werror=missing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:928:30: error: no previous prototype for 'amdgpu_acpi_get_dev' [-Werror=missing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:860:33: error: 'amdgpu_acpi_get_numa_info' defined but not used [-Werror=unused-function]
Avoid the warnings by marking all of them static and ensuring that the compiler is
able to see the callsites.
Fixes: c34db97b8217 ("drm/amdgpu: Add API to get numa information of XCC")
Fixes: 1f6f659d06e1 ("drm/amdgpu: Store additional numa node information")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 873532c4adbe..1dbcd0e62478 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -899,13 +899,15 @@ static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm)
*
* Returns ACPI STATUS OK with Node ID on success or the corresponding failure reason
*/
-acpi_status amdgpu_acpi_get_node_id(acpi_handle handle,
+static acpi_status amdgpu_acpi_get_node_id(acpi_handle handle,
struct amdgpu_numa_info **numa_info)
{
-#ifdef CONFIG_ACPI_NUMA
u64 pxm;
acpi_status status;
+ if (!IS_ENABLED(CONFIG_ACPI_NUMA))
+ return_ACPI_STATUS(AE_NOT_EXIST);
+
if (!numa_info)
return_ACPI_STATUS(AE_ERROR);
@@ -920,12 +922,9 @@ acpi_status amdgpu_acpi_get_node_id(acpi_handle handle,
return_ACPI_STATUS(AE_ERROR);
return_ACPI_STATUS(AE_OK);
-#else
- return_ACPI_STATUS(AE_NOT_EXIST);
-#endif
}
-struct amdgpu_acpi_dev_info *amdgpu_acpi_get_dev(u16 bdf)
+static struct amdgpu_acpi_dev_info *amdgpu_acpi_get_dev(u16 bdf)
{
struct amdgpu_acpi_dev_info *acpi_dev;
--
2.39.2
next prev parent reply other threads:[~2023-05-22 11:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 11:50 [PATCH 1/5] drm/amd/pm: mark irq functions as 'static' Arnd Bergmann
2023-05-22 11:50 ` Arnd Bergmann
2023-05-22 11:50 ` [PATCH 2/5] drm/amdkfd: mark local functions as static Arnd Bergmann
2023-05-22 11:50 ` Arnd Bergmann
2023-05-22 11:50 ` [PATCH 3/5] drm/amdgpu:mark aqua_vanjaram_reg_init.c function " Arnd Bergmann
2023-05-22 11:50 ` Arnd Bergmann
2023-05-22 11:50 ` [PATCH 4/5] drm/amdgpu: use %pad format string for dma_addr_t Arnd Bergmann
2023-05-22 11:50 ` Arnd Bergmann
2023-05-22 11:50 ` Arnd Bergmann [this message]
2023-05-22 11:50 ` [PATCH 5/5] drm/amdgpu: fix acpi build warnings Arnd Bergmann
2023-05-22 15:08 ` Alex Deucher
2023-05-22 15:08 ` Alex Deucher
2023-05-22 15:08 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230522115047.1169839-5-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=Bokun.Zhang@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arnd@arndb.de \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=jingyuwang_vip@163.com \
--cc=le.ma@amd.com \
--cc=lijo.lazar@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=tim.huang@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.