lkml.org 
[lkml]   [2023]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v7 01/15] RISC-V: Add riscv_get_intc_hartid() function
On Wed, Aug 2, 2023 at 10:51 PM Conor Dooley <conor@kernel.org> wrote:
>
> On Wed, Aug 02, 2023 at 08:30:04PM +0530, Anup Patel wrote:
>
> > +/* Find hart ID of the INTC fwnode. */
> > +int riscv_get_intc_hartid(struct fwnode_handle *node, unsigned long *hartid)
> > +{
> > + int rc;
> > + u64 temp;
> > +
> > + if (!is_of_node(node)) {
> > + rc = fwnode_property_read_u64_array(node, "hartid", &temp, 1);
> > + if (!rc)
> > + *hartid = temp;
> > + } else
> > + rc = riscv_of_parent_hartid(to_of_node(node), hartid);
>
> This branch needs to be enclosed in braces too.

Okay, I will update in the next revision.

>
> > +
> > + return rc;
> > +}
> > +
> > DEFINE_PER_CPU(struct riscv_cpuinfo, riscv_cpuinfo);
>

Regards,
Anup

\
 
 \ /
  Last update: 2023-08-03 06:36    [W:0.057 / U:1.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site