All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] staging: iio: Coding style issues fix.
@ 2014-06-29  9:41 Federico Di Pierro
  2014-06-29 13:37 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Federico Di Pierro @ 2014-06-29  9:41 UTC (permalink / raw)
  To: Jonathan Cameron, Greg Kroah-Hartman, Jingoo Han, Sachin Kamat
  Cc: linux-iio, devel, linux-kernel, Federico Di Pierro

Fix some little style issues in drivers/staging/iio/frequency/ad9832.c .
This is my latest task of the eudyptula challenge (third attempt!)

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
---
 drivers/staging/iio/frequency/ad9832.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
index c7d0307..b7c8351 100644
--- a/drivers/staging/iio/frequency/ad9832.c
+++ b/drivers/staging/iio/frequency/ad9832.c
@@ -57,7 +57,7 @@ static int ad9832_write_frequency(struct ad9832_state *st,
 }
 
 static int ad9832_write_phase(struct ad9832_state *st,
-				  unsigned long addr, unsigned long phase)
+			      unsigned long addr, unsigned long phase)
 {
 	if (phase > (1 << AD9832_PHASE_BITS))
 		return -EINVAL;
@@ -72,10 +72,8 @@ static int ad9832_write_phase(struct ad9832_state *st,
 	return spi_sync(st->spi, &st->phase_msg);
 }
 
-static ssize_t ad9832_write(struct device *dev,
-		struct device_attribute *attr,
-		const char *buf,
-		size_t len)
+static ssize_t ad9832_write(struct device *dev, struct device_attribute *attr,
+			    const char *buf, size_t len)
 {
 	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
 	struct ad9832_state *st = iio_priv(indio_dev);
@@ -109,11 +107,11 @@ static ssize_t ad9832_write(struct device *dev,
 		ret = spi_sync(st->spi, &st->msg);
 		break;
 	case AD9832_FREQ_SYM:
-		if (val == 1)
+		if (val == 1) {
 			st->ctrl_fp |= AD9832_FREQ;
-		else if (val == 0)
+		} else if (val == 0) {
 			st->ctrl_fp &= ~AD9832_FREQ;
-		else {
+		} else {
 			ret = -EINVAL;
 			break;
 		}
-- 
2.0.1


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

* Re: [PATCH 1/1] staging: iio: Coding style issues fix.
  2014-06-29  9:41 [PATCH 1/1] staging: iio: Coding style issues fix Federico Di Pierro
@ 2014-06-29 13:37 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2014-06-29 13:37 UTC (permalink / raw)
  To: Federico Di Pierro, Greg Kroah-Hartman, Jingoo Han, Sachin Kamat
  Cc: linux-iio, devel, linux-kernel

On 29/06/14 10:41, Federico Di Pierro wrote:
> Fix some little style issues in drivers/staging/iio/frequency/ad9832.c .
> This is my latest task of the eudyptula challenge (third attempt!)
>
> Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
I'd have preferred more meaty work on this driver, but I guess every
little bit helps...

Applied to the togreg branch of iio.git

Thanks,


> ---
>   drivers/staging/iio/frequency/ad9832.c | 14 ++++++--------
>   1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
> index c7d0307..b7c8351 100644
> --- a/drivers/staging/iio/frequency/ad9832.c
> +++ b/drivers/staging/iio/frequency/ad9832.c
> @@ -57,7 +57,7 @@ static int ad9832_write_frequency(struct ad9832_state *st,
>   }
>
>   static int ad9832_write_phase(struct ad9832_state *st,
> -				  unsigned long addr, unsigned long phase)
> +			      unsigned long addr, unsigned long phase)
>   {
>   	if (phase > (1 << AD9832_PHASE_BITS))
>   		return -EINVAL;
> @@ -72,10 +72,8 @@ static int ad9832_write_phase(struct ad9832_state *st,
>   	return spi_sync(st->spi, &st->phase_msg);
>   }
>
> -static ssize_t ad9832_write(struct device *dev,
> -		struct device_attribute *attr,
> -		const char *buf,
> -		size_t len)
> +static ssize_t ad9832_write(struct device *dev, struct device_attribute *attr,
> +			    const char *buf, size_t len)
>   {
>   	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
>   	struct ad9832_state *st = iio_priv(indio_dev);
> @@ -109,11 +107,11 @@ static ssize_t ad9832_write(struct device *dev,
>   		ret = spi_sync(st->spi, &st->msg);
>   		break;
>   	case AD9832_FREQ_SYM:
> -		if (val == 1)
> +		if (val == 1) {
>   			st->ctrl_fp |= AD9832_FREQ;
> -		else if (val == 0)
> +		} else if (val == 0) {
>   			st->ctrl_fp &= ~AD9832_FREQ;
> -		else {
> +		} else {
>   			ret = -EINVAL;
>   			break;
>   		}
>


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

end of thread, other threads:[~2014-06-29 13:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-29  9:41 [PATCH 1/1] staging: iio: Coding style issues fix Federico Di Pierro
2014-06-29 13:37 ` Jonathan Cameron

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.