On Wed, Apr 10, 2019 at 06:39:16PM +0300, Andy Shevchenko wrote: > The library uses enum gpio_lookup_flags to define the possible > characteristics of GPIO pin. Since enumerator listed only individual > bits the common use of it is in a form of a bitmask of > gpio_lookup_flags GPIO_* values. The more correct type for this is > unsigned long. > > Due to above convert all users to use unsigned long instead of > enum gpio_lookup_flags except enumerator definition. > > While here, make field and parameter descriptions consistent as well. > > Suggested-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> One small comment: > --- > drivers/gpio/gpiolib-acpi.c | 14 +++++++++----- > drivers/gpio/gpiolib-of.c | 11 +++++------ > drivers/gpio/gpiolib.c | 13 ++++++------- > drivers/gpio/gpiolib.h | 9 ++++----- > include/linux/gpio/machine.h | 8 ++++---- > 5 files changed, 28 insertions(+), 27 deletions(-) > > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c > index 30d0baf7ddae..ba9cafa13ca2 100644 > --- a/drivers/gpio/gpiolib-acpi.c > +++ b/drivers/gpio/gpiolib-acpi.c > @@ -696,7 +696,7 @@ struct gpio_desc *acpi_find_gpio(struct device *dev, > const char *con_id, > unsigned int idx, > enum gpiod_flags *dflags, > - enum gpio_lookup_flags *lookupflags) > + unsigned long *lookupflags) > { > struct acpi_device *adev = ACPI_COMPANION(dev); > struct acpi_gpio_info info; > @@ -992,9 +992,12 @@ static void acpi_gpiochip_free_regions(struct acpi_gpio_chip *achip) > } > } > > -static struct gpio_desc *acpi_gpiochip_parse_own_gpio( > - struct acpi_gpio_chip *achip, struct fwnode_handle *fwnode, > - const char **name, unsigned int *lflags, unsigned int *dflags) > +static struct gpio_desc * > +acpi_gpiochip_parse_own_gpio(struct acpi_gpio_chip *achip, > + struct fwnode_handle *fwnode, > + const char **name, > + unsigned long *lflags, > + unsigned int *dflags) Why not "unsigned int"? Now it looks inconsistent.