lkml.org 
[lkml]   [2021]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 5/7] irqchip/loongson-liointc: irqchip add 2.0 version
On Wed, 10 Mar 2021 02:26:24 +0000,
zhangqing <zhangqing@loongson.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.

\
 
 \ /
  Last update: 2021-03-10 10:32    [W:0.082 / U:1.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site