All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] gpio: mvebu: prepatatory cleanup for pwm-fan support
@ 2017-03-16  6:33 ` Ralph Sennhauser
  0 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Hi everyone

I did pick up a patch series by Andrew Lunn adding PWM upport to mvebu's
gpio controller. Checkpach complained quite a bit and there are extra
inconsitencies which make it worth to clean drivers/gpio/gpio-mvebu.c a bit
before adding the desired pwm fan support for armada 370 / xp.

This series is split out to save the pwm folks from having to review this
part as well.

Thanks
Ralph


Ralph Sennhauser (6):
  gpio: mvebu: checkpatch: block comment fixes
  gpio: mvebu: start multiline block comments with blank line
  gpio: mvebu: checkpatch: unsigned int fixes
  gpio: mvebu: checkpatch: whitespace fixes
  gpio: mvebu: extra whitespace fixes
  gpio: mvebu: let the compiler inline

 drivers/gpio/gpio-mvebu.c | 75 ++++++++++++++++++++++++++---------------------
 1 file changed, 41 insertions(+), 34 deletions(-)

-- 
2.10.2


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

* [PATCH 0/6] gpio: mvebu: prepatatory cleanup for pwm-fan support
@ 2017-03-16  6:33 ` Ralph Sennhauser
  0 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Hi everyone

I did pick up a patch series by Andrew Lunn adding PWM upport to mvebu's
gpio controller. Checkpach complained quite a bit and there are extra
inconsitencies which make it worth to clean drivers/gpio/gpio-mvebu.c a bit
before adding the desired pwm fan support for armada 370 / xp.

This series is split out to save the pwm folks from having to review this
part as well.

Thanks
Ralph


Ralph Sennhauser (6):
  gpio: mvebu: checkpatch: block comment fixes
  gpio: mvebu: start multiline block comments with blank line
  gpio: mvebu: checkpatch: unsigned int fixes
  gpio: mvebu: checkpatch: whitespace fixes
  gpio: mvebu: extra whitespace fixes
  gpio: mvebu: let the compiler inline

 drivers/gpio/gpio-mvebu.c | 75 ++++++++++++++++++++++++++---------------------
 1 file changed, 41 insertions(+), 34 deletions(-)

-- 
2.10.2

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

* [PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes
  2017-03-16  6:33 ` Ralph Sennhauser
@ 2017-03-16  6:33   ` Ralph Sennhauser
  -1 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Fix issues in block comments reported by checkpatch.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a649556..a2351f3 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -62,9 +62,11 @@
 #define GPIO_EDGE_MASK_MV78200_OFF(cpu)	  ((cpu) ? 0x30 : 0x18)
 #define GPIO_LEVEL_MASK_MV78200_OFF(cpu)  ((cpu) ? 0x34 : 0x1C)
 
-/* The Armada XP has per-CPU registers for interrupt cause, interrupt
+/*
+ * The Armada XP has per-CPU registers for interrupt cause, interrupt
  * mask and interrupt level mask. Those are relative to the
- * percpu_membase. */
+ * percpu_membase.
+ */
 #define GPIO_EDGE_CAUSE_ARMADAXP_OFF(cpu) ((cpu) * 0x4)
 #define GPIO_EDGE_MASK_ARMADAXP_OFF(cpu)  (0x10 + (cpu) * 0x4)
 #define GPIO_LEVEL_MASK_ARMADAXP_OFF(cpu) (0x20 + (cpu) * 0x4)
@@ -239,8 +241,10 @@ static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned pin)
 	int ret;
 	u32 u;
 
-	/* Check with the pinctrl driver whether this pin is usable as
-	 * an input GPIO */
+	/*
+	 * Check with the pinctrl driver whether this pin is usable as
+	 * an input GPIO
+	 */
 	ret = pinctrl_gpio_direction_input(chip->base + pin);
 	if (ret)
 		return ret;
@@ -262,8 +266,10 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin,
 	int ret;
 	u32 u;
 
-	/* Check with the pinctrl driver whether this pin is usable as
-	 * an output GPIO */
+	/*
+	 * Check with the pinctrl driver whether this pin is usable as
+	 * an output GPIO
+	 */
 	ret = pinctrl_gpio_direction_output(chip->base + pin);
 	if (ret)
 		return ret;
@@ -712,8 +718,10 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 	if (IS_ERR(mvchip->membase))
 		return PTR_ERR(mvchip->membase);
 
-	/* The Armada XP has a second range of registers for the
-	 * per-CPU registers */
+	/*
+	 * The Armada XP has a second range of registers for the
+	 * per-CPU registers
+	 */
 	if (soc_variant == MVEBU_GPIO_SOC_VARIANT_ARMADAXP) {
 		res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 		mvchip->percpu_membase = devm_ioremap_resource(&pdev->dev,
-- 
2.10.2

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

* [PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes
@ 2017-03-16  6:33   ` Ralph Sennhauser
  0 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Fix issues in block comments reported by checkpatch.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a649556..a2351f3 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -62,9 +62,11 @@
 #define GPIO_EDGE_MASK_MV78200_OFF(cpu)	  ((cpu) ? 0x30 : 0x18)
 #define GPIO_LEVEL_MASK_MV78200_OFF(cpu)  ((cpu) ? 0x34 : 0x1C)
 
-/* The Armada XP has per-CPU registers for interrupt cause, interrupt
+/*
+ * The Armada XP has per-CPU registers for interrupt cause, interrupt
  * mask and interrupt level mask. Those are relative to the
- * percpu_membase. */
+ * percpu_membase.
+ */
 #define GPIO_EDGE_CAUSE_ARMADAXP_OFF(cpu) ((cpu) * 0x4)
 #define GPIO_EDGE_MASK_ARMADAXP_OFF(cpu)  (0x10 + (cpu) * 0x4)
 #define GPIO_LEVEL_MASK_ARMADAXP_OFF(cpu) (0x20 + (cpu) * 0x4)
@@ -239,8 +241,10 @@ static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned pin)
 	int ret;
 	u32 u;
 
-	/* Check with the pinctrl driver whether this pin is usable as
-	 * an input GPIO */
+	/*
+	 * Check with the pinctrl driver whether this pin is usable as
+	 * an input GPIO
+	 */
 	ret = pinctrl_gpio_direction_input(chip->base + pin);
 	if (ret)
 		return ret;
@@ -262,8 +266,10 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin,
 	int ret;
 	u32 u;
 
-	/* Check with the pinctrl driver whether this pin is usable as
-	 * an output GPIO */
+	/*
+	 * Check with the pinctrl driver whether this pin is usable as
+	 * an output GPIO
+	 */
 	ret = pinctrl_gpio_direction_output(chip->base + pin);
 	if (ret)
 		return ret;
@@ -712,8 +718,10 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 	if (IS_ERR(mvchip->membase))
 		return PTR_ERR(mvchip->membase);
 
-	/* The Armada XP has a second range of registers for the
-	 * per-CPU registers */
+	/*
+	 * The Armada XP has a second range of registers for the
+	 * per-CPU registers
+	 */
 	if (soc_variant == MVEBU_GPIO_SOC_VARIANT_ARMADAXP) {
 		res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 		mvchip->percpu_membase = devm_ioremap_resource(&pdev->dev,
-- 
2.10.2

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

* [PATCH 2/6] gpio: mvebu: start multiline block comments with blank line
  2017-03-16  6:33 ` Ralph Sennhauser
@ 2017-03-16  6:33   ` Ralph Sennhauser
  -1 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

While this isn't an issue according to checkpatch two styles are used.
Add a blank line to the block comments missing a blank line at the start
so multiline block comments look the same across the file.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a2351f3..80b1d52 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -788,7 +788,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 		goto err_domain;
 	}
 
-	/* NOTE: The common accessors cannot be used because of the percpu
+	/*
+	 * NOTE: The common accessors cannot be used because of the percpu
 	 * access to the mask registers
 	 */
 	gc = irq_get_domain_generic_chip(mvchip->domain, 0);
@@ -809,7 +810,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 	ct->handler = handle_edge_irq;
 	ct->chip.name = mvchip->chip.label;
 
-	/* Setup the interrupt handlers. Each chip can have up to 4
+	/*
+	 * Setup the interrupt handlers. Each chip can have up to 4
 	 * interrupt handlers, with each handler dealing with 8 GPIO
 	 * pins.
 	 */
-- 
2.10.2

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

* [PATCH 2/6] gpio: mvebu: start multiline block comments with blank line
@ 2017-03-16  6:33   ` Ralph Sennhauser
  0 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

While this isn't an issue according to checkpatch two styles are used.
Add a blank line to the block comments missing a blank line at the start
so multiline block comments look the same across the file.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a2351f3..80b1d52 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -788,7 +788,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 		goto err_domain;
 	}
 
-	/* NOTE: The common accessors cannot be used because of the percpu
+	/*
+	 * NOTE: The common accessors cannot be used because of the percpu
 	 * access to the mask registers
 	 */
 	gc = irq_get_domain_generic_chip(mvchip->domain, 0);
@@ -809,7 +810,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 	ct->handler = handle_edge_irq;
 	ct->chip.name = mvchip->chip.label;
 
-	/* Setup the interrupt handlers. Each chip can have up to 4
+	/*
+	 * Setup the interrupt handlers. Each chip can have up to 4
 	 * interrupt handlers, with each handler dealing with 8 GPIO
 	 * pins.
 	 */
-- 
2.10.2

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

* [PATCH 3/6] gpio: mvebu: checkpatch: unsigned int fixes
  2017-03-16  6:33 ` Ralph Sennhauser
@ 2017-03-16  6:33   ` Ralph Sennhauser
  -1 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Use unsigned int instead of plain unsigned as reported by checkpatch.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 80b1d52..a9522f4 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -187,7 +187,7 @@ static void __iomem *mvebu_gpioreg_level_mask(struct mvebu_gpio_chip *mvchip)
  * Functions implementing the gpio_chip methods
  */
 
-static void mvebu_gpio_set(struct gpio_chip *chip, unsigned pin, int value)
+static void mvebu_gpio_set(struct gpio_chip *chip, unsigned int pin, int value)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	unsigned long flags;
@@ -203,7 +203,7 @@ static void mvebu_gpio_set(struct gpio_chip *chip, unsigned pin, int value)
 	spin_unlock_irqrestore(&mvchip->lock, flags);
 }
 
-static int mvebu_gpio_get(struct gpio_chip *chip, unsigned pin)
+static int mvebu_gpio_get(struct gpio_chip *chip, unsigned int pin)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	u32 u;
@@ -218,7 +218,8 @@ static int mvebu_gpio_get(struct gpio_chip *chip, unsigned pin)
 	return (u >> pin) & 1;
 }
 
-static void mvebu_gpio_blink(struct gpio_chip *chip, unsigned pin, int value)
+static void mvebu_gpio_blink(struct gpio_chip *chip, unsigned int pin,
+			     int value)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	unsigned long flags;
@@ -234,7 +235,7 @@ static void mvebu_gpio_blink(struct gpio_chip *chip, unsigned pin, int value)
 	spin_unlock_irqrestore(&mvchip->lock, flags);
 }
 
-static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned pin)
+static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned int pin)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	unsigned long flags;
@@ -258,7 +259,7 @@ static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned pin)
 	return 0;
 }
 
-static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin,
+static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned int pin,
 				       int value)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
@@ -286,7 +287,7 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin,
 	return 0;
 }
 
-static int mvebu_gpio_to_irq(struct gpio_chip *chip, unsigned pin)
+static int mvebu_gpio_to_irq(struct gpio_chip *chip, unsigned int pin)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	return irq_create_mapping(mvchip->domain, pin);
-- 
2.10.2

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

* [PATCH 3/6] gpio: mvebu: checkpatch: unsigned int fixes
@ 2017-03-16  6:33   ` Ralph Sennhauser
  0 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Use unsigned int instead of plain unsigned as reported by checkpatch.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 80b1d52..a9522f4 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -187,7 +187,7 @@ static void __iomem *mvebu_gpioreg_level_mask(struct mvebu_gpio_chip *mvchip)
  * Functions implementing the gpio_chip methods
  */
 
-static void mvebu_gpio_set(struct gpio_chip *chip, unsigned pin, int value)
+static void mvebu_gpio_set(struct gpio_chip *chip, unsigned int pin, int value)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	unsigned long flags;
@@ -203,7 +203,7 @@ static void mvebu_gpio_set(struct gpio_chip *chip, unsigned pin, int value)
 	spin_unlock_irqrestore(&mvchip->lock, flags);
 }
 
-static int mvebu_gpio_get(struct gpio_chip *chip, unsigned pin)
+static int mvebu_gpio_get(struct gpio_chip *chip, unsigned int pin)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	u32 u;
@@ -218,7 +218,8 @@ static int mvebu_gpio_get(struct gpio_chip *chip, unsigned pin)
 	return (u >> pin) & 1;
 }
 
-static void mvebu_gpio_blink(struct gpio_chip *chip, unsigned pin, int value)
+static void mvebu_gpio_blink(struct gpio_chip *chip, unsigned int pin,
+			     int value)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	unsigned long flags;
@@ -234,7 +235,7 @@ static void mvebu_gpio_blink(struct gpio_chip *chip, unsigned pin, int value)
 	spin_unlock_irqrestore(&mvchip->lock, flags);
 }
 
-static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned pin)
+static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned int pin)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	unsigned long flags;
@@ -258,7 +259,7 @@ static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned pin)
 	return 0;
 }
 
-static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin,
+static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned int pin,
 				       int value)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
@@ -286,7 +287,7 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned pin,
 	return 0;
 }
 
-static int mvebu_gpio_to_irq(struct gpio_chip *chip, unsigned pin)
+static int mvebu_gpio_to_irq(struct gpio_chip *chip, unsigned int pin)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
 	return irq_create_mapping(mvchip->domain, pin);
-- 
2.10.2

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

* [PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes
  2017-03-16  6:33 ` Ralph Sennhauser
@ 2017-03-16  6:33   ` Ralph Sennhauser
  -1 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Fix whitespace errors reported by checkpatch.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a9522f4..1933e63 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -290,6 +290,7 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned int pin,
 static int mvebu_gpio_to_irq(struct gpio_chip *chip, unsigned int pin)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
+
 	return irq_create_mapping(mvchip->domain, pin);
 }
 
-- 
2.10.2

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

* [PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes
@ 2017-03-16  6:33   ` Ralph Sennhauser
  0 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:33 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Fix whitespace errors reported by checkpatch.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index a9522f4..1933e63 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -290,6 +290,7 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned int pin,
 static int mvebu_gpio_to_irq(struct gpio_chip *chip, unsigned int pin)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
+
 	return irq_create_mapping(mvchip->domain, pin);
 }
 
-- 
2.10.2

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

* [PATCH 5/6] gpio: mvebu: extra whitespace fixes
  2017-03-16  6:33 ` Ralph Sennhauser
@ 2017-03-16  6:34   ` Ralph Sennhauser
  -1 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:34 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Fix whitespace errors missed by checkpatch.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 1933e63..d9aa77b 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -87,12 +87,12 @@ struct mvebu_gpio_chip {
 	int		   soc_variant;
 
 	/* Used to preserve GPIO registers across suspend/resume */
-	u32                out_reg;
-	u32                io_conf_reg;
-	u32                blink_en_reg;
-	u32                in_pol_reg;
-	u32                edge_mask_regs[4];
-	u32                level_mask_regs[4];
+	u32		   out_reg;
+	u32		   io_conf_reg;
+	u32		   blink_en_reg;
+	u32		   in_pol_reg;
+	u32		   edge_mask_regs[4];
+	u32		   level_mask_regs[4];
 };
 
 /*
@@ -186,7 +186,6 @@ static void __iomem *mvebu_gpioreg_level_mask(struct mvebu_gpio_chip *mvchip)
 /*
  * Functions implementing the gpio_chip methods
  */
-
 static void mvebu_gpio_set(struct gpio_chip *chip, unsigned int pin, int value)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
-- 
2.10.2


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

* [PATCH 5/6] gpio: mvebu: extra whitespace fixes
@ 2017-03-16  6:34   ` Ralph Sennhauser
  0 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:34 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

Fix whitespace errors missed by checkpatch.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 1933e63..d9aa77b 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -87,12 +87,12 @@ struct mvebu_gpio_chip {
 	int		   soc_variant;
 
 	/* Used to preserve GPIO registers across suspend/resume */
-	u32                out_reg;
-	u32                io_conf_reg;
-	u32                blink_en_reg;
-	u32                in_pol_reg;
-	u32                edge_mask_regs[4];
-	u32                level_mask_regs[4];
+	u32		   out_reg;
+	u32		   io_conf_reg;
+	u32		   blink_en_reg;
+	u32		   in_pol_reg;
+	u32		   edge_mask_regs[4];
+	u32		   level_mask_regs[4];
 };
 
 /*
@@ -186,7 +186,6 @@ static void __iomem *mvebu_gpioreg_level_mask(struct mvebu_gpio_chip *mvchip)
 /*
  * Functions implementing the gpio_chip methods
  */
-
 static void mvebu_gpio_set(struct gpio_chip *chip, unsigned int pin, int value)
 {
 	struct mvebu_gpio_chip *mvchip = gpiochip_get_data(chip);
-- 
2.10.2

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

* [PATCH 6/6] gpio: mvebu: let the compiler inline
  2017-03-16  6:33 ` Ralph Sennhauser
@ 2017-03-16  6:34   ` Ralph Sennhauser
  -1 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:34 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

A modern compiler should know better when to inline, so drop the inline
keywords.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index d9aa77b..029f43c 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -99,35 +99,32 @@ struct mvebu_gpio_chip {
  * Functions returning addresses of individual registers for a given
  * GPIO controller.
  */
-static inline void __iomem *mvebu_gpioreg_out(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_out(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_OUT_OFF;
 }
 
-static inline void __iomem *mvebu_gpioreg_blink(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_blink(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_BLINK_EN_OFF;
 }
 
-static inline void __iomem *
-mvebu_gpioreg_io_conf(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_io_conf(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_IO_CONF_OFF;
 }
 
-static inline void __iomem *mvebu_gpioreg_in_pol(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_in_pol(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_IN_POL_OFF;
 }
 
-static inline void __iomem *
-mvebu_gpioreg_data_in(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_data_in(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_DATA_IN_OFF;
 }
 
-static inline void __iomem *
-mvebu_gpioreg_edge_cause(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_edge_cause(struct mvebu_gpio_chip *mvchip)
 {
 	int cpu;
 
@@ -144,8 +141,7 @@ mvebu_gpioreg_edge_cause(struct mvebu_gpio_chip *mvchip)
 	}
 }
 
-static inline void __iomem *
-mvebu_gpioreg_edge_mask(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_edge_mask(struct mvebu_gpio_chip *mvchip)
 {
 	int cpu;
 
-- 
2.10.2

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

* [PATCH 6/6] gpio: mvebu: let the compiler inline
@ 2017-03-16  6:34   ` Ralph Sennhauser
  0 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-16  6:34 UTC (permalink / raw)
  To: linux-gpio; +Cc: Ralph Sennhauser, Linus Walleij, Alexandre Courbot, open list

A modern compiler should know better when to inline, so drop the inline
keywords.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
---
 drivers/gpio/gpio-mvebu.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index d9aa77b..029f43c 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -99,35 +99,32 @@ struct mvebu_gpio_chip {
  * Functions returning addresses of individual registers for a given
  * GPIO controller.
  */
-static inline void __iomem *mvebu_gpioreg_out(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_out(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_OUT_OFF;
 }
 
-static inline void __iomem *mvebu_gpioreg_blink(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_blink(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_BLINK_EN_OFF;
 }
 
-static inline void __iomem *
-mvebu_gpioreg_io_conf(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_io_conf(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_IO_CONF_OFF;
 }
 
-static inline void __iomem *mvebu_gpioreg_in_pol(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_in_pol(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_IN_POL_OFF;
 }
 
-static inline void __iomem *
-mvebu_gpioreg_data_in(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_data_in(struct mvebu_gpio_chip *mvchip)
 {
 	return mvchip->membase + GPIO_DATA_IN_OFF;
 }
 
-static inline void __iomem *
-mvebu_gpioreg_edge_cause(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_edge_cause(struct mvebu_gpio_chip *mvchip)
 {
 	int cpu;
 
@@ -144,8 +141,7 @@ mvebu_gpioreg_edge_cause(struct mvebu_gpio_chip *mvchip)
 	}
 }
 
-static inline void __iomem *
-mvebu_gpioreg_edge_mask(struct mvebu_gpio_chip *mvchip)
+static void __iomem *mvebu_gpioreg_edge_mask(struct mvebu_gpio_chip *mvchip)
 {
 	int cpu;
 
-- 
2.10.2

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

* Re: [PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes
  2017-03-16  6:33   ` Ralph Sennhauser
  (?)
@ 2017-03-16 15:40   ` Linus Walleij
  -1 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2017-03-16 15:40 UTC (permalink / raw)
  To: Ralph Sennhauser; +Cc: linux-gpio, Alexandre Courbot, open list

On Thu, Mar 16, 2017 at 7:33 AM, Ralph Sennhauser
<ralph.sennhauser@gmail.com> wrote:

> Fix issues in block comments reported by checkpatch.
>
> Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 2/6] gpio: mvebu: start multiline block comments with blank line
  2017-03-16  6:33   ` Ralph Sennhauser
  (?)
@ 2017-03-16 15:41   ` Linus Walleij
  -1 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2017-03-16 15:41 UTC (permalink / raw)
  To: Ralph Sennhauser; +Cc: linux-gpio, Alexandre Courbot, open list

On Thu, Mar 16, 2017 at 7:33 AM, Ralph Sennhauser
<ralph.sennhauser@gmail.com> wrote:

> While this isn't an issue according to checkpatch two styles are used.
> Add a blank line to the block comments missing a blank line at the start
> so multiline block comments look the same across the file.
>
> Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 3/6] gpio: mvebu: checkpatch: unsigned int fixes
  2017-03-16  6:33   ` Ralph Sennhauser
  (?)
@ 2017-03-16 15:42   ` Linus Walleij
  -1 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2017-03-16 15:42 UTC (permalink / raw)
  To: Ralph Sennhauser; +Cc: linux-gpio, Alexandre Courbot, open list

On Thu, Mar 16, 2017 at 7:33 AM, Ralph Sennhauser
<ralph.sennhauser@gmail.com> wrote:

> Use unsigned int instead of plain unsigned as reported by checkpatch.
>
> Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes
  2017-03-16  6:33   ` Ralph Sennhauser
  (?)
@ 2017-03-16 15:42   ` Linus Walleij
  -1 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2017-03-16 15:42 UTC (permalink / raw)
  To: Ralph Sennhauser; +Cc: linux-gpio, Alexandre Courbot, open list

On Thu, Mar 16, 2017 at 7:33 AM, Ralph Sennhauser
<ralph.sennhauser@gmail.com> wrote:

> Fix whitespace errors reported by checkpatch.
>
> Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 5/6] gpio: mvebu: extra whitespace fixes
  2017-03-16  6:34   ` Ralph Sennhauser
  (?)
@ 2017-03-16 15:43   ` Linus Walleij
  -1 siblings, 0 replies; 21+ messages in thread
From: Linus Walleij @ 2017-03-16 15:43 UTC (permalink / raw)
  To: Ralph Sennhauser; +Cc: linux-gpio, Alexandre Courbot, open list

On Thu, Mar 16, 2017 at 7:34 AM, Ralph Sennhauser
<ralph.sennhauser@gmail.com> wrote:

> Fix whitespace errors missed by checkpatch.
>
> Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 6/6] gpio: mvebu: let the compiler inline
  2017-03-16  6:34   ` Ralph Sennhauser
  (?)
@ 2017-03-16 15:44   ` Linus Walleij
  2017-03-17  9:08     ` Ralph Sennhauser
  -1 siblings, 1 reply; 21+ messages in thread
From: Linus Walleij @ 2017-03-16 15:44 UTC (permalink / raw)
  To: Ralph Sennhauser; +Cc: linux-gpio, Alexandre Courbot, open list

On Thu, Mar 16, 2017 at 7:34 AM, Ralph Sennhauser
<ralph.sennhauser@gmail.com> wrote:

> A modern compiler should know better when to inline, so drop the inline
> keywords.
>
> Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>

A bit hesitant about this but whatever, patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 6/6] gpio: mvebu: let the compiler inline
  2017-03-16 15:44   ` Linus Walleij
@ 2017-03-17  9:08     ` Ralph Sennhauser
  0 siblings, 0 replies; 21+ messages in thread
From: Ralph Sennhauser @ 2017-03-17  9:08 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio, Alexandre Courbot, open list

On Thu, 16 Mar 2017 16:44:58 +0100
Linus Walleij <linus.walleij@linaro.org> wrote:

> On Thu, Mar 16, 2017 at 7:34 AM, Ralph Sennhauser
> <ralph.sennhauser@gmail.com> wrote:
> 
> > A modern compiler should know better when to inline, so drop the
> > inline keywords.
> >
> > Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>  
> 
> A bit hesitant about this but whatever, patch applied.
> 
> Yours,
> Linus Walleij

Hi Linus,

I thought this might be accepted or not so I just gave it a try. :)

Looks like linux-next is on hiatus though ...

Thanks
Ralph

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

end of thread, other threads:[~2017-03-17  9:09 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16  6:33 [PATCH 0/6] gpio: mvebu: prepatatory cleanup for pwm-fan support Ralph Sennhauser
2017-03-16  6:33 ` Ralph Sennhauser
2017-03-16  6:33 ` [PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes Ralph Sennhauser
2017-03-16  6:33   ` Ralph Sennhauser
2017-03-16 15:40   ` Linus Walleij
2017-03-16  6:33 ` [PATCH 2/6] gpio: mvebu: start multiline block comments with blank line Ralph Sennhauser
2017-03-16  6:33   ` Ralph Sennhauser
2017-03-16 15:41   ` Linus Walleij
2017-03-16  6:33 ` [PATCH 3/6] gpio: mvebu: checkpatch: unsigned int fixes Ralph Sennhauser
2017-03-16  6:33   ` Ralph Sennhauser
2017-03-16 15:42   ` Linus Walleij
2017-03-16  6:33 ` [PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes Ralph Sennhauser
2017-03-16  6:33   ` Ralph Sennhauser
2017-03-16 15:42   ` Linus Walleij
2017-03-16  6:34 ` [PATCH 5/6] gpio: mvebu: extra " Ralph Sennhauser
2017-03-16  6:34   ` Ralph Sennhauser
2017-03-16 15:43   ` Linus Walleij
2017-03-16  6:34 ` [PATCH 6/6] gpio: mvebu: let the compiler inline Ralph Sennhauser
2017-03-16  6:34   ` Ralph Sennhauser
2017-03-16 15:44   ` Linus Walleij
2017-03-17  9:08     ` Ralph Sennhauser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.