Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: William Breathitt Gray <vilhelm.gray@gmail.com>
To: Navin Sankar Velliangiri <navin@linumiz.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linus.walleij@linaro.org, bgolaszewski@baylibre.com
Subject: Re: [PATCH] gpio: 104-idio-16: Fix coding style issues
Date: Tue, 25 May 2021 23:15:54 +0900	[thread overview]
Message-ID: <YK0Gmqf4IrR9qX6a@shinobu> (raw)
In-Reply-To: <20210525045717.20652-1-navin@linumiz.com>

[-- Attachment #1: Type: text/plain, Size: 2941 bytes --]

On Tue, May 25, 2021 at 10:27:17AM +0530, Navin Sankar Velliangiri wrote:
> Fixed multiple bare uses of 'unsigned' without int.
> Reported by checkpatch.
> 
> Signed-off-by: Navin Sankar Velliangiri <navin@linumiz.com>

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>

> ---
>  drivers/gpio/gpio-104-idio-16.c | 23 +++++++++++++----------
>  1 file changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-104-idio-16.c b/drivers/gpio/gpio-104-idio-16.c
> index 50ad0280fd78..55b40299ebfa 100644
> --- a/drivers/gpio/gpio-104-idio-16.c
> +++ b/drivers/gpio/gpio-104-idio-16.c
> @@ -44,11 +44,12 @@ struct idio_16_gpio {
>  	struct gpio_chip chip;
>  	raw_spinlock_t lock;
>  	unsigned long irq_mask;
> -	unsigned base;
> -	unsigned out_state;
> +	unsigned int base;
> +	unsigned int out_state;
>  };
>  
> -static int idio_16_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
> +static int idio_16_gpio_get_direction(struct gpio_chip *chip,
> +				      unsigned int offset)
>  {
>  	if (offset > 15)
>  		return GPIO_LINE_DIRECTION_IN;
> @@ -56,22 +57,23 @@ static int idio_16_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
>  	return GPIO_LINE_DIRECTION_OUT;
>  }
>  
> -static int idio_16_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
> +static int idio_16_gpio_direction_input(struct gpio_chip *chip,
> +					unsigned int offset)
>  {
>  	return 0;
>  }
>  
>  static int idio_16_gpio_direction_output(struct gpio_chip *chip,
> -	unsigned offset, int value)
> +	unsigned int offset, int value)
>  {
>  	chip->set(chip, offset, value);
>  	return 0;
>  }
>  
> -static int idio_16_gpio_get(struct gpio_chip *chip, unsigned offset)
> +static int idio_16_gpio_get(struct gpio_chip *chip, unsigned int offset)
>  {
>  	struct idio_16_gpio *const idio16gpio = gpiochip_get_data(chip);
> -	const unsigned mask = BIT(offset-16);
> +	const unsigned int mask = BIT(offset-16);
>  
>  	if (offset < 16)
>  		return -EINVAL;
> @@ -96,10 +98,11 @@ static int idio_16_gpio_get_multiple(struct gpio_chip *chip,
>  	return 0;
>  }
>  
> -static void idio_16_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
> +static void idio_16_gpio_set(struct gpio_chip *chip, unsigned int offset,
> +			     int value)
>  {
>  	struct idio_16_gpio *const idio16gpio = gpiochip_get_data(chip);
> -	const unsigned mask = BIT(offset);
> +	const unsigned int mask = BIT(offset);
>  	unsigned long flags;
>  
>  	if (offset > 15)
> @@ -180,7 +183,7 @@ static void idio_16_irq_unmask(struct irq_data *data)
>  	}
>  }
>  
> -static int idio_16_irq_set_type(struct irq_data *data, unsigned flow_type)
> +static int idio_16_irq_set_type(struct irq_data *data, unsigned int flow_type)
>  {
>  	/* The only valid irq types are none and both-edges */
>  	if (flow_type != IRQ_TYPE_NONE &&
> -- 
> 2.31.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-05-25 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  4:57 [PATCH] gpio: 104-idio-16: Fix coding style issues Navin Sankar Velliangiri
2021-05-25 14:15 ` William Breathitt Gray [this message]
2021-06-02 13:30 ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YK0Gmqf4IrR9qX6a@shinobu \
    --to=vilhelm.gray@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=navin@linumiz.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox