linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: iio: kernel style neatening
@ 2014-06-19 21:04 Federico Di Pierro
  2014-06-19 21:13 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Federico Di Pierro @ 2014-06-19 21:04 UTC (permalink / raw)
  To: Jonathan Cameron, gregkh, jg1.han, sachin.kamat
  Cc: linux-iio, devel, linux-kernel

Hi!
I've finally found some spare time from my studies to sit back and try 
again this eudyptula challenge task.
This is a very small patch that fixes 3 little coding style problems.
I'm using linux-next.

Signed-off-by: Federico Di Pierro <nierro92@gmail.org>

--- linux/drivers/staging/iio/frequency/ad9832.c.orig	2014-06-02 
17:26:12.929978122 +0200
+++ linux/drivers/staging/iio/frequency/ad9832.c	2014-06-02 
19:34:57.129506826 +0200
@@ -57,7 +57,7 @@ static int ad9832_write_frequency(struct
  }

  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 ad9
  	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 devic
  		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;
  		}

-- 
Federico

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

* Re: [PATCH] staging: iio: kernel style neatening
  2014-06-19 21:04 [PATCH] staging: iio: kernel style neatening Federico Di Pierro
@ 2014-06-19 21:13 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2014-06-19 21:13 UTC (permalink / raw)
  To: Federico Di Pierro
  Cc: Jonathan Cameron, gregkh, jg1.han, sachin.kamat, linux-iio, devel,
	linux-kernel

On Thu, 2014-06-19 at 23:04 +0200, Federico Di Pierro wrote:
> This is a very small patch that fixes 3 little coding style problems.
> I'm using linux-next.

Hello Federico.

Your patch is word wrapped and can't be applied.

Please read Documentation/SubmittingPatches and
Documentation/email-clients.txt

Ideally, try to use git, git format-patch and
git send-email.

> --- linux/drivers/staging/iio/frequency/ad9832.c.orig	2014-06-02 
> 17:26:12.929978122 +0200
> +++ linux/drivers/staging/iio/frequency/ad9832.c	2014-06-02 
> 19:34:57.129506826 +0200



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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-19 21:04 [PATCH] staging: iio: kernel style neatening Federico Di Pierro
2014-06-19 21:13 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).