lantiq: misc build warning fixes for upstream codes
This patchset fixes a lot of compilation warnings. In the upcoming 6.12 kernel, these warnings will be treated as errors. Link: https://lore.kernel.org/all/OSBPR01MB1670163BDCA60924B3671D45BC72A@OSBPR01MB1670.jpnprd01.prod.outlook.com/ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
This commit is contained in:
parent
7fe6921fe6
commit
69b38ed670
17 changed files with 571 additions and 2 deletions
|
@ -0,0 +1,27 @@
|
|||
From 3004522ddba0a23941222d2044badd4436ce776f Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Thu, 8 May 2025 18:08:35 +0800
|
||||
Subject: [PATCH 01/16] MIPS: lantiq: xway: mark ltq_ar9_sys_hz() as static
|
||||
|
||||
Fix the following missing-prototypes warning:
|
||||
|
||||
arch/mips/lantiq/xway/clk.c:77:15: error: no previous prototype for 'ltq_ar9_sys_hz' [-Werror=missing-prototypes]
|
||||
77 | unsigned long ltq_ar9_sys_hz(void)
|
||||
| ^~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/lantiq/xway/clk.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/mips/lantiq/xway/clk.c
|
||||
+++ b/arch/mips/lantiq/xway/clk.c
|
||||
@@ -74,7 +74,7 @@ unsigned long ltq_danube_pp32_hz(void)
|
||||
return clk;
|
||||
}
|
||||
|
||||
-unsigned long ltq_ar9_sys_hz(void)
|
||||
+static unsigned long ltq_ar9_sys_hz(void)
|
||||
{
|
||||
if (((ltq_cgu_r32(CGU_SYS) >> 3) & 0x3) == 0x2)
|
||||
return CLOCK_393M;
|
|
@ -0,0 +1,27 @@
|
|||
From ada0c7fd1b2e6daaf64bf8649cc58afaceed1a3d Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Thu, 8 May 2025 18:11:41 +0800
|
||||
Subject: [PATCH 02/16] MIPS: lantiq: xway: mark dma_init() as static
|
||||
|
||||
Fix the following missing-prototypes build warning:
|
||||
|
||||
arch/mips/lantiq/xway/dma.c:293:1: error: no previous prototype for 'dma_init' [-Werror=missing-prototypes]
|
||||
293 | dma_init(void)
|
||||
| ^~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/lantiq/xway/dma.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/mips/lantiq/xway/dma.c
|
||||
+++ b/arch/mips/lantiq/xway/dma.c
|
||||
@@ -289,7 +289,7 @@ static struct platform_driver dma_driver
|
||||
},
|
||||
};
|
||||
|
||||
-int __init
|
||||
+static int __init
|
||||
dma_init(void)
|
||||
{
|
||||
return platform_driver_register(&dma_driver);
|
|
@ -0,0 +1,27 @@
|
|||
From d27f9ab0f53886152b717e44eeca0217519ad323 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Thu, 8 May 2025 18:18:26 +0800
|
||||
Subject: [PATCH 03/16] MIPS: lantiq: xway: mark dcdc_init() as static
|
||||
|
||||
Fix the following missing-prototypes build warning:
|
||||
|
||||
arch/mips/lantiq/xway/dcdc.c:49:12: error: no previous prototype for 'dcdc_init' [-Werror=missing-prototypes]
|
||||
49 | int __init dcdc_init(void)
|
||||
| ^~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/lantiq/xway/dcdc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/mips/lantiq/xway/dcdc.c
|
||||
+++ b/arch/mips/lantiq/xway/dcdc.c
|
||||
@@ -46,7 +46,7 @@ static struct platform_driver dcdc_drive
|
||||
},
|
||||
};
|
||||
|
||||
-int __init dcdc_init(void)
|
||||
+static int __init dcdc_init(void)
|
||||
{
|
||||
int ret = platform_driver_register(&dcdc_driver);
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
From 9729233d2ef318cdb6954c8b5cb032d7d0f03473 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Thu, 8 May 2025 19:53:12 +0800
|
||||
Subject: [PATCH 04/16] MIPS: lantiq: irq: fix misc missing-prototypes warnings
|
||||
|
||||
Fix the following build warnings:
|
||||
|
||||
arch/mips/lantiq/irq.c:340:12: error: no previous prototype for 'icu_of_init' [-Werror=missing-prototypes]
|
||||
340 | int __init icu_of_init(struct device_node *node, struct device_node *parent)
|
||||
| ^~~~~~~~~~~
|
||||
arch/mips/lantiq/irq.c:418:5: error: no previous prototype for 'get_c0_perfcount_int' [-Werror=missing-prototypes]
|
||||
418 | int get_c0_perfcount_int(void)
|
||||
| ^~~~~~~~~~~~~~~~~~~~
|
||||
arch/mips/lantiq/irq.c:424:14: error: no previous prototype for 'get_c0_compare_int' [-Werror=missing-prototypes]
|
||||
424 | unsigned int get_c0_compare_int(void)
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/lantiq/irq.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/mips/lantiq/irq.c
|
||||
+++ b/arch/mips/lantiq/irq.c
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/irq_cpu.h>
|
||||
+#include <asm/time.h>
|
||||
|
||||
#include <lantiq_soc.h>
|
||||
#include <irq.h>
|
||||
@@ -337,7 +338,8 @@ static const struct irq_domain_ops irq_d
|
||||
.map = icu_map,
|
||||
};
|
||||
|
||||
-int __init icu_of_init(struct device_node *node, struct device_node *parent)
|
||||
+static int __init
|
||||
+icu_of_init(struct device_node *node, struct device_node *parent)
|
||||
{
|
||||
struct device_node *eiu_node;
|
||||
struct resource res;
|
|
@ -0,0 +1,29 @@
|
|||
From 5759385fb2b1fafcb0073add3cf4dc7a918ac7f2 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Thu, 8 May 2025 20:19:15 +0800
|
||||
Subject: [PATCH 05/16] MIPS: lantiq: xway: add prototype for
|
||||
ltq_get_cp1_base()
|
||||
|
||||
ltq_get_cp1_base() is an exported function, we must define
|
||||
its prototype on header file. Fix warning:
|
||||
|
||||
arch/mips/lantiq/xway/vmmc.c:22:15: error: no previous prototype for 'ltq_get_cp1_base' [-Werror=missing-prototypes]
|
||||
22 | unsigned int *ltq_get_cp1_base(void)
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
|
||||
+++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
|
||||
@@ -102,5 +102,8 @@ extern void ltq_pmu_disable(unsigned int
|
||||
/* allow the ethernet driver to load a flash mapped mac addr */
|
||||
const u8* ltq_get_eth_mac(void);
|
||||
|
||||
+/* VMMC */
|
||||
+extern unsigned int *ltq_get_cp1_base(void);
|
||||
+
|
||||
#endif /* CONFIG_SOC_TYPE_XWAY */
|
||||
#endif /* _LTQ_XWAY_H__ */
|
|
@ -0,0 +1,27 @@
|
|||
From 156977363d9ed39d80062044704932d8c11d1611 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Thu, 8 May 2025 20:31:33 +0800
|
||||
Subject: [PATCH 06/16] MIPS: pci: lantiq: marks pcibios_init() as static
|
||||
|
||||
Fix the following missing-prototypes build warning:
|
||||
|
||||
arch/mips/pci/pci-lantiq.c:239:12: error: no previous prototype for 'pcibios_init' [-Werror=missing-prototypes]
|
||||
239 | int __init pcibios_init(void)
|
||||
| ^~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/pci/pci-lantiq.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/mips/pci/pci-lantiq.c
|
||||
+++ b/arch/mips/pci/pci-lantiq.c
|
||||
@@ -234,7 +234,7 @@ static struct platform_driver ltq_pci_dr
|
||||
},
|
||||
};
|
||||
|
||||
-int __init pcibios_init(void)
|
||||
+static int __init pcibios_init(void)
|
||||
{
|
||||
int ret = platform_driver_register(<q_pci_driver);
|
||||
if (ret)
|
|
@ -0,0 +1,39 @@
|
|||
From 6900665e987f7c76dff709d63be4df4171c02ab2 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 20:15:36 +0800
|
||||
Subject: [PATCH 07/16] MIPS: lantiq: falcon: fix misc missing-prototypes
|
||||
warnings
|
||||
|
||||
Fix the following build warnings:
|
||||
|
||||
arch/mips/lantiq/falcon/prom.c:39:13: error: no previous prototype for 'ltq_soc_nmi_setup' [-Werror=missing-prototypes]
|
||||
39 | void __init ltq_soc_nmi_setup(void)
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
arch/mips/lantiq/falcon/prom.c:46:13: error: no previous prototype for 'ltq_soc_ejtag_setup' [-Werror=missing-prototypes]
|
||||
46 | void __init ltq_soc_ejtag_setup(void)
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/lantiq/falcon/prom.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/mips/lantiq/falcon/prom.c
|
||||
+++ b/arch/mips/lantiq/falcon/prom.c
|
||||
@@ -36,14 +36,14 @@
|
||||
#define BOOT_NVEC (BOOT_REG_BASE | 0x04)
|
||||
#define BOOT_EVEC (BOOT_REG_BASE | 0x08)
|
||||
|
||||
-void __init ltq_soc_nmi_setup(void)
|
||||
+static void __init ltq_soc_nmi_setup(void)
|
||||
{
|
||||
extern void (*nmi_handler)(void);
|
||||
|
||||
ltq_w32((unsigned long)&nmi_handler, (void *)BOOT_NVEC);
|
||||
}
|
||||
|
||||
-void __init ltq_soc_ejtag_setup(void)
|
||||
+static void __init ltq_soc_ejtag_setup(void)
|
||||
{
|
||||
extern void (*ejtag_debug_handler)(void);
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From b145074ce653a895201bf8a2ba70719a107ad580 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 20:15:36 +0800
|
||||
Subject: [PATCH 08/16] MIPS: lantiq: falcon: sysctrl: remove unused
|
||||
falcon_trigger_hrst()
|
||||
|
||||
This is a defined but unused function. Fix warning:
|
||||
|
||||
arch/mips/lantiq/falcon/sysctrl.c:75:6: error: no previous prototype for 'falcon_trigger_hrst' [-Werror=missing-prototypes]
|
||||
75 | void falcon_trigger_hrst(int level)
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/lantiq/falcon/sysctrl.c | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
--- a/arch/mips/lantiq/falcon/sysctrl.c
|
||||
+++ b/arch/mips/lantiq/falcon/sysctrl.c
|
||||
@@ -72,11 +72,6 @@
|
||||
static void __iomem *sysctl_membase[3], *status_membase;
|
||||
void __iomem *ltq_sys1_membase, *ltq_ebu_membase;
|
||||
|
||||
-void falcon_trigger_hrst(int level)
|
||||
-{
|
||||
- sysctl_w32(SYSCTL_SYS1, level & 1, SYS1_HRSTOUTC);
|
||||
-}
|
||||
-
|
||||
static inline void sysctl_wait(struct clk *clk,
|
||||
unsigned int test, unsigned int reg)
|
||||
{
|
|
@ -0,0 +1,27 @@
|
|||
From cc7803436c2419009aaf702d96fc1d717ca52279 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 20:15:36 +0800
|
||||
Subject: [PATCH 09/16] MIPS: lantiq: falcon: sysctrl: add missing header
|
||||
prom.h
|
||||
|
||||
"prom.h" includes the prototype of ltq_soc_init(). Fix warning:
|
||||
|
||||
arch/mips/lantiq/falcon/sysctrl.c:185:13: error: no previous prototype for 'ltq_soc_init' [-Werror=missing-prototypes]
|
||||
185 | void __init ltq_soc_init(void)
|
||||
| ^~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/lantiq/falcon/sysctrl.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/mips/lantiq/falcon/sysctrl.c
|
||||
+++ b/arch/mips/lantiq/falcon/sysctrl.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <lantiq_soc.h>
|
||||
|
||||
#include "../clk.h"
|
||||
+#include "../prom.h"
|
||||
|
||||
/* infrastructure control register */
|
||||
#define SYS1_INFRAC 0x00bc
|
|
@ -0,0 +1,64 @@
|
|||
From ccdf5d58c4f3330a83393641d4e4334994fc91af Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 20:53:58 +0800
|
||||
Subject: [PATCH 10/16] MIPS: lantiq: falcon: sysctrl: fix request memory check
|
||||
logic
|
||||
|
||||
request_mem_region() will return NULL instead of error code
|
||||
when the memory request fails. Therefore, we should check if
|
||||
the return value is non-zero instead of less than zero. In
|
||||
this way, this patch also fixes the build warnings:
|
||||
|
||||
arch/mips/lantiq/falcon/sysctrl.c:214:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
|
||||
214 | res_status.name) < 0) ||
|
||||
| ^
|
||||
arch/mips/lantiq/falcon/sysctrl.c:216:47: error: ordered comparison of pointer with integer zero [-Werror=extra]
|
||||
216 | res_ebu.name) < 0) ||
|
||||
| ^
|
||||
arch/mips/lantiq/falcon/sysctrl.c:219:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
|
||||
219 | res_sys[0].name) < 0) ||
|
||||
| ^
|
||||
arch/mips/lantiq/falcon/sysctrl.c:222:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
|
||||
222 | res_sys[1].name) < 0) ||
|
||||
| ^
|
||||
arch/mips/lantiq/falcon/sysctrl.c:225:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
|
||||
225 | res_sys[2].name) < 0))
|
||||
|
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/lantiq/falcon/sysctrl.c | 23 ++++++++++-------------
|
||||
1 file changed, 10 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/arch/mips/lantiq/falcon/sysctrl.c
|
||||
+++ b/arch/mips/lantiq/falcon/sysctrl.c
|
||||
@@ -210,19 +210,16 @@ void __init ltq_soc_init(void)
|
||||
of_node_put(np_syseth);
|
||||
of_node_put(np_sysgpe);
|
||||
|
||||
- if ((request_mem_region(res_status.start, resource_size(&res_status),
|
||||
- res_status.name) < 0) ||
|
||||
- (request_mem_region(res_ebu.start, resource_size(&res_ebu),
|
||||
- res_ebu.name) < 0) ||
|
||||
- (request_mem_region(res_sys[0].start,
|
||||
- resource_size(&res_sys[0]),
|
||||
- res_sys[0].name) < 0) ||
|
||||
- (request_mem_region(res_sys[1].start,
|
||||
- resource_size(&res_sys[1]),
|
||||
- res_sys[1].name) < 0) ||
|
||||
- (request_mem_region(res_sys[2].start,
|
||||
- resource_size(&res_sys[2]),
|
||||
- res_sys[2].name) < 0))
|
||||
+ if ((!request_mem_region(res_status.start, resource_size(&res_status),
|
||||
+ res_status.name)) ||
|
||||
+ (!request_mem_region(res_ebu.start, resource_size(&res_ebu),
|
||||
+ res_ebu.name)) ||
|
||||
+ (!request_mem_region(res_sys[0].start, resource_size(&res_sys[0]),
|
||||
+ res_sys[0].name)) ||
|
||||
+ (!request_mem_region(res_sys[1].start, resource_size(&res_sys[1]),
|
||||
+ res_sys[1].name)) ||
|
||||
+ (!request_mem_region(res_sys[2].start, resource_size(&res_sys[2]),
|
||||
+ res_sys[2].name)))
|
||||
pr_err("Failed to request core resources");
|
||||
|
||||
status_membase = ioremap(res_status.start,
|
|
@ -0,0 +1,27 @@
|
|||
From 2caf57c67c6c3228b7a2ff1510e7671539ad31d3 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 22:29:34 +0800
|
||||
Subject: [PATCH 11/16] MIPS: lantiq: xway: gptu: mark gptu_init() as static
|
||||
|
||||
Fix the following missing-prototypes warning:
|
||||
|
||||
arch/mips/lantiq/xway/gptu.c:197:12: error: no previous prototype for 'gptu_init' [-Werror=missing-prototypes]
|
||||
197 | int __init gptu_init(void)
|
||||
| ^~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/lantiq/xway/gptu.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/mips/lantiq/xway/gptu.c
|
||||
+++ b/arch/mips/lantiq/xway/gptu.c
|
||||
@@ -194,7 +194,7 @@ static struct platform_driver dma_driver
|
||||
},
|
||||
};
|
||||
|
||||
-int __init gptu_init(void)
|
||||
+static int __init gptu_init(void)
|
||||
{
|
||||
int ret = platform_driver_register(&dma_driver);
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
From 6faade177216b41a8112e33c6e73377e78dd1f92 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Thu, 8 May 2025 18:32:11 +0800
|
||||
Subject: [PATCH 12/16] MIPS: vpe-mt: mark vpe_free() and vpe_stop() as static
|
||||
|
||||
These functions are only used in the current source file "vpe-mt.c".
|
||||
Do not export them and mark them as static to silence the missing
|
||||
prototypes warnings:
|
||||
|
||||
arch/mips/kernel/vpe-mt.c:208:5: error: no previous prototype for 'vpe_stop' [-Werror=missing-prototypes]
|
||||
208 | int vpe_stop(void *vpe)
|
||||
| ^~~~~~~~
|
||||
arch/mips/kernel/vpe-mt.c:229:5: error: no previous prototype for 'vpe_free' [-Werror=missing-prototypes]
|
||||
229 | int vpe_free(void *vpe)
|
||||
| ^~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/kernel/vpe-mt.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/arch/mips/kernel/vpe-mt.c
|
||||
+++ b/arch/mips/kernel/vpe-mt.c
|
||||
@@ -202,7 +202,7 @@ int vpe_start(void *vpe, unsigned long s
|
||||
EXPORT_SYMBOL(vpe_start);
|
||||
|
||||
/* halt it for now */
|
||||
-int vpe_stop(void *vpe)
|
||||
+static int vpe_stop(void *vpe)
|
||||
{
|
||||
struct vpe *v = vpe;
|
||||
struct tc *t;
|
||||
@@ -220,10 +220,9 @@ int vpe_stop(void *vpe)
|
||||
|
||||
return 0;
|
||||
}
|
||||
-EXPORT_SYMBOL(vpe_stop);
|
||||
|
||||
/* I've done with it thank you */
|
||||
-int vpe_free(void *vpe)
|
||||
+static int vpe_free(void *vpe)
|
||||
{
|
||||
struct vpe *v = vpe;
|
||||
struct tc *t;
|
||||
@@ -255,7 +254,6 @@ int vpe_free(void *vpe)
|
||||
|
||||
return 0;
|
||||
}
|
||||
-EXPORT_SYMBOL(vpe_free);
|
||||
|
||||
static ssize_t store_kill(struct device *dev, struct device_attribute *attr,
|
||||
const char *buf, size_t len)
|
|
@ -0,0 +1,59 @@
|
|||
From e6fab4c05f655b834587bc06f0274f69cdc43171 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Thu, 8 May 2025 18:32:11 +0800
|
||||
Subject: [PATCH 13/16] MIPS: vpe-mt: drop unused functions vpe_alloc() and
|
||||
vpe_start()
|
||||
|
||||
These two functions are defined but unused. Removing them to silence
|
||||
the missing prototypes warnings:
|
||||
|
||||
arch/mips/kernel/vpe-mt.c:180:7: error: no previous prototype for 'vpe_alloc' [-Werror=missing-prototypes]
|
||||
180 | void *vpe_alloc(void)
|
||||
| ^~~~~~~~~
|
||||
arch/mips/kernel/vpe-mt.c:198:5: error: no previous prototype for 'vpe_start' [-Werror=missing-prototypes]
|
||||
198 | int vpe_start(void *vpe, unsigned long start)
|
||||
| ^~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
arch/mips/kernel/vpe-mt.c | 29 -----------------------------
|
||||
1 file changed, 29 deletions(-)
|
||||
|
||||
--- a/arch/mips/kernel/vpe-mt.c
|
||||
+++ b/arch/mips/kernel/vpe-mt.c
|
||||
@@ -172,35 +172,6 @@ void cleanup_tc(struct tc *tc)
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
-/* module wrapper entry points */
|
||||
-/* give me a vpe */
|
||||
-void *vpe_alloc(void)
|
||||
-{
|
||||
- int i;
|
||||
- struct vpe *v;
|
||||
-
|
||||
- /* find a vpe */
|
||||
- for (i = 1; i < MAX_VPES; i++) {
|
||||
- v = get_vpe(i);
|
||||
- if (v != NULL) {
|
||||
- v->state = VPE_STATE_INUSE;
|
||||
- return v;
|
||||
- }
|
||||
- }
|
||||
- return NULL;
|
||||
-}
|
||||
-EXPORT_SYMBOL(vpe_alloc);
|
||||
-
|
||||
-/* start running from here */
|
||||
-int vpe_start(void *vpe, unsigned long start)
|
||||
-{
|
||||
- struct vpe *v = vpe;
|
||||
-
|
||||
- v->__start = start;
|
||||
- return vpe_run(v);
|
||||
-}
|
||||
-EXPORT_SYMBOL(vpe_start);
|
||||
-
|
||||
/* halt it for now */
|
||||
static int vpe_stop(void *vpe)
|
||||
{
|
|
@ -0,0 +1,34 @@
|
|||
From 7d8878668dfe011f33b92a0f9aa3e0d46c1b77ca Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Thu, 8 May 2025 20:36:56 +0800
|
||||
Subject: [PATCH 14/16] pinctrl: xway: mark xway_pinconf_group_set() as static
|
||||
|
||||
Fix the following missing-prototypes build warning:
|
||||
|
||||
drivers/pinctrl/pinctrl-xway.c:1231:5: error: no previous prototype for 'xway_pinconf_group_set' [-Werror=missing-prototypes]
|
||||
1231 | int xway_pinconf_group_set(struct pinctrl_dev *pctldev,
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
drivers/pinctrl/pinctrl-xway.c | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/pinctrl/pinctrl-xway.c
|
||||
+++ b/drivers/pinctrl/pinctrl-xway.c
|
||||
@@ -1228,10 +1228,11 @@ static int xway_pinconf_set(struct pinct
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int xway_pinconf_group_set(struct pinctrl_dev *pctldev,
|
||||
- unsigned selector,
|
||||
- unsigned long *configs,
|
||||
- unsigned num_configs)
|
||||
+static int
|
||||
+xway_pinconf_group_set(struct pinctrl_dev *pctldev,
|
||||
+ unsigned selector,
|
||||
+ unsigned long *configs,
|
||||
+ unsigned num_configs)
|
||||
{
|
||||
struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctldev);
|
||||
int i, ret = 0;
|
|
@ -0,0 +1,27 @@
|
|||
From 9dec40b4f01a2aa92311b077ef45ecaa335d45a2 Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 20:16:49 +0800
|
||||
Subject: [PATCH 15/16] pinctrl: falcon: mark pinctrl_falcon_init() as static
|
||||
|
||||
Fix the following missing-prototypes build warning:
|
||||
|
||||
drivers/pinctrl/pinctrl-falcon.c:508:12: error: no previous prototype for 'pinctrl_falcon_init' [-Werror=missing-prototypes]
|
||||
508 | int __init pinctrl_falcon_init(void)
|
||||
| ^~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
drivers/pinctrl/pinctrl-falcon.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/pinctrl/pinctrl-falcon.c
|
||||
+++ b/drivers/pinctrl/pinctrl-falcon.c
|
||||
@@ -505,7 +505,7 @@ static struct platform_driver pinctrl_fa
|
||||
},
|
||||
};
|
||||
|
||||
-int __init pinctrl_falcon_init(void)
|
||||
+static int __init pinctrl_falcon_init(void)
|
||||
{
|
||||
return platform_driver_register(&pinctrl_falcon_driver);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
From 28b20e002412bcadd4de74235faff275efb9e2cd Mon Sep 17 00:00:00 2001
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 20:21:02 +0800
|
||||
Subject: [PATCH 16/16] spi: falcon: mark falcon_sflash_xfer() as static
|
||||
|
||||
Fix the following missing-prototypes build warning:
|
||||
|
||||
drivers/spi/spi-falcon.c:97:5: error: no previous prototype for 'falcon_sflash_xfer' [-Werror=missing-prototypes]
|
||||
97 | int falcon_sflash_xfer(struct spi_device *spi, struct spi_transfer *t,
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
drivers/spi/spi-falcon.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/spi/spi-falcon.c
|
||||
+++ b/drivers/spi/spi-falcon.c
|
||||
@@ -94,8 +94,9 @@ struct falcon_sflash {
|
||||
struct spi_controller *host;
|
||||
};
|
||||
|
||||
-int falcon_sflash_xfer(struct spi_device *spi, struct spi_transfer *t,
|
||||
- unsigned long flags)
|
||||
+static int
|
||||
+falcon_sflash_xfer(struct spi_device *spi, struct spi_transfer *t,
|
||||
+ unsigned long flags)
|
||||
{
|
||||
struct device *dev = &spi->dev;
|
||||
struct falcon_sflash *priv = spi_controller_get_devdata(spi->controller);
|
|
@ -67,7 +67,7 @@ Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
|
|||
#endif /* _ASM_VPE_H */
|
||||
--- a/arch/mips/kernel/vpe-mt.c
|
||||
+++ b/arch/mips/kernel/vpe-mt.c
|
||||
@@ -414,6 +414,8 @@ int __init vpe_module_init(void)
|
||||
@@ -383,6 +383,8 @@ int __init vpe_module_init(void)
|
||||
}
|
||||
|
||||
v->ntcs = hw_tcs - aprp_cpu_index();
|
||||
|
@ -76,7 +76,7 @@ Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
|
|||
|
||||
/* add the tc to the list of this vpe's tc's. */
|
||||
list_add(&t->tc, &v->tc);
|
||||
@@ -517,3 +519,47 @@ void __exit vpe_module_exit(void)
|
||||
@@ -486,3 +488,47 @@ void __exit vpe_module_exit(void)
|
||||
release_vpe(v);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue