diff mbox series

[v5,1/3] irqchip/loongson-eiointc: Typo fix in function eiointc_domain_alloc

Message ID 20240130082722.2912576-2-maobibo@loongson.cn (mailing list archive)
State Handled Elsewhere
Headers show
Series irqchip/loongson-eiointc: Refine irq affinity setting during resume | expand

Commit Message

Bibo Mao Jan. 30, 2024, 8:27 a.m. UTC
There is small typo in function eiointc_domain_alloc(), and there is no
definition about eiointc struct, instead its name should be eiointc_priv
struct. It is strange that there is no warning with gcc compiler. This
patch fixes the small typo issue.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Huacai Chen <chenhuacai@loongson.cn>
---
 drivers/irqchip/irq-loongson-eiointc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Gleixner Feb. 13, 2024, 8:46 a.m. UTC | #1
On Tue, Jan 30 2024 at 16:27, Bibo Mao wrote:
> There is small typo in function eiointc_domain_alloc(), and there is
> no

This is not a typo. The code uses an undeclared struct type, no?

> definition about eiointc struct, instead its name should be eiointc_priv
> struct. It is strange that there is no warning with gcc compiler.

It's absolutely not strange. The compiler treats 'struct eiointc *priv'
as forward declaration and it does not complain because the assignment
is a void pointer and it's handed into irq_domain_set_info() as a void
pointer argument. C is wonderful, isn't it?

> This patch fixes the small typo issue.

# git grep 'This patch' Documentation/process/

> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> Acked-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
>  drivers/irqchip/irq-loongson-eiointc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
> index 1623cd779175..b3736bdd4b9f 100644
> --- a/drivers/irqchip/irq-loongson-eiointc.c
> +++ b/drivers/irqchip/irq-loongson-eiointc.c
> @@ -241,7 +241,7 @@ static int eiointc_domain_alloc(struct irq_domain *domain, unsigned int virq,
>  	int ret;
>  	unsigned int i, type;
>  	unsigned long hwirq = 0;
> -	struct eiointc *priv = domain->host_data;
> +	struct eiointc_priv *priv = domain->host_data;
>  
>  	ret = irq_domain_translate_onecell(domain, arg, &hwirq, &type);
>  	if (ret)
diff mbox series

Patch

diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index 1623cd779175..b3736bdd4b9f 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -241,7 +241,7 @@  static int eiointc_domain_alloc(struct irq_domain *domain, unsigned int virq,
 	int ret;
 	unsigned int i, type;
 	unsigned long hwirq = 0;
-	struct eiointc *priv = domain->host_data;
+	struct eiointc_priv *priv = domain->host_data;
 
 	ret = irq_domain_translate_onecell(domain, arg, &hwirq, &type);
 	if (ret)