All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: fix a minor harmless typo
@ 2012-05-22 22:20 Guennadi Liakhovetski
  2012-05-23 14:52 ` Stephen Warren
  2012-05-24 15:07 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Guennadi Liakhovetski @ 2012-05-22 22:20 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-kernel

The way the for_each_maps() macro is currently used, using "i" instead of
"_i_" works and is harmless. Still, this is a bug, that can trigger any
time, if the code around that macro changes. Better fix it now.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index ec3b8cc18..4e768d4 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -57,7 +57,7 @@ static LIST_HEAD(pinctrl_maps);
 	list_for_each_entry(_maps_node_, &pinctrl_maps, node) \
 		for (_i_ = 0, _map_ = &_maps_node_->maps[_i_]; \
 			_i_ < _maps_node_->num_maps; \
-			i++, _map_ = &_maps_node_->maps[_i_])
+			_i_++, _map_ = &_maps_node_->maps[_i_])
 
 /**
  * pinctrl_provide_dummies() - indicate if pinctrl provides dummy state support

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

* Re: [PATCH] pinctrl: fix a minor harmless typo
  2012-05-22 22:20 [PATCH] pinctrl: fix a minor harmless typo Guennadi Liakhovetski
@ 2012-05-23 14:52 ` Stephen Warren
  2012-05-24 15:07 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2012-05-23 14:52 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linus Walleij, linux-kernel

On 05/22/2012 04:20 PM, Guennadi Liakhovetski wrote:
> The way the for_each_maps() macro is currently used, using "i" instead of
> "_i_" works and is harmless. Still, this is a bug, that can trigger any
> time, if the code around that macro changes. Better fix it now.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Clearly correct,
Acked-by: Stephen Warren <swarren@wwwdotorg.org>

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

* Re: [PATCH] pinctrl: fix a minor harmless typo
  2012-05-22 22:20 [PATCH] pinctrl: fix a minor harmless typo Guennadi Liakhovetski
  2012-05-23 14:52 ` Stephen Warren
@ 2012-05-24 15:07 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2012-05-24 15:07 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-kernel

On Wed, May 23, 2012 at 12:20 AM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:

> The way the for_each_maps() macro is currently used, using "i" instead of
> "_i_" works and is harmless. Still, this is a bug, that can trigger any
> time, if the code around that macro changes. Better fix it now.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Thanks! Applied with Stephen's ACK.

Yours,
Linus Walleij

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

end of thread, other threads:[~2012-05-24 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-22 22:20 [PATCH] pinctrl: fix a minor harmless typo Guennadi Liakhovetski
2012-05-23 14:52 ` Stephen Warren
2012-05-24 15:07 ` Linus Walleij

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.