[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220425223050.GA147460@bgt-140510-bm01>
Date: Mon, 25 Apr 2022 22:30:57 +0000
From: Adam Manzanares <a.manzanares@...sung.com>
To: Davidlohr Bueso <dave@...olabs.net>
CC: "linux-mm@...ck.org" <linux-mm@...ck.org>,
"mhocko@...nel.org" <mhocko@...nel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"rientjes@...gle.com" <rientjes@...gle.com>,
"yosryahmed@...gle.com" <yosryahmed@...gle.com>,
"hannes@...xchg.org" <hannes@...xchg.org>,
"shakeelb@...gle.com" <shakeelb@...gle.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
"roman.gushchin@...ux.dev" <roman.gushchin@...ux.dev>,
"gthelen@...gle.com" <gthelen@...gle.com>,
Heekwon Park <heekwon.p@...sung.com>,
Jongmin Gim <gim.jongmin@...sung.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/6] drivers/base/node: cleanup register_node()
On Fri, Apr 15, 2022 at 10:38:57PM -0700, Davidlohr Bueso wrote:
> Trivially get rid of some unnecessary indentation.
>
> Signed-off-by: Davidlohr Bueso <dave@...olabs.net>
> ---
> drivers/base/node.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/base/node.c b/drivers/base/node.c
> index ec8bb24a5a22..6cdf25fd26c3 100644
> --- a/drivers/base/node.c
> +++ b/drivers/base/node.c
> @@ -661,16 +661,16 @@ static int register_node(struct node *node, int num)
> node->dev.bus = &node_subsys;
> node->dev.release = node_device_release;
> node->dev.groups = node_dev_groups;
> - error = device_register(&node->dev);
>
> - if (error)
> + error = device_register(&node->dev);
> + if (error) {
> put_device(&node->dev);
> - else {
> - hugetlb_register_node(node);
> -
> - compaction_register_node(node);
> + return error;
> }
> - return error;
> +
> + hugetlb_register_node(node);
> + compaction_register_node(node);
> + return 0;
> }
>
> /**
> --
> 2.26.2
>
Looks good.
Reviewed by: Adam Manzanares <a.manzanares@...sung.com>
Powered by blists - more mailing lists