Skip to content

Commit 6f39188

Browse files
Yi Wangrobherring
authored andcommitted
drm/panfrost: fix -Wmissing-prototypes warnings
We get these warnings when build kernel W=1: drivers/gpu/drm/panfrost/panfrost_perfcnt.c:35:6: warning: no previous prototype for ‘panfrost_perfcnt_clean_cache_done’ [-Wmissing-prototypes] drivers/gpu/drm/panfrost/panfrost_perfcnt.c:40:6: warning: no previous prototype for ‘panfrost_perfcnt_sample_done’ [-Wmissing-prototypes] drivers/gpu/drm/panfrost/panfrost_perfcnt.c:190:5: warning: no previous prototype for ‘panfrost_ioctl_perfcnt_enable’ [-Wmissing-prototypes] drivers/gpu/drm/panfrost/panfrost_perfcnt.c:218:5: warning: no previous prototype for ‘panfrost_ioctl_perfcnt_dump’ [-Wmissing-prototypes] drivers/gpu/drm/panfrost/panfrost_perfcnt.c:250:6: warning: no previous prototype for ‘panfrost_perfcnt_close’ [-Wmissing-prototypes] drivers/gpu/drm/panfrost/panfrost_perfcnt.c:264:5: warning: no previous prototype for ‘panfrost_perfcnt_init’ [-Wmissing-prototypes] drivers/gpu/drm/panfrost/panfrost_perfcnt.c:320:6: warning: no previous prototype for ‘panfrost_perfcnt_fini’ [-Wmissing-prototypes] drivers/gpu/drm/panfrost/panfrost_mmu.c:227:6: warning: no previous prototype for ‘panfrost_mmu_flush_range’ [-Wmissing-prototypes] drivers/gpu/drm/panfrost/panfrost_mmu.c:435:5: warning: no previous prototype for ‘panfrost_mmu_map_fault_addr’ [-Wmissing-prototypes] For file panfrost_mmu.c, make functions static to fix this. For file panfrost_perfcnt.c, include header file can fix this. Signed-off-by: Yi Wang <[email protected]> Reviewed-by: Steven Price <[email protected]> Cc: [email protected] [robh: fixup function parameter alignment] Signed-off-by: Rob Herring <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 29cd13c commit 6f39188

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

drivers/gpu/drm/panfrost/panfrost_mmu.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ static size_t get_pgsize(u64 addr, size_t size)
224224
return SZ_2M;
225225
}
226226

227-
void panfrost_mmu_flush_range(struct panfrost_device *pfdev,
228-
struct panfrost_mmu *mmu,
229-
u64 iova, size_t size)
227+
static void panfrost_mmu_flush_range(struct panfrost_device *pfdev,
228+
struct panfrost_mmu *mmu,
229+
u64 iova, size_t size)
230230
{
231231
if (mmu->as < 0)
232232
return;
@@ -432,7 +432,8 @@ addr_to_drm_mm_node(struct panfrost_device *pfdev, int as, u64 addr)
432432

433433
#define NUM_FAULT_PAGES (SZ_2M / PAGE_SIZE)
434434

435-
int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as, u64 addr)
435+
static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as,
436+
u64 addr)
436437
{
437438
int ret, i;
438439
struct panfrost_gem_object *bo;

drivers/gpu/drm/panfrost/panfrost_perfcnt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "panfrost_issues.h"
1717
#include "panfrost_job.h"
1818
#include "panfrost_mmu.h"
19+
#include "panfrost_perfcnt.h"
1920
#include "panfrost_regs.h"
2021

2122
#define COUNTERS_PER_BLOCK 64

0 commit comments

Comments
 (0)