Re: [PATCH v5 4/5] irqchip/loongson-liointc: Fix 'loongson,parent_int_map' parse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 20 2023 at 17:06, Binbin Zhou wrote:

$Subject: s/parse/parsing/

> In keeping with naming standards, 'loongson,parent_int_map' is renamed
> to 'loongson,parent-int-map'. But for the driver, we need to make sure
> that both forms can be parsed.

Please keep changelogs in neutral or imperative tone:

  For backwards compatibility it is required to parse the original
  string too.

Makes it entirely clear what this is about without 'we'. See also:

  https://www.kernel.org/doc/html/latest/process/submitting-patches.rst 

> Signed-off-by: Binbin Zhou <zhoubinbin@xxxxxxxxxxx>
> Acked-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
> Reviewed-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
> ---
>  drivers/irqchip/irq-loongson-liointc.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
> index e4b33aed1c97..add2e0a955b8 100644
> --- a/drivers/irqchip/irq-loongson-liointc.c
> +++ b/drivers/irqchip/irq-loongson-liointc.c
> @@ -330,6 +330,7 @@ static int __init liointc_of_init(struct device_node *node,
>  	bool have_parent = FALSE;
>  	int sz, i, index, revision, err = 0;
>  	struct resource res;
> +	const char *prop_name = "loongson,parent-int-map";

Please don't glue variables randomly into the declaration section:

  https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#variable-declarations

>  	if (!of_device_is_compatible(node, "loongson,liointc-2.0")) {
>  		index = 0;
> @@ -350,8 +351,12 @@ static int __init liointc_of_init(struct device_node *node,
>  	if (!have_parent)
>  		return -ENODEV;
>  
> +	if (!of_find_property(node, prop_name, &i))
> +		/* Fallback to 'loongson,parent_int_map'. */
> +		prop_name = "loongson,parent_int_map";

This lacks curly brackets:

  https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#bracket-rules

>  	sz = of_property_read_variable_u32_array(node,
> -						"loongson,parent_int_map",
> +						prop_name,
>  						&parent_int_map[0],
>  						LIOINTC_NUM_PARENT,
>  						LIOINTC_NUM_PARENT);

Thanks,

        tglx




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux