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


Groups > linux.kernel > #1547200 > unrolled thread

[PATCHv4 4/8] Fix braces not present on all arms of if else statement

Started byScott Matheina <scott@matheina.com>
First post2016-12-25 21:10 +0100
Last post2016-12-30 19:50 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCHv4 4/8] Fix braces not present on all arms of if else statement Scott Matheina <scott@matheina.com> - 2016-12-25 21:10 +0100
    Re: [PATCHv4 4/8] Fix braces not present on all arms of if else  statement Jonathan Cameron <jic23@kernel.org> - 2016-12-30 19:50 +0100
      Re: [PATCHv4 4/8] Fix braces not present on all arms of if else  statement Jonathan Cameron <jic23@kernel.org> - 2016-12-30 19:50 +0100

#1547200 — [PATCHv4 4/8] Fix braces not present on all arms of if else statement

FromScott Matheina <scott@matheina.com>
Date2016-12-25 21:10 +0100
Subject[PATCHv4 4/8] Fix braces not present on all arms of if else statement
Message-ID<sSnhf-22f-17@gated-at.bofh.it>
Adds braces to second arm of if else statement.

Signed-off-by: Scott Matheina <scott@matheina.com>
---
 drivers/staging/iio/addac/adt7316.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 2b584a0..e78d302 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -661,8 +661,9 @@ static ssize_t adt7316_store_da_high_resolution(struct device *dev,
 			chip->dac_bits = 12;
 		else if (chip->id == ID_ADT7317 || chip->id == ID_ADT7517)
 			chip->dac_bits = 10;
-	} else
+	} else {
 		config3 = chip->config3 & (~ADT7316_DA_HIGH_RESOLUTION);
+	}
 
 	ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG3, config3);
 	if (ret)
-- 
2.7.4

[toc] | [next] | [standalone]


#1548679 — Re: [PATCHv4 4/8] Fix braces not present on all arms of if else statement

FromJonathan Cameron <jic23@kernel.org>
Date2016-12-30 19:50 +0100
SubjectRe: [PATCHv4 4/8] Fix braces not present on all arms of if else statement
Message-ID<sUapz-82C-5@gated-at.bofh.it>
In reply to#1547200
On 25/12/16 19:56, Scott Matheina wrote:
> Adds braces to second arm of if else statement.
> 
> Signed-off-by: Scott Matheina <scott@matheina.com>
This patch is actually correct so applied to the togreg branch of iio.git.

Thanks,

Jonathan
> ---
>  drivers/staging/iio/addac/adt7316.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
> index 2b584a0..e78d302 100644
> --- a/drivers/staging/iio/addac/adt7316.c
> +++ b/drivers/staging/iio/addac/adt7316.c
> @@ -661,8 +661,9 @@ static ssize_t adt7316_store_da_high_resolution(struct device *dev,
>  			chip->dac_bits = 12;
>  		else if (chip->id == ID_ADT7317 || chip->id == ID_ADT7517)
>  			chip->dac_bits = 10;
> -	} else
> +	} else {
>  		config3 = chip->config3 & (~ADT7316_DA_HIGH_RESOLUTION);
> +	}
>  
>  	ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG3, config3);
>  	if (ret)
> 

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


#1548680 — Re: [PATCHv4 4/8] Fix braces not present on all arms of if else statement

FromJonathan Cameron <jic23@kernel.org>
Date2016-12-30 19:50 +0100
SubjectRe: [PATCHv4 4/8] Fix braces not present on all arms of if else statement
Message-ID<sUapz-82C-13@gated-at.bofh.it>
In reply to#1548679
On 30/12/16 18:46, Jonathan Cameron wrote:
> On 25/12/16 19:56, Scott Matheina wrote:
>> Adds braces to second arm of if else statement.
>>
>> Signed-off-by: Scott Matheina <scott@matheina.com>
> This patch is actually correct so applied to the togreg branch of iio.git.
Ah, patch title could be better. Should mention which driver it is for as
it is common for people to cherrypick individual patches out of a series
(like I just did).

I'll fix this one up to
staging:iio:adt7316...

Jonathan
> 
> Thanks,
> 
> Jonathan
>> ---
>>  drivers/staging/iio/addac/adt7316.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
>> index 2b584a0..e78d302 100644
>> --- a/drivers/staging/iio/addac/adt7316.c
>> +++ b/drivers/staging/iio/addac/adt7316.c
>> @@ -661,8 +661,9 @@ static ssize_t adt7316_store_da_high_resolution(struct device *dev,
>>  			chip->dac_bits = 12;
>>  		else if (chip->id == ID_ADT7317 || chip->id == ID_ADT7517)
>>  			chip->dac_bits = 10;
>> -	} else
>> +	} else {
>>  		config3 = chip->config3 & (~ADT7316_DA_HIGH_RESOLUTION);
>> +	}
>>  
>>  	ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG3, config3);
>>  	if (ret)
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web