linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: at91: Remove duplicate const
@ 2013-03-15  4:37 Sachin Kamat
  2013-03-15  4:37 ` [PATCH 2/2] pinctrl: at91: Fix checkpatch errors Sachin Kamat
  2013-03-27 21:46 ` [PATCH 1/2] pinctrl: at91: Remove duplicate const Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Sachin Kamat @ 2013-03-15  4:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: plagnioj, linus.walleij, sachin.kamat

const declared twice. Fixes the following sparse warning:
drivers/pinctrl/pinctrl-at91.c:815:21: warning: duplicate const
drivers/pinctrl/pinctrl-at91.c:849:21: warning: duplicate const

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/pinctrl/pinctrl-at91.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index e50fa5f..353c7bf 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -812,7 +812,7 @@ static int at91_pinctrl_mux_mask(struct at91_pinctrl *info,
 {
 	int ret = 0;
 	int size;
-	const const __be32 *list;
+	const __be32 *list;
 
 	list = of_get_property(np, "atmel,mux-mask", &size);
 	if (!list) {
@@ -846,7 +846,7 @@ static int at91_pinctrl_parse_groups(struct device_node *np,
 {
 	struct at91_pmx_pin *pin;
 	int size;
-	const const __be32 *list;
+	const __be32 *list;
 	int i, j;
 
 	dev_dbg(info->dev, "group(%d): %s\n", index, np->name);
-- 
1.7.4.1


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

* [PATCH 2/2] pinctrl: at91: Fix checkpatch errors
  2013-03-15  4:37 [PATCH 1/2] pinctrl: at91: Remove duplicate const Sachin Kamat
@ 2013-03-15  4:37 ` Sachin Kamat
  2013-03-27 21:47   ` Linus Walleij
  2013-03-27 21:46 ` [PATCH 1/2] pinctrl: at91: Remove duplicate const Linus Walleij
  1 sibling, 1 reply; 4+ messages in thread
From: Sachin Kamat @ 2013-03-15  4:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: plagnioj, linus.walleij, sachin.kamat

Fixes the following types of checkpatch errors:
ERROR: "foo * bar" should be "foo *bar"
ERROR: "foo* bar" should be "foo *bar"
ERROR: space required before the open parenthesis '('
ERROR: "(foo*)" should be "(foo *)"
ERROR: space required after that ',' (ctx:WxV)
ERROR: "(foo*const*)" should be "(foo *const*)"
ERROR: space required before that '*' (ctx:VxB)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/pinctrl/pinctrl-at91.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 353c7bf..03d8bed 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -303,7 +303,7 @@ static const struct pinctrl_ops at91_pctrl_ops = {
 	.dt_free_map		= at91_dt_free_map,
 };
 
-static void __iomem * pin_to_controller(struct at91_pinctrl *info,
+static void __iomem *pin_to_controller(struct at91_pinctrl *info,
 				 unsigned int bank)
 {
 	return gpio_chips[bank]->regbase;
@@ -501,7 +501,7 @@ static void at91_pin_dbg(const struct device *dev, const struct at91_pmx_pin *pi
 	}
 }
 
-static int pin_check_config(struct at91_pinctrl *info, const char* name,
+static int pin_check_config(struct at91_pinctrl *info, const char *name,
 			    int index, const struct at91_pmx_pin *pin)
 {
 	int mux;
@@ -579,7 +579,7 @@ static int at91_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector,
 		pio = pin_to_controller(info, pin->bank);
 		mask = pin_to_mask(pin->pin);
 		at91_mux_disable_interrupt(pio, mask);
-		switch(pin->mux) {
+		switch (pin->mux) {
 		case AT91_MUX_GPIO:
 			at91_mux_gpio_enable(pio, mask, 1);
 			break;
@@ -944,7 +944,7 @@ static int at91_pinctrl_probe_dt(struct platform_device *pdev,
 		return -ENODEV;
 
 	info->dev = &pdev->dev;
-	info->ops = (struct at91_pinctrl_mux_ops*)
+	info->ops = (struct at91_pinctrl_mux_ops *)
 		of_match_device(at91_pinctrl_of_match, &pdev->dev)->data;
 	at91_pinctrl_child_count(info, np);
 
@@ -1002,7 +1002,7 @@ static int at91_pinctrl_probe(struct platform_device *pdev)
 {
 	struct at91_pinctrl *info;
 	struct pinctrl_pin_desc *pdesc;
-	int ret, i, j ,k;
+	int ret, i, j, k;
 
 	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
 	if (!info)
@@ -1509,7 +1509,7 @@ static int at91_gpio_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	at91_chip->ops = (struct at91_pinctrl_mux_ops*)
+	at91_chip->ops = (struct at91_pinctrl_mux_ops *)
 		of_match_device(at91_gpio_of_match, &pdev->dev)->data;
 	at91_chip->pioc_virq = irq;
 	at91_chip->pioc_idx = alias_idx;
@@ -1546,7 +1546,8 @@ static int at91_gpio_probe(struct platform_device *pdev)
 			chip->ngpio = ngpio;
 	}
 
-	names = devm_kzalloc(&pdev->dev, sizeof(char*) * chip->ngpio, GFP_KERNEL);
+	names = devm_kzalloc(&pdev->dev, sizeof(char *) * chip->ngpio,
+			     GFP_KERNEL);
 
 	if (!names) {
 		ret = -ENOMEM;
@@ -1556,7 +1557,7 @@ static int at91_gpio_probe(struct platform_device *pdev)
 	for (i = 0; i < chip->ngpio; i++)
 		names[i] = kasprintf(GFP_KERNEL, "pio%c%d", alias_idx + 'A', i);
 
-	chip->names = (const char*const*)names;
+	chip->names = (const char *const *)names;
 
 	range = &at91_chip->range;
 	range->name = chip->label;
-- 
1.7.4.1


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

* Re: [PATCH 1/2] pinctrl: at91: Remove duplicate const
  2013-03-15  4:37 [PATCH 1/2] pinctrl: at91: Remove duplicate const Sachin Kamat
  2013-03-15  4:37 ` [PATCH 2/2] pinctrl: at91: Fix checkpatch errors Sachin Kamat
@ 2013-03-27 21:46 ` Linus Walleij
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2013-03-27 21:46 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, plagnioj

On Fri, Mar 15, 2013 at 5:37 AM, Sachin Kamat <sachin.kamat@linaro.org> wrote:

> const declared twice. Fixes the following sparse warning:
> drivers/pinctrl/pinctrl-at91.c:815:21: warning: duplicate const
> drivers/pinctrl/pinctrl-at91.c:849:21: warning: duplicate const
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Patch applied, thanks!

Yours,
Linus Walleij

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

* Re: [PATCH 2/2] pinctrl: at91: Fix checkpatch errors
  2013-03-15  4:37 ` [PATCH 2/2] pinctrl: at91: Fix checkpatch errors Sachin Kamat
@ 2013-03-27 21:47   ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2013-03-27 21:47 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, plagnioj

On Fri, Mar 15, 2013 at 5:37 AM, Sachin Kamat <sachin.kamat@linaro.org> wrote:

> Fixes the following types of checkpatch errors:
> ERROR: "foo * bar" should be "foo *bar"
> ERROR: "foo* bar" should be "foo *bar"
> ERROR: space required before the open parenthesis '('
> ERROR: "(foo*)" should be "(foo *)"
> ERROR: space required after that ',' (ctx:WxV)
> ERROR: "(foo*const*)" should be "(foo *const*)"
> ERROR: space required before that '*' (ctx:VxB)
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Patch applied!

Thanks,
Linus Walleij

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

end of thread, other threads:[~2013-03-27 21:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15  4:37 [PATCH 1/2] pinctrl: at91: Remove duplicate const Sachin Kamat
2013-03-15  4:37 ` [PATCH 2/2] pinctrl: at91: Fix checkpatch errors Sachin Kamat
2013-03-27 21:47   ` Linus Walleij
2013-03-27 21:46 ` [PATCH 1/2] pinctrl: at91: Remove duplicate const Linus Walleij

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).