[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87blbrxsnw.wl-maz@kernel.org>
Date: Wed, 10 Mar 2021 09:30:11 +0000
From: Marc Zyngier <maz@...nel.org>
To: zhangqing <zhangqing@...ngson.cn>
Cc: Huacai Chen <chenhuacai@...nel.org>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Thomas Gleixner <tglx@...utronix.de>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
wangming01@...ngson.cn
Subject: Re: [PATCH v3 5/7] irqchip/loongson-liointc: irqchip add 2.0 version
On Wed, 10 Mar 2021 02:26:24 +0000,
zhangqing <zhangqing@...ngson.cn> wrote:
>
>
> On 03/09/2021 05:10 PM, Marc Zyngier wrote:
> >
> >> +
> >> +static void __iomem *liointc_get_reg_byname(struct device_node *node,
> >> + const char *name)
> >> +{
> >> + int index = of_property_match_string(node, "reg-names", name);
> >> +
> >> + return of_iomap(node, index);
> > So if of_property_match_string() returns an error, you feed that error
> > to of_iomap()? Somehow, I don't think that's a good idea.
>
> Hi, Marc
>
> Thank you for your suggestion, error handling is missing here,
>
> + if (index <0)
> + return NULL;
>
> return of_iomap(node, index);
>
> It has been fixed in the fourth version, and I will send V4 soon.
>
> > + if (of_device_is_compatible(node, "loongson,liointc-2.0")) {
> > + base = liointc_get_reg_byname(node, "main");
> > + if (!base) {
> > + err = -ENODEV;
> > + goto out_free_priv;
> > + }
> > + for (i = 0; i < LIOINTC_NUM_CORES; i++) {
> > + priv->core_isr[i] =
> > + liointc_get_reg_byname(node, core_reg_names[i]);
> > Please write assignments on a single line.
>
> In addition, write assignments on a single line
>
> for (i = 0; i <LIOINTC_NUM_CORES; i++)
> priv->core_isr[i] =
> liointc_get_reg_byname(node, core_reg_names[i]);
>
> It is 92 characters, more than 80 characters...
I really don't care about whatever arbitrary limit people think there
is. Please put it on a single line.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists