linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpio: gpio-pch.c: changed every 'unsigned' to 'unsigned int'
@ 2020-07-21 14:50 Abanoub Sameh
  2020-07-21 14:50 ` [PATCH 2/2] gpio: gpio-pch.c: fixed coding style issue Abanoub Sameh
  0 siblings, 1 reply; 3+ messages in thread
From: Abanoub Sameh @ 2020-07-21 14:50 UTC (permalink / raw)
  To: andy.shevchenko
  Cc: linus.walleij, bgolaszewski, linux-gpio, linux-kernel, Abanoub Sameh

Changed 'unsigned' to 'unsigned int'.
This makes the code more uniform, and compliant with the kernel coding style.

Signed-off-by: Abanoub Sameh <abanoubsameh@protonmail.com>
---
 drivers/gpio/gpio-pch.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
index e96d28bf43b4..71dde7ceb7af 100644
--- a/drivers/gpio/gpio-pch.c
+++ b/drivers/gpio/gpio-pch.c
@@ -95,7 +95,7 @@ struct pch_gpio {
 	spinlock_t spinlock;
 };
 
-static void pch_gpio_set(struct gpio_chip *gpio, unsigned nr, int val)
+static void pch_gpio_set(struct gpio_chip *gpio, unsigned int nr, int val)
 {
 	u32 reg_val;
 	struct pch_gpio *chip =	gpiochip_get_data(gpio);
@@ -112,14 +112,14 @@ static void pch_gpio_set(struct gpio_chip *gpio, unsigned nr, int val)
 	spin_unlock_irqrestore(&chip->spinlock, flags);
 }
 
-static int pch_gpio_get(struct gpio_chip *gpio, unsigned nr)
+static int pch_gpio_get(struct gpio_chip *gpio, unsigned int nr)
 {
 	struct pch_gpio *chip =	gpiochip_get_data(gpio);
 
 	return !!(ioread32(&chip->reg->pi) & BIT(nr));
 }
 
-static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
+static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned int nr,
 				     int val)
 {
 	struct pch_gpio *chip =	gpiochip_get_data(gpio);
@@ -146,7 +146,7 @@ static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
 	return 0;
 }
 
-static int pch_gpio_direction_input(struct gpio_chip *gpio, unsigned nr)
+static int pch_gpio_direction_input(struct gpio_chip *gpio, unsigned int nr)
 {
 	struct pch_gpio *chip =	gpiochip_get_data(gpio);
 	u32 pm;
@@ -196,7 +196,7 @@ static void __maybe_unused pch_gpio_restore_reg_conf(struct pch_gpio *chip)
 		iowrite32(chip->pch_gpio_reg.gpio_use_sel_reg, &chip->reg->gpio_use_sel);
 }
 
-static int pch_gpio_to_irq(struct gpio_chip *gpio, unsigned offset)
+static int pch_gpio_to_irq(struct gpio_chip *gpio, unsigned int offset)
 {
 	struct pch_gpio *chip = gpiochip_get_data(gpio);
 	return chip->irq_base + offset;
-- 
2.28.0.rc0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] gpio: gpio-pch.c: fixed coding style issue
  2020-07-21 14:50 [PATCH 1/2] gpio: gpio-pch.c: changed every 'unsigned' to 'unsigned int' Abanoub Sameh
@ 2020-07-21 14:50 ` Abanoub Sameh
  2020-07-21 16:07   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Abanoub Sameh @ 2020-07-21 14:50 UTC (permalink / raw)
  To: andy.shevchenko
  Cc: linus.walleij, bgolaszewski, linux-gpio, linux-kernel, Abanoub Sameh

Added a lined between a declaration and other statements according to the
kenel coding style.

Signed-off-by: Abanoub Sameh <abanoubsameh@protonmail.com>
---
 drivers/gpio/gpio-pch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
index 71dde7ceb7af..039822978eaf 100644
--- a/drivers/gpio/gpio-pch.c
+++ b/drivers/gpio/gpio-pch.c
@@ -199,6 +199,7 @@ static void __maybe_unused pch_gpio_restore_reg_conf(struct pch_gpio *chip)
 static int pch_gpio_to_irq(struct gpio_chip *gpio, unsigned int offset)
 {
 	struct pch_gpio *chip = gpiochip_get_data(gpio);
+
 	return chip->irq_base + offset;
 }
 
-- 
2.28.0.rc0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] gpio: gpio-pch.c: fixed coding style issue
  2020-07-21 14:50 ` [PATCH 2/2] gpio: gpio-pch.c: fixed coding style issue Abanoub Sameh
@ 2020-07-21 16:07   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2020-07-21 16:07 UTC (permalink / raw)
  To: Abanoub Sameh
  Cc: Linus Walleij, Bartosz Golaszewski, open list:GPIO SUBSYSTEM,
	Linux Kernel Mailing List, Abanoub Sameh

On Tue, Jul 21, 2020 at 5:51 PM Abanoub Sameh <abanoubsameh8@gmail.com> wrote:
>
> Added a lined between a declaration and other statements according to the
> kenel coding style.

Besides the typo in the word 'kernel' the subject is not okay.
I fixed this locally this time.

I also highly recommend to read https://chris.beams.io/posts/git-commit/.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-21 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 14:50 [PATCH 1/2] gpio: gpio-pch.c: changed every 'unsigned' to 'unsigned int' Abanoub Sameh
2020-07-21 14:50 ` [PATCH 2/2] gpio: gpio-pch.c: fixed coding style issue Abanoub Sameh
2020-07-21 16:07   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).