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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Mar 2019 14:45:01 +0100
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     "Enrico Weigelt, metux IT consult" <info@...ux.net>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH] drivers: gpio: octeon: use devm_platform_ioremap_resource()

pon., 11 mar 2019 o 20:48 Enrico Weigelt, metux IT consult
<info@...ux.net> napisaƂ(a):
>
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <info@...ux.net>
> ---
>  drivers/gpio/gpio-octeon.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
> index 1b19c88..afb0e8a 100644
> --- a/drivers/gpio/gpio-octeon.c
> +++ b/drivers/gpio/gpio-octeon.c
> @@ -82,7 +82,6 @@ static int octeon_gpio_probe(struct platform_device *pdev)
>  {
>         struct octeon_gpio *gpio;
>         struct gpio_chip *chip;
> -       struct resource *res_mem;
>         void __iomem *reg_base;
>         int err = 0;
>
> @@ -91,8 +90,7 @@ static int octeon_gpio_probe(struct platform_device *pdev)
>                 return -ENOMEM;
>         chip = &gpio->chip;
>
> -       res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       reg_base = devm_ioremap_resource(&pdev->dev, res_mem);
> +       reg_base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(reg_base))
>                 return PTR_ERR(reg_base);
>
> --
> 1.9.1
>

Can you make this a part of the bigger series and resend together with
subject line fixes?

Also: maybe consider adding a coccinelle script for that. When I added
that function I noticed there are 1200+ instances in the kernel that
need fixing. I think we'll be better off automating it.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ