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] [day] [month] [year] [list]
Message-ID: <CAMuHMdU28k_eAaPoZ8Fzoxv-p=vT6jtuNmGkE79DsLc=-aeRhA@mail.gmail.com>
Date:   Mon, 9 Aug 2021 15:25:54 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Sascha Hauer <kernel@...gutronix.de>,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>
Subject: Re: [PATCH v2 4/4] zorro: Drop useless (and hardly used) .driver
 member in struct zorro_dev

Hi Uwe,

On Fri, Jul 30, 2021 at 9:10 PM Uwe Kleine-König
<u.kleine-koenig@...gutronix.de> wrote:
> The only actual use is to check in zorro_device_probe() that the device
> isn't already bound. The driver core already ensures this however so the
> check can go away which allows to drop the then assigned-only member
> from struct zorro_dev.
>
> If the value was indeed needed somewhere it can always be calculated by
>
>         to_zorro_driver(z->dev.driver)
>
> .
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>

Thanks for your patch!

> --- a/drivers/zorro/zorro-driver.c
> +++ b/drivers/zorro/zorro-driver.c
> @@ -47,16 +47,14 @@ static int zorro_device_probe(struct device *dev)
>         struct zorro_driver *drv = to_zorro_driver(dev->driver);
>         struct zorro_dev *z = to_zorro_dev(dev);
>
> -       if (!z->driver && drv->probe) {
> +       if (drv->probe) {
>                 const struct zorro_device_id *id;
>
>                 id = zorro_match_device(drv->id_table, z);
>                 if (id)
>                         error = drv->probe(z, id);
> -               if (error >= 0) {
> -                       z->driver = drv;
> +               if (error >= 0)

I guess this test can become "> 0" now, but that doesn't matter much.

Acked-by: Geert Uytterhoeven <geert@...ux-m68k.org>

>                         error = 0;
> -               }
>         }
>         return error;
>  }

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ