From: Arnd Bergmann <[email protected]>
The declaration for this function is not included, which leads to a harmless warning:
drivers/irqchip/irq-xtensa-pic.c:91:12: error: no previous prototype for 'xtensa_pic_init_legacy' [-Werror=missing-prototypes]
Signed-off-by: Arnd Bergmann <[email protected]>
---
drivers/irqchip/irq-xtensa-pic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/irqchip/irq-xtensa-pic.c b/drivers/irqchip/irq-xtensa-pic.c
index ab12328be5eed..0c18d1f1e264f 100644
--- a/drivers/irqchip/irq-xtensa-pic.c
+++ b/drivers/irqchip/irq-xtensa-pic.c
@@ -16,6 +16,7 @@
#include <linux/irqdomain.h>
#include <linux/irq.h>
#include <linux/irqchip.h>
+#include <linux/irqchip/xtensa-pic.h>
#include <linux/of.h>
unsigned int cached_irq_mask;
--
2.39.2
From: Arnd Bergmann <[email protected]>
i8259_of_init() is only used as an initcall and does not need to be global,
so mark it static to avoid:
drivers/irqchip/irq-i8259.c:343:12: warning: no previous prototype for 'i8259_of_init' [-Wmissing-prototypes]
Signed-off-by: Arnd Bergmann <[email protected]>
---
drivers/irqchip/irq-i8259.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-i8259.c b/drivers/irqchip/irq-i8259.c
index b70ce0d3c092e..115bdcffab248 100644
--- a/drivers/irqchip/irq-i8259.c
+++ b/drivers/irqchip/irq-i8259.c
@@ -340,7 +340,7 @@ static void i8259_irq_dispatch(struct irq_desc *desc)
generic_handle_domain_irq(domain, hwirq);
}
-int __init i8259_of_init(struct device_node *node, struct device_node *parent)
+static int __init i8259_of_init(struct device_node *node, struct device_node *parent)
{
struct irq_domain *domain;
unsigned int parent_irq;
--
2.39.2
From: Arnd Bergmann <[email protected]>
This function is only used locally and should be static to avoid a warning:
drivers/irqchip/irq-mips-gic.c:560:6: error: no previous prototype for 'gic_irq_domain_free' [-Werror=missing-prototypes]
Signed-off-by: Arnd Bergmann <[email protected]>
---
drivers/irqchip/irq-mips-gic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 6d5ecc10a8703..76253e864f230 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -557,7 +557,7 @@ static int gic_irq_domain_alloc(struct irq_domain *d, unsigned int virq,
return gic_irq_domain_map(d, virq, hwirq);
}
-void gic_irq_domain_free(struct irq_domain *d, unsigned int virq,
+static void gic_irq_domain_free(struct irq_domain *d, unsigned int virq,
unsigned int nr_irqs)
{
}
--
2.39.2
On Thu, Aug 10, 2023 at 5:34 AM Arnd Bergmann <[email protected]> wrote:
>
> From: Arnd Bergmann <[email protected]>
>
> The declaration for this function is not included, which leads to a harmless warning:
>
> drivers/irqchip/irq-xtensa-pic.c:91:12: error: no previous prototype for 'xtensa_pic_init_legacy' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> drivers/irqchip/irq-xtensa-pic.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Max Filippov <[email protected]>
--
Thanks.
-- Max
On 10/8/23 14:33, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> This function is only used locally and should be static to avoid a warning:
>
> drivers/irqchip/irq-mips-gic.c:560:6: error: no previous prototype for 'gic_irq_domain_free' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> drivers/irqchip/irq-mips-gic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
On Thu, Aug 10, 2023 at 02:33:55PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> This function is only used locally and should be static to avoid a warning:
>
> drivers/irqchip/irq-mips-gic.c:560:6: error: no previous prototype for 'gic_irq_domain_free' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> drivers/irqchip/irq-mips-gic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
> index 6d5ecc10a8703..76253e864f230 100644
> --- a/drivers/irqchip/irq-mips-gic.c
> +++ b/drivers/irqchip/irq-mips-gic.c
> @@ -557,7 +557,7 @@ static int gic_irq_domain_alloc(struct irq_domain *d, unsigned int virq,
> return gic_irq_domain_map(d, virq, hwirq);
> }
>
> -void gic_irq_domain_free(struct irq_domain *d, unsigned int virq,
> +static void gic_irq_domain_free(struct irq_domain *d, unsigned int virq,
> unsigned int nr_irqs)
Right. Thanks! Note the descendant line should be aligned to the
function open parenthesis to preserve the coding style well
utilized in the driver. With that fixed feel free to add:
Reviewed-by: Serge Semin <[email protected]>
-Serge(y)
> {
> }
> --
> 2.39.2
>