Re: [PATCH v3] gpio: pisosr: Use devm_gpiochip_add_data() to simplify remove path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 16, 2023 at 6:24 PM Andrew Davis <afd@xxxxxx> wrote:
> On 5/15/23 1:34 PM, andy.shevchenko@xxxxxxxxx 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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux