Re: [PATCH v7 15/15] gpio: Automatically add lockdep keys

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

 



On Tue, Nov 7, 2017 at 7:15 PM, Thierry Reding <thierry.reding@xxxxxxxxx> wrote:

> From: Thierry Reding <treding@xxxxxxxxxx>
>
> In order to avoid lockdep boilerplate in individual drivers, turn the
> gpiochip_add_data() function into a macro that creates a unique class
> key for each driver.
>
> Note that this has the slight disadvantage of adding a key for each
> driver registered with the system. However, these keys are 8 bytes in
> size, which is negligible and a small price to pay for generic
> infrastructure.
>
> Suggested-by: Grygorii Strashko <grygorii.strashko@xxxxxx>
> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>

> -extern int gpiochip_add_data(struct gpio_chip *chip, void *data);
> +extern int __gpiochip_add_data(struct gpio_chip *chip, void *data,
> +                              struct lock_class_key *lock_key);

As it happens I hate __functions because this syntax is so ambigous.
So I just took the liberty to rename this
gpiochip_add_data_with_key() when applying.

Apart from that it is fine :)

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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