Re: [PATCH v1 6/8] software node: Simplify swnode_register() a bit

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

 



On Sun, Mar 28, 2021 at 11:48 AM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Sun, Mar 28, 2021 at 12:20:10AM +0200, Andy Shevchenko wrote:
> > By introducing two temporary variables simplify swnode_register() a bit.
> > No functional change intended.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/base/swnode.c | 11 +++++------
> >  1 file changed, 5 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
> > index ae53c48f84b1..1e81aaf5f6a1 100644
> > --- a/drivers/base/swnode.c
> > +++ b/drivers/base/swnode.c
> > @@ -894,6 +894,8 @@ static struct fwnode_handle *
> >  swnode_register(const struct software_node *node, struct swnode *parent,
> >               unsigned int allocated)
> >  {
> > +     struct ida *ids = parent ? &parent->child_ids : &swnode_root_ids;
> > +     struct kobject *kobj_parent = parent ? &parent->kobj : NULL;
>
> ?: operations are horrid.  Please spell this out in real if statements
> so that we can properly understand and maintain them for the next 20+
> years.

Will do, thanks!

--
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux