lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFpiTBKEJHTF9cK20GTqEgx=4UNt52sKi0dQ7NsZNhfFOA@mail.gmail.com>
Date:	Fri, 26 Sep 2014 10:43:22 +0200
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Geert Uytterhoeven <geert+renesas@...der.be>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Simon Horman <horms@...ge.net.au>,
	Magnus Damm <magnus.damm@...il.com>,
	Tomasz Figa <tomasz.figa@...il.com>,
	Philipp Zabel <philipp.zabel@...il.com>,
	Grygorii Strashko <grygorii.strashko@...com>,
	Kevin Hilman <khilman@...aro.org>,
	Linux-sh list <linux-sh@...r.kernel.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 05/13] PM / Domains: Add helper variable np = dev->of_node

On 25 September 2014 18:28, Geert Uytterhoeven <geert+renesas@...der.be> wrote:

Why?

> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>

Normally I think this kind of cleanup patches is a bit unnecessary,
but I don't have strong opinions.

Kind regards
Uffe

> ---
> v3:
>   - No changes
> v2:
>   - New
>
>  drivers/base/power/domain.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 6e36bb09e7d9c144..0ebc6bb31c9c227f 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -2171,17 +2171,18 @@ static void genpd_dev_pm_detach(struct device *dev, bool power_off)
>   */
>  int genpd_dev_pm_attach(struct device *dev)
>  {
> +       struct device_node *np = dev->of_node;
>         struct of_phandle_args pd_args;
>         struct generic_pm_domain *pd;
>         int ret;
>
> -       if (!dev->of_node)
> +       if (!np)
>                 return -ENODEV;
>
>         if (dev->pm_domain)
>                 return -EEXIST;
>
> -       ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
> +       ret = of_parse_phandle_with_args(np, "power-domains",
>                                         "#power-domain-cells", 0, &pd_args);
>         if (ret < 0) {
>                 if (ret != -ENOENT)
> @@ -2192,8 +2193,7 @@ int genpd_dev_pm_attach(struct device *dev)
>                  * (for backwards compatibility of DT ABI)
>                  */
>                 pd_args.args_count = 0;
> -               pd_args.np = of_parse_phandle(dev->of_node,
> -                                               "samsung,power-domain", 0);
> +               pd_args.np = of_parse_phandle(np, "samsung,power-domain", 0);
>                 if (!pd_args.np)
>                         return -ENOENT;
>         }
> @@ -2202,7 +2202,7 @@ int genpd_dev_pm_attach(struct device *dev)
>         if (IS_ERR(pd)) {
>                 dev_dbg(dev, "%s() failed to find PM domain: %ld\n",
>                         __func__, PTR_ERR(pd));
> -               of_node_put(dev->of_node);
> +               of_node_put(np);
>                 return PTR_ERR(pd);
>         }
>
> @@ -2218,7 +2218,7 @@ int genpd_dev_pm_attach(struct device *dev)
>         if (ret < 0) {
>                 dev_err(dev, "failed to add to PM domain %s: %d",
>                         pd->name, ret);
> -               of_node_put(dev->of_node);
> +               of_node_put(np);
>                 return ret;
>         }
>
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ