From 0fe1f6b8b0f11d984f7f05bd45890421a4782a56 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 11 Dec 2023 22:26:02 +0000 Subject: [PATCH] nvidia-t264: Fix missing-prototypes The compiler option -Wmissing-prototypes is being enabled globally in the upstream Linux kernel and this causes build failures. The build failures occur because either the driver is missing an include file which has the prototype or because the function is not declared statically when it should be (ie. there are no external users). Fix the various build failures that are seen when enabling -Wmissing-prototypes. Bug 4404965 Change-Id: I0f9189250655c3b3006909e51ffe3aca7fbf763b Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3028738 Reviewed-by: Akhil R GVS: Gerrit_Virtual_Submit --- drivers/memory/tegra/private-soc/mc-t26x.c | 1 + drivers/memory/tegra/private-soc/tegra264-mc-err.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/memory/tegra/private-soc/mc-t26x.c b/drivers/memory/tegra/private-soc/mc-t26x.c index 8f221702..f6db588d 100644 --- a/drivers/memory/tegra/private-soc/mc-t26x.c +++ b/drivers/memory/tegra/private-soc/mc-t26x.c @@ -6,6 +6,7 @@ #include #include #include +#include #define MC_SECURITY_CARVEOUT_BASE 0x9404 #define MC_CARVEOUT_NEXT 0xa0 diff --git a/drivers/memory/tegra/private-soc/tegra264-mc-err.c b/drivers/memory/tegra/private-soc/tegra264-mc-err.c index 7dd7518b..a102dd1f 100644 --- a/drivers/memory/tegra/private-soc/tegra264-mc-err.c +++ b/drivers/memory/tegra/private-soc/tegra264-mc-err.c @@ -719,7 +719,7 @@ static inline void mc_ch_writel(const struct tegra_mcerr *mc_err, int ch, writel_relaxed(value, mc_err->ch_regs[ch] + offset); } -void log_fault(struct tegra_mcerr *mc_err, u32 channel, unsigned long mcf_ch_intstatus) +static void log_fault(struct tegra_mcerr *mc_err, u32 channel, unsigned long mcf_ch_intstatus) { unsigned int bit; @@ -818,7 +818,7 @@ void log_fault(struct tegra_mcerr *mc_err, u32 channel, unsigned long mcf_ch_int } /* Currently this function only handle MCF interrupts, will extend for other components */ -irqreturn_t handle_irq(int irq, void *data) +static irqreturn_t handle_irq(int irq, void *data) { struct tegra_mcerr *mc_err = data; unsigned long mcf_intstatus, mcf_ch_intstatus;