Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1601985 > unrolled thread

[PATCH 0/6] gpio: mvebu: prepatatory cleanup for pwm-fan support

Started byRalph Sennhauser <ralph.sennhauser@gmail.com>
First post2017-03-16 07:40 +0100
Last post2017-03-16 16:50 +0100
Articles 10 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/6] gpio: mvebu: prepatatory cleanup for pwm-fan support Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-16 07:40 +0100
    [PATCH 6/6] gpio: mvebu: let the compiler inline Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-16 07:40 +0100
      Re: [PATCH 6/6] gpio: mvebu: let the compiler inline Linus Walleij <linus.walleij@linaro.org> - 2017-03-16 16:50 +0100
        Re: [PATCH 6/6] gpio: mvebu: let the compiler inline Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-17 10:10 +0100
    [PATCH 2/6] gpio: mvebu: start multiline block comments with blank line Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-16 07:40 +0100
      Re: [PATCH 2/6] gpio: mvebu: start multiline block comments with  blank line Linus Walleij <linus.walleij@linaro.org> - 2017-03-16 16:50 +0100
    [PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-16 07:40 +0100
      Re: [PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes Linus Walleij <linus.walleij@linaro.org> - 2017-03-16 16:50 +0100
    [PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes Ralph Sennhauser <ralph.sennhauser@gmail.com> - 2017-03-16 07:40 +0100
      Re: [PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes Linus Walleij <linus.walleij@linaro.org> - 2017-03-16 16:50 +0100

#1601985 — [PATCH 0/6] gpio: mvebu: prepatatory cleanup for pwm-fan support

FromRalph Sennhauser <ralph.sennhauser@gmail.com>
Date2017-03-16 07:40 +0100
Subject[PATCH 0/6] gpio: mvebu: prepatatory cleanup for pwm-fan support
Message-ID<tlxeN-2IL-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1601988 — [PATCH 6/6] gpio: mvebu: let the compiler inline

FromRalph Sennhauser <ralph.sennhauser@gmail.com>
Date2017-03-16 07:40 +0100
Subject[PATCH 6/6] gpio: mvebu: let the compiler inline
Message-ID<tlxeO-2IL-7@gated-at.bofh.it>
In reply to#1601985
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

[toc] | [prev] | [next] | [standalone]


#1602573 — Re: [PATCH 6/6] gpio: mvebu: let the compiler inline

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-03-16 16:50 +0100
SubjectRe: [PATCH 6/6] gpio: mvebu: let the compiler inline
Message-ID<tlFP4-pI-5@gated-at.bofh.it>
In reply to#1601988
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

[toc] | [prev] | [next] | [standalone]


#1603124 — Re: [PATCH 6/6] gpio: mvebu: let the compiler inline

FromRalph Sennhauser <ralph.sennhauser@gmail.com>
Date2017-03-17 10:10 +0100
SubjectRe: [PATCH 6/6] gpio: mvebu: let the compiler inline
Message-ID<tlW3v-42C-3@gated-at.bofh.it>
In reply to#1602573
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

[toc] | [prev] | [next] | [standalone]


#1601990 — [PATCH 2/6] gpio: mvebu: start multiline block comments with blank line

FromRalph Sennhauser <ralph.sennhauser@gmail.com>
Date2017-03-16 07:40 +0100
Subject[PATCH 2/6] gpio: mvebu: start multiline block comments with blank line
Message-ID<tlxeO-2IL-19@gated-at.bofh.it>
In reply to#1601985
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

[toc] | [prev] | [next] | [standalone]


#1602581 — Re: [PATCH 2/6] gpio: mvebu: start multiline block comments with blank line

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-03-16 16:50 +0100
SubjectRe: [PATCH 2/6] gpio: mvebu: start multiline block comments with blank line
Message-ID<tlFP5-pI-33@gated-at.bofh.it>
In reply to#1601990
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

[toc] | [prev] | [next] | [standalone]


#1601991 — [PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes

FromRalph Sennhauser <ralph.sennhauser@gmail.com>
Date2017-03-16 07:40 +0100
Subject[PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes
Message-ID<tlxeO-2IL-21@gated-at.bofh.it>
In reply to#1601985
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

[toc] | [prev] | [next] | [standalone]


#1602579 — Re: [PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-03-16 16:50 +0100
SubjectRe: [PATCH 1/6] gpio: mvebu: checkpatch: block comment fixes
Message-ID<tlFP4-pI-21@gated-at.bofh.it>
In reply to#1601991
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

[toc] | [prev] | [next] | [standalone]


#1601993 — [PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes

FromRalph Sennhauser <ralph.sennhauser@gmail.com>
Date2017-03-16 07:40 +0100
Subject[PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes
Message-ID<tlxeO-2IL-15@gated-at.bofh.it>
In reply to#1601985
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

[toc] | [prev] | [next] | [standalone]


#1602574 — Re: [PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-03-16 16:50 +0100
SubjectRe: [PATCH 4/6] gpio: mvebu: checkpatch: whitespace fixes
Message-ID<tlFP4-pI-19@gated-at.bofh.it>
In reply to#1601993
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web