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: <20190312112104.GA31026@ulmo>
Date:   Tue, 12 Mar 2019 12:21:04 +0100
From:   Thierry Reding <thierry.reding@...il.com>
To:     "Enrico Weigelt, metux IT consult" <info@...ux.net>
Cc:     linux-kernel@...r.kernel.org, linus.walleij@...aro.org,
        bgolaszewski@...libre.com, andrew@...id.au, f.fainelli@...il.com,
        sbranden@...adcom.com, bcm-kernel-feedback-list@...adcom.com,
        hoan@...amperecomputing.com, orsonzhai@...il.com,
        baolin.wang@...aro.org, zhang.lyra@...il.com,
        keguang.zhang@...il.com, vz@...ia.com, matthias.bgg@...il.com,
        grygorii.strashko@...com, ssantosh@...nel.org, khilman@...nel.org,
        robert.jarzmik@...e.fr, yamada.masahiro@...ionext.com,
        jun.nie@...aro.org, shawnguo@...nel.org,
        linux-gpio@...r.kernel.org, linux-mips@...r.kernel.org,
        linux-pwm@...r.kernel.org, linux-omap@...r.kernel.org,
        linux-tegra@...r.kernel.org
Subject: Re: [PATCH 03/42] drivers: gpio: amdpt: drop unneeded deref of
 &pdev->dev

On Mon, Mar 11, 2019 at 07:54:42PM +0100, Enrico Weigelt, metux IT consult wrote:
> We already have the struct device* pointer in a local variable,
> so we can write this a bit shorter.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@...ux.net>
> ---
>  drivers/gpio/gpio-amdpt.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-amdpt.c b/drivers/gpio/gpio-amdpt.c
> index 1ffd7c2..3220f3c 100644
> --- a/drivers/gpio/gpio-amdpt.c
> +++ b/drivers/gpio/gpio-amdpt.c
> @@ -91,7 +91,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
>  
>  	pt_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(pt_gpio->reg_base)) {
> -		dev_err(&pdev->dev, "Failed to map MMIO resource for PT GPIO.\n");
> +		dev_err(dev, "Failed to map MMIO resource for PT GPIO.\n");
>  		return PTR_ERR(pt_gpio->reg_base);
>  	}
>  
> @@ -101,7 +101,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
>  			 pt_gpio->reg_base + PT_DIRECTION_REG, NULL,
>  			 BGPIOF_READ_OUTPUT_REG_SET);
>  	if (ret) {
> -		dev_err(&pdev->dev, "bgpio_init failed\n");
> +		dev_err(dev, "bgpio_init failed\n");
>  		return ret;
>  	}
>  
> @@ -110,11 +110,11 @@ static int pt_gpio_probe(struct platform_device *pdev)
>  	pt_gpio->gc.free             = pt_gpio_free;
>  	pt_gpio->gc.ngpio            = PT_TOTAL_GPIO;
>  #if defined(CONFIG_OF_GPIO)
> -	pt_gpio->gc.of_node          = pdev->dev.of_node;
> +	pt_gpio->gc.of_node          = dev.of_node;

"dev->of_node"?

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ