[<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