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] [day] [month] [year] [list]
Message-ID: <CAHp75Vc_GgfxFpxNZVJZSG+2nqyVnNz7vu8UeYabXc0Hjg-4vw@mail.gmail.com>
Date:   Tue, 16 May 2023 21:25:56 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Andrew Davis <afd@...com>
Cc:     Peter Tyser <ptyser@...-inc.com>,
        Andy Shevchenko <andy@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] gpio: pisosr: Use devm_gpiochip_add_data() to simplify
 remove path

On Tue, May 16, 2023 at 6:24 PM Andrew Davis <afd@...com> wrote:
> On 5/15/23 1:34 PM, andy.shevchenko@...il.com wrote:

...

> >> +static void pisosr_mutex_destroy(void *data)
> >> +{
> >> +    struct mutex *lock = data;
> >> +
> >> +    mutex_destroy(lock);
> >> +}
> >
> > No need to cast void * explicitly.
> >
>
> No need sure, but I really think it looks cleaner to be
> explicit with the types here.

The parameter is void * and since it's a simplest wrapper on another
function there is no value to have a clear type. It brings nothing in
my opinion.

> If you feel strongly I
> can change it though.

I would go with less LoCs.

> > static void pisosr_mutex_destroy(void *lock)
> > {
> >       mutex_destroy(lock);
> > }

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ