gpio: dln2: Fix gpio output value in dln2_gpio_direction_output()
PATCH 1/1 gpio: dln2: Fix gpio output value in dln2_gpio_direction_output()
dln2_gpio_direction_output() ignored the state passed into it. Fix it.
---
I don't have this hardware handy, so only compile test.
drivers/gpio/gpio-dln2.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/gpio-dln2.c +1 -0
@@ -267,6 +267,7 @@ static int dln2_gpio_direction_input(struct gpio_chip *chip, unsigned offset)static int dln2_gpio_direction_output (struct gpio_chip *chip,unsigned offset,int value) { +dln2_gpio_set (chip, offset, value);return dln2_gpio_set_direction (chip, offset,DLN2_GPIO_DIRECTION_OUT ); }
Signature · 1 line
1.9.1
Quoted 3 lines · Axel Lin
dln2_gpio_direction_output()ignored the state passed into it. Fix it.Signed-off-by Axel Lin <[email protected]>
Quoted 18 lines
---
I don't have this hardware handy, so only compile test.drivers/gpio/gpio-dln2.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/gpio-dln2.c +1
-0@@ -267,6 +267,7 @@ static int dln2_gpio_direction_input(struct gpio_chip *chip, unsigned offset)static int dln2_gpio_direction_output (struct gpio_chip *chip,unsigned offset,int value) { +dln2_gpio_set (chip, offset, value);return dln2_gpio_set_direction (chip, offset,DLN2_GPIO_DIRECTION_OUT ); }
Alexandre Courbot
Acked-byQuoted 10 lines · Daniel Baluta
Quoted 4 lines · Axel Lin
dln2_gpio_direction_output()ignored the state passed into it. Fix it.Signed-off-by Axel Lin <[email protected]>Tested-by Daniel Baluta <[email protected]>
But this seems to apply to patches in mid-flight, could it be squashed there maybe?
Quoted 10 lines · Alexandre Courbot
Quoted 9 lines · Daniel Baluta
Quoted 4 lines · Axel Lin
dln2_gpio_direction_output()ignored the state passed into it. Fix it.Signed-off-by Axel Lin <[email protected]>
Quoted 6 lines
Quoted 1 line
Tested-by Daniel Baluta <[email protected]>But this seems to apply to patches in mid-flight, could it be squashed there maybe?
Sure, I can add it to the existing series, but I prefer to keep it as separate patch. Is that ok with you?
Quoted 13 lines · Octavian Purdila
Quoted 12 lines · Alexandre Courbot
Quoted 10 lines · Daniel Baluta
Quoted 4 lines · Axel Lin
dln2_gpio_direction_output()ignored the state passed into it. Fix it.Signed-off-by Axel Lin <[email protected]>Tested-by Daniel Baluta <[email protected]>
Quoted 7 lines
Quoted 4 lines
But this seems to apply to patches in mid-flight, could it be squashed there maybe?
Sure, I can add it to the existing series, but I prefer to keep it as separate patch. Is that ok with you?
Why? This is clearly a fix, so if the series is not merged yet, doesn't it make more sense to squash it and have the desired functionality from the start?
Quoted 20 lines · Alexandre Courbot
Quoted 18 lines · Octavian Purdila
Quoted 16 lines · Alexandre Courbot
Quoted 10 lines · Daniel Baluta
Quoted 4 lines · Axel Lin
dln2_gpio_direction_output()ignored the state passed into it. Fix it.Signed-off-by Axel Lin <[email protected]>Tested-by Daniel Baluta <[email protected]>But this seems to apply to patches in mid-flight, could it be squashed there maybe?
Quoted 6 lines
Quoted 2 lines
Sure, I can add it to the existing series, but I prefer to keep it as separate patch. Is that ok with you?
Why? This is clearly a fix, so if the series is not merged yet, doesn't it make more sense to squash it and have the desired functionality from the start?
The fix is not for issues introduced by the series, but for an issue existing in the already merged code. Also it is a separate issue then the one fixed in the other patches in the series.
AFAIK each fix should be in a separate patch, am I missing something?
Quoted 24 lines · Octavian Purdila
Quoted 23 lines · Alexandre Courbot
Quoted 20 lines · Octavian Purdila
Quoted 10 lines · Alexandre Courbot
Quoted 9 lines · Daniel Baluta
Quoted 4 lines · Axel Lin
dln2_gpio_direction_output()ignored the state passed into it. Fix it.Signed-off-by Axel Lin <[email protected]>Quoted 6 lines
Quoted 1 line
Tested-by Daniel Baluta <[email protected]>But this seems to apply to patches in mid-flight, could it be squashed there maybe?
Sure, I can add it to the existing series, but I prefer to keep it as separate patch. Is that ok with you?
Quoted 7 lines
Quoted 3 lines
Why? This is clearly a fix, so if the series is not merged yet, doesn't it make more sense to squash it and have the desired functionality from the start?
The fix is not for issues introduced by the series, but for an issue existing in the already merged code. Also it is a separate issue then the one fixed in the other patches in the series.
Allright, I thought none of the DL2 support has been fixed yet (as I cannot see it in Linus W.'s tree). You know better what the state of your patches is, so please do what you think is best.
Octavian Purdila
Reviewed-byQuoted 3 lines · Daniel Baluta
On 12/16/2014 04:40 PM, Axel Lin wrote:
Hi Axel,
Nice catch!
Quoted 13 lines
Quoted 4 lines
dln2_gpio_direction_output()ignored the state passed into it. Fix it.Signed-off-by Axel Lin <[email protected]>Tested-by Daniel Baluta <[email protected]>Quoted 5 lines
---
I don't have this hardware handy, so only compile test.drivers/gpio/gpio-dln2.c | 1 + 1 file changed, 1 insertion(+)
Quoted 11 lines
drivers/gpio/gpio-dln2.c static int dln2_gpio_direction_input(struct gpio_chip · line 272
Quoted 11 lines
drivers/gpio/gpio-dln2.c +1
-0@@ -267,6 +267,7 @@ static int dln2_gpio_direction_input(struct gpio_chip *chip, unsigned offset)static int dln2_gpio_direction_output (struct gpio_chip *chip,unsigned offset,int value) { +dln2_gpio_set (chip, offset, value);
Could you change dln2_gpio_pin_set_out_val's signature to return an error code than use it instead of dln2_gpio_set here? Then we can check the error value. With that: