Re: [PATCH 2/2] Staging: iio: trigger: Use braces on both branches of if statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/08/15 11:20, Cristina Opriceana wrote:
> Fix style issue related to missing braces, detected by checkpatch.pl.
> 
> Signed-off-by: Cristina Opriceana <cristina.opriceana@xxxxxxxxx>
Applied to the togreg branch of iio.git.

This one used to be left as optional, so there are a lot of these in older
code (and in IIO you don't get much older than this!)

For reference, it is going away the moment the high resolution timer
trigger is in as this support is emulated in all modern rtc drivers
anyway (was using actual hardware in the rtc when this driver was written).

Anyhow, even code with a short likely time to live can be well formatted!

Applied.

Jonathan
> ---
>  drivers/staging/iio/trigger/iio-trig-periodic-rtc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
> index a2a42c2..2db8857 100644
> --- a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
> +++ b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
> @@ -74,8 +74,9 @@ static ssize_t iio_trig_periodic_write_freq(struct device *dev,
>  		if (ret == 0 && trig_info->state && trig_info->frequency == 0)
>  			ret = rtc_irq_set_state(trig_info->rtc,
>  						&trig_info->task, 1);
> -	} else
> +	} else {
>  		ret = rtc_irq_set_state(trig_info->rtc, &trig_info->task, 0);
> +	}
>  	if (ret)
>  		goto error_ret;
>  
> 

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux