All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: iio: fix coding style
@ 2014-04-09 18:09 Joel Porquet
  2014-04-12 17:28 ` Jonathan Cameron
  2014-06-14 15:21 ` Jonathan Cameron
  0 siblings, 2 replies; 10+ messages in thread
From: Joel Porquet @ 2014-04-09 18:09 UTC (permalink / raw)
  To: jic23, gregkh, jg1.han; +Cc: linux-iio, devel, linux-kernel, Joel Porquet

As suggested by checkpatch.pl, use dev_info() instead of
printk(KERN_INFO ...) to print message.

Signed-off-by: Joel Porquet <joel@porquet.org>
---
Only tested by compilation.
 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 48a6afa..38ecb4b 100644
--- a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
+++ b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
@@ -33,7 +33,8 @@ static int iio_trig_periodic_rtc_set_state(struct iio_trigger *trig, bool state)
 	struct iio_prtc_trigger_info *trig_info = iio_trigger_get_drvdata(trig);
 	if (trig_info->frequency == 0)
 		return -EINVAL;
-	printk(KERN_INFO "trigger frequency is %d\n", trig_info->frequency);
+	dev_info(&trig_info->rtc->dev, "trigger frequency is %d\n",
+			trig_info->frequency);
 	return rtc_irq_set_state(trig_info->rtc, &trig_info->task, state);
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] staging: iio: fix coding style
@ 2014-06-12  9:42 Jimmy P
  2014-06-12 16:10 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 10+ messages in thread
From: Jimmy P @ 2014-06-12  9:42 UTC (permalink / raw)
  To: Jonathan Cameron, Greg Kroah-Hartman, Sachin Kamat
  Cc: Jimmy P, linux-iio, devel, linux-kernel

This patch fixes coding style errors reported by checkpatch.pl for
lines that was over 80 chars long. The macro value shoud be put in () as
well.

Signed-off-by: Jimmy P <jimmyp11f155@gmail.com>
---
 drivers/staging/iio/frequency/ad5930.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/frequency/ad5930.c b/drivers/staging/iio/frequency/ad5930.c
index a4aeee6..95a3550 100644
--- a/drivers/staging/iio/frequency/ad5930.c
+++ b/drivers/staging/iio/frequency/ad5930.c
@@ -21,7 +21,7 @@
 
 #define DRV_NAME "ad5930"
 
-#define value_mask (u16)0xf000
+#define value_mask ((u16)0xf000)
 #define addr_shift 12
 
 /* Register format: 4 bits addr + 12 bits value */
@@ -52,12 +52,15 @@ static ssize_t ad5930_set_parameter(struct device *dev,
 
 	config->control = (config->control & ~value_mask);
 	config->incnum = (config->control & ~value_mask) | (1 << addr_shift);
-	config->frqdelt[0] = (config->control & ~value_mask) | (2 << addr_shift);
+	config->frqdelt[0] = (config->control & ~value_mask) |
+				(2 << addr_shift);
 	config->frqdelt[1] = (config->control & ~value_mask) | 3 << addr_shift;
 	config->incitvl = (config->control & ~value_mask) | 4 << addr_shift;
 	config->buritvl = (config->control & ~value_mask) | 8 << addr_shift;
-	config->strtfrq[0] = (config->control & ~value_mask) | 0xc << addr_shift;
-	config->strtfrq[1] = (config->control & ~value_mask) | 0xd << addr_shift;
+	config->strtfrq[0] = (config->control & ~value_mask) |
+				0xc << addr_shift;
+	config->strtfrq[1] = (config->control & ~value_mask) |
+				0xd << addr_shift;
 
 	xfer.len = len;
 	xfer.tx_buf = config;
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] staging: iio: fix coding style
@ 2014-06-13  5:56 Jimmy Picard
  2014-06-14 15:15 ` Jonathan Cameron
  0 siblings, 1 reply; 10+ messages in thread
From: Jimmy Picard @ 2014-06-13  5:56 UTC (permalink / raw)
  To: Jonathan Cameron, Greg Kroah-Hartman
  Cc: Jimmy Picard, linux-iio, devel, linux-kernel

This patch fixes coding style reported by checkpatch.pl that missing
a blank line after declarations.

Signed-off-by: Jimmy Picard <jimmyp11f155@gmail.com>
---
 drivers/staging/iio/iio_simple_dummy.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/iio/iio_simple_dummy.c b/drivers/staging/iio/iio_simple_dummy.c
index fd334a0..bf78e6f 100644
--- a/drivers/staging/iio/iio_simple_dummy.c
+++ b/drivers/staging/iio/iio_simple_dummy.c
@@ -550,6 +550,7 @@ error_ret:
 static __init int iio_dummy_init(void)
 {
 	int i, ret;
+
 	if (instances > 10) {
 		instances = 1;
 		return -EINVAL;
@@ -577,6 +578,7 @@ module_init(iio_dummy_init);
 static __exit void iio_dummy_exit(void)
 {
 	int i;
+
 	for (i = 0; i < instances; i++)
 		iio_dummy_remove(i);
 	kfree(iio_dummy_devs);
-- 
2.0.0


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-09 18:09 [PATCH] staging: iio: fix coding style Joel Porquet
2014-04-12 17:28 ` Jonathan Cameron
2014-04-14  9:40   ` Dan O'Donovan
2014-04-14 13:59   ` Joël Porquet
2014-04-14 16:10     ` Jonathan Cameron
2014-06-14 15:21 ` Jonathan Cameron
2014-06-12  9:42 Jimmy P
2014-06-12 16:10 ` Greg Kroah-Hartman
2014-06-13  5:56 Jimmy Picard
2014-06-14 15:15 ` 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.