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


Groups > linux.kernel > #1205006 > unrolled thread

[PATCH 0/2] Staging: iio: trigger: Fix style issues

Started byCristina Opriceana <cristina.opriceana@gmail.com>
First post2015-08-11 12:20 +0200
Last post2015-08-15 22:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] Staging: iio: trigger: Fix style issues Cristina Opriceana <cristina.opriceana@gmail.com> - 2015-08-11 12:20 +0200
    [PATCH 2/2] Staging: iio: trigger: Use braces on both branches of if  statement Cristina Opriceana <cristina.opriceana@gmail.com> - 2015-08-11 12:30 +0200
      Re: [PATCH 2/2] Staging: iio: trigger: Use braces on both branches of  if statement Jonathan Cameron <jic23@kernel.org> - 2015-08-15 22:10 +0200

#1205006 — [PATCH 0/2] Staging: iio: trigger: Fix style issues

FromCristina Opriceana <cristina.opriceana@gmail.com>
Date2015-08-11 12:20 +0200
Subject[PATCH 0/2] Staging: iio: trigger: Fix style issues
Message-ID<pWeP0-27X-23@gated-at.bofh.it>
Fix style issues reported by checkpatch.pl.

Cristina Opriceana (2):
  Staging: iio: trigger: Alignment should match open parenthesis
  Staging: iio: trigger: Use braces on both branches of if statement

 drivers/staging/iio/trigger/iio-trig-bfin-timer.c   | 7 ++++---
 drivers/staging/iio/trigger/iio-trig-periodic-rtc.c | 5 +++--
 2 files changed, 7 insertions(+), 5 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


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

FromCristina Opriceana <cristina.opriceana@gmail.com>
Date2015-08-11 12:30 +0200
Subject[PATCH 2/2] Staging: iio: trigger: Use braces on both branches of if statement
Message-ID<pWeYG-2jf-11@gated-at.bofh.it>
In reply to#1205006
Fix style issue related to missing braces, detected by checkpatch.pl.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
---
 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;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


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

FromJonathan Cameron <jic23@kernel.org>
Date2015-08-15 22:10 +0200
SubjectRe: [PATCH 2/2] Staging: iio: trigger: Use braces on both branches of if statement
Message-ID<pXPWa-3m2-7@gated-at.bofh.it>
In reply to#1205025
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@gmail.com>
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;
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web