[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231129113825.2961913-1-arnd@kernel.org>
Date: Wed, 29 Nov 2023 12:33:07 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Frank Binns <frank.binns@...tec.com>,
Donald Robson <donald.robson@...tec.com>,
Matt Coster <matt.coster@...tec.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Sarah Walker <sarah.walker@...tec.com>,
Danilo Krummrich <dakr@...hat.com>,
Boris Brezillon <boris.brezillon@...labora.com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] drm/imagination: avoid -Wmissing-prototype warnings
From: Arnd Bergmann <arnd@...db.de>
This warning option is now enabled by default, causing a few build regressions
in combination with the newly added pvr driver:
drivers/gpu/drm/imagination/pvr_device.c:130:6: error: no previous prototype for 'pvr_device_process_active_queues' [-Werror=missing-prototypes]
130 | void pvr_device_process_active_queues(struct pvr_device *pvr_dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/imagination/pvr_fw_meta.c:33:1: error: no previous prototype for 'pvr_meta_cr_read32' [-Werror=missing-prototypes]
33 | pvr_meta_cr_read32(struct pvr_device *pvr_dev, u32 reg_addr, u32 *reg_value_out)
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/imagination/pvr_vm.c:542:6: error: no previous prototype for 'pvr_gpuvm_free' [-Werror=missing-prototypes]
542 | void pvr_gpuvm_free(struct drm_gpuvm *gpuvm)
Mark pvr_device_process_active_queues and pvr_gpuvm_free static as they are only used
in the file they are defined in, and include the correct header for the pvr_meta_cr_read32
declaration.
Fixes: eaf01ee5ba28 ("drm/imagination: Implement job submission and scheduling")
Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support")
Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/gpu/drm/imagination/pvr_device.c | 2 +-
drivers/gpu/drm/imagination/pvr_fw_meta.c | 1 +
drivers/gpu/drm/imagination/pvr_vm.c | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/imagination/pvr_device.c b/drivers/gpu/drm/imagination/pvr_device.c
index 8499becf4fbb..048eba776cf2 100644
--- a/drivers/gpu/drm/imagination/pvr_device.c
+++ b/drivers/gpu/drm/imagination/pvr_device.c
@@ -127,7 +127,7 @@ static int pvr_device_clk_init(struct pvr_device *pvr_dev)
* This is called any time we receive a FW event. It iterates over all
* active queues and calls pvr_queue_process() on them.
*/
-void pvr_device_process_active_queues(struct pvr_device *pvr_dev)
+static void pvr_device_process_active_queues(struct pvr_device *pvr_dev)
{
struct pvr_queue *queue, *tmp_queue;
LIST_HEAD(active_queues);
diff --git a/drivers/gpu/drm/imagination/pvr_fw_meta.c b/drivers/gpu/drm/imagination/pvr_fw_meta.c
index 119934c36184..c39beb70c317 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_meta.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_meta.c
@@ -4,6 +4,7 @@
#include "pvr_device.h"
#include "pvr_fw.h"
#include "pvr_fw_info.h"
+#include "pvr_fw_meta.h"
#include "pvr_gem.h"
#include "pvr_rogue_cr_defs.h"
#include "pvr_rogue_meta.h"
diff --git a/drivers/gpu/drm/imagination/pvr_vm.c b/drivers/gpu/drm/imagination/pvr_vm.c
index 2aab53594a77..30ecd7d7052e 100644
--- a/drivers/gpu/drm/imagination/pvr_vm.c
+++ b/drivers/gpu/drm/imagination/pvr_vm.c
@@ -539,7 +539,7 @@ pvr_device_addr_and_size_are_valid(struct pvr_vm_context *vm_ctx,
(device_addr + size <= PVR_PAGE_TABLE_ADDR_SPACE_SIZE);
}
-void pvr_gpuvm_free(struct drm_gpuvm *gpuvm)
+static void pvr_gpuvm_free(struct drm_gpuvm *gpuvm)
{
kfree(to_pvr_vm_context(gpuvm));
}
--
2.39.2
Powered by blists - more mailing lists