All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups
@ 2012-04-21 18:32 Jesper Juhl
  2012-04-21 18:32 ` [PATCH 1/3] staging: olpc_dcon.c: strings printed with printk() put on a single line Jesper Juhl
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jesper Juhl @ 2012-04-21 18:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Woodhouse, Andres Salomon, Jordan Crouse, Chris Ball,
	Jon Nettleton, Greg Kroah-Hartman, Valentin Rothberg,
	Wolfram Sang, Paul Gortmaker, devel

Hi

Greg KH asked that these changes, which I had originally put in a single 
patch, be submitted as individual patches with just a single change per 
patch. So here goes.

The 3 patches - submitted as replies to this email are:


1)
Subject: [PATCH 1/3] staging: olpc_dcon.c: strings printed with printk() put on a single line

Quoted strings that were broken over multiple lines are put on a
single line for easier grep'ability.


2)
Subject: [PATCH 2/3] staging: olpc_dcon.c: Add missing level to a printk()


3)
Subject: [PATCH 3/3] staging: olpc_dcon.c: Remove a few spaces between casts and variables

Just a trivial style cleanup.


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


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

* [PATCH 1/3] staging: olpc_dcon.c: strings printed with printk() put on a single line
  2012-04-21 18:32 [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups Jesper Juhl
@ 2012-04-21 18:32 ` Jesper Juhl
  2012-04-21 18:33 ` [PATCH 2/3] staging: olpc_dcon.c: Add missing level to a printk() Jesper Juhl
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Jesper Juhl @ 2012-04-21 18:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Woodhouse, Andres Salomon, Jordan Crouse, Chris Ball,
	Jon Nettleton, Greg Kroah-Hartman, Valentin Rothberg,
	Wolfram Sang, Paul Gortmaker, devel

Quoted strings that were broken over multiple lines are put on a
single line for easier grep'ability.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/staging/olpc_dcon/olpc_dcon.c |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 3d91993..862dbb5 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -71,8 +71,8 @@ static int dcon_hw_init(struct dcon_priv *dcon, int is_init)
 
 	ver = dcon_read(dcon, DCON_REG_ID);
 	if ((ver >> 8) != 0xDC) {
-		printk(KERN_ERR "olpc-dcon:  DCON ID not 0xDCxx: 0x%04x "
-				"instead.\n", ver);
+		printk(KERN_ERR "olpc-dcon:  DCON ID not 0xDCxx: 0x%04x instead.\n",
+			ver);
 		rc = -ENXIO;
 		goto err;
 	}
@@ -136,8 +136,8 @@ power_up:
 		x = 1;
 		x = olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
 		if (x) {
-			printk(KERN_WARNING "olpc-dcon:  unable to force dcon "
-					"to power up: %d!\n", x);
+			printk(KERN_WARNING "olpc-dcon:  unable to force dcon to power up: %d!\n",
+				x);
 			return x;
 		}
 		msleep(10); /* we'll be conservative */
@@ -150,8 +150,7 @@ power_up:
 		x = dcon_read(dcon, DCON_REG_ID);
 	}
 	if (x < 0) {
-		printk(KERN_ERR "olpc-dcon:  unable to stabilize dcon's "
-				"smbus, reasserting power and praying.\n");
+		printk(KERN_ERR "olpc-dcon:  unable to stabilize dcon's smbus, reasserting power and praying.\n");
 		BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
 		x = 0;
 		olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
@@ -222,8 +221,8 @@ static void dcon_sleep(struct dcon_priv *dcon, bool sleep)
 		x = 0;
 		x = olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
 		if (x)
-			printk(KERN_WARNING "olpc-dcon:  unable to force dcon "
-					"to power down: %d!\n", x);
+			printk(KERN_WARNING "olpc-dcon:  unable to force dcon to power down: %d!\n",
+				x);
 		else
 			dcon->asleep = sleep;
 	} else {
@@ -232,8 +231,8 @@ static void dcon_sleep(struct dcon_priv *dcon, bool sleep)
 			dcon->disp_mode |= MODE_BL_ENABLE;
 		x = dcon_bus_stabilize(dcon, 1);
 		if (x)
-			printk(KERN_WARNING "olpc-dcon:  unable to reinit dcon"
-					" hardware: %d!\n", x);
+			printk(KERN_WARNING "olpc-dcon:  unable to reinit dcon hardware: %d!\n",
+				x);
 		else
 			dcon->asleep = sleep;
 
-- 
1.7.10


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


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

* [PATCH 2/3] staging: olpc_dcon.c: Add missing level to a printk()
  2012-04-21 18:32 [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups Jesper Juhl
  2012-04-21 18:32 ` [PATCH 1/3] staging: olpc_dcon.c: strings printed with printk() put on a single line Jesper Juhl
@ 2012-04-21 18:33 ` Jesper Juhl
  2012-04-21 18:33 ` [PATCH 3/3] staging: olpc_dcon.c: Remove a few spaces between casts and variables Jesper Juhl
  2012-04-21 23:15 ` [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups Andres Salomon
  3 siblings, 0 replies; 8+ messages in thread
From: Jesper Juhl @ 2012-04-21 18:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Woodhouse, Andres Salomon, Jordan Crouse, Chris Ball,
	Jon Nettleton, Greg Kroah-Hartman, Valentin Rothberg,
	Wolfram Sang, Paul Gortmaker, devel


Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/staging/olpc_dcon/olpc_dcon.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 862dbb5..7fe6eb6 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -303,7 +303,7 @@ static void dcon_source_switch(struct work_struct *work)
 
 	switch (source) {
 	case DCON_SOURCE_CPU:
-		printk("dcon_source_switch to CPU\n");
+		printk(KERN_INFO "dcon_source_switch to CPU\n");
 		/* Enable the scanline interrupt bit */
 		if (dcon_write(dcon, DCON_REG_MODE,
 				dcon->disp_mode | MODE_SCAN_INT))
-- 
1.7.10


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


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

* [PATCH 3/3] staging: olpc_dcon.c: Remove a few spaces between casts and variables
  2012-04-21 18:32 [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups Jesper Juhl
  2012-04-21 18:32 ` [PATCH 1/3] staging: olpc_dcon.c: strings printed with printk() put on a single line Jesper Juhl
  2012-04-21 18:33 ` [PATCH 2/3] staging: olpc_dcon.c: Add missing level to a printk() Jesper Juhl
@ 2012-04-21 18:33 ` Jesper Juhl
  2012-04-21 20:28   ` Dan Carpenter
  2012-04-21 23:15 ` [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups Andres Salomon
  3 siblings, 1 reply; 8+ messages in thread
From: Jesper Juhl @ 2012-04-21 18:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Woodhouse, Andres Salomon, Jordan Crouse, Chris Ball,
	Jon Nettleton, Greg Kroah-Hartman, Valentin Rothberg,
	Wolfram Sang, Paul Gortmaker, devel

Just a trivial style cleanup.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/staging/olpc_dcon/olpc_dcon.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 7fe6eb6..992275c 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -134,7 +134,7 @@ static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down)
 power_up:
 	if (is_powered_down) {
 		x = 1;
-		x = olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
+		x = olpc_ec_cmd(0x26, (unsigned char *)&x, 1, NULL, 0);
 		if (x) {
 			printk(KERN_WARNING "olpc-dcon:  unable to force dcon to power up: %d!\n",
 				x);
@@ -153,7 +153,7 @@ power_up:
 		printk(KERN_ERR "olpc-dcon:  unable to stabilize dcon's smbus, reasserting power and praying.\n");
 		BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
 		x = 0;
-		olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
+		olpc_ec_cmd(0x26, (unsigned char *)&x, 1, NULL, 0);
 		msleep(100);
 		is_powered_down = 1;
 		goto power_up;	/* argh, stupid hardware.. */
@@ -219,7 +219,7 @@ static void dcon_sleep(struct dcon_priv *dcon, bool sleep)
 
 	if (sleep) {
 		x = 0;
-		x = olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
+		x = olpc_ec_cmd(0x26, (unsigned char *)&x, 1, NULL, 0);
 		if (x)
 			printk(KERN_WARNING "olpc-dcon:  unable to force dcon to power down: %d!\n",
 				x);
@@ -598,7 +598,7 @@ static int dcon_fb_notifier(struct notifier_block *self,
 	struct fb_event *evdata = data;
 	struct dcon_priv *dcon = container_of(self, struct dcon_priv,
 			fbevent_nb);
-	int *blank = (int *) evdata->data;
+	int *blank = (int *)evdata->data;
 	if (((event != FB_EVENT_BLANK) && (event != FB_EVENT_CONBLANK)) ||
 			dcon->ignore_fb_events)
 		return 0;
-- 
1.7.10


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


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

* Re: [PATCH 3/3] staging: olpc_dcon.c: Remove a few spaces between casts and variables
  2012-04-21 18:33 ` [PATCH 3/3] staging: olpc_dcon.c: Remove a few spaces between casts and variables Jesper Juhl
@ 2012-04-21 20:28   ` Dan Carpenter
  2012-04-21 20:41     ` Jesper Juhl
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2012-04-21 20:28 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: linux-kernel, Valentin Rothberg, devel, Greg Kroah-Hartman,
	Jon Nettleton, Wolfram Sang, Jordan Crouse, Paul Gortmaker,
	Andres Salomon, Chris Ball, David Woodhouse

On Sat, Apr 21, 2012 at 08:33:15PM +0200, Jesper Juhl wrote:
> Just a trivial style cleanup.
> 
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> ---
>  drivers/staging/olpc_dcon/olpc_dcon.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
> index 7fe6eb6..992275c 100644
> --- a/drivers/staging/olpc_dcon/olpc_dcon.c
> +++ b/drivers/staging/olpc_dcon/olpc_dcon.c
> @@ -134,7 +134,7 @@ static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down)
>  power_up:
>  	if (is_powered_down) {
>  		x = 1;
> -		x = olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
> +		x = olpc_ec_cmd(0x26, (unsigned char *)&x, 1, NULL, 0);
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This will only work on little endian systems btw.  On big endian
systems the first byte is going to be 0x00 instead of 0x01.

>  		if (x) {
>  			printk(KERN_WARNING "olpc-dcon:  unable to force dcon to power up: %d!\n",
>  				x);

regards,
dan carpenter

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

* Re: [PATCH 3/3] staging: olpc_dcon.c: Remove a few spaces between casts and variables
  2012-04-21 20:28   ` Dan Carpenter
@ 2012-04-21 20:41     ` Jesper Juhl
  2012-04-21 22:13       ` Dan Carpenter
  0 siblings, 1 reply; 8+ messages in thread
From: Jesper Juhl @ 2012-04-21 20:41 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: linux-kernel, Valentin Rothberg, devel, Greg Kroah-Hartman,
	Jon Nettleton, Wolfram Sang, Jordan Crouse, Paul Gortmaker,
	Andres Salomon, Chris Ball, David Woodhouse

On Sat, 21 Apr 2012, Dan Carpenter wrote:

> On Sat, Apr 21, 2012 at 08:33:15PM +0200, Jesper Juhl wrote:
> > Just a trivial style cleanup.
> > 
> > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > ---
> >  drivers/staging/olpc_dcon/olpc_dcon.c |    8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
> > index 7fe6eb6..992275c 100644
> > --- a/drivers/staging/olpc_dcon/olpc_dcon.c
> > +++ b/drivers/staging/olpc_dcon/olpc_dcon.c
> > @@ -134,7 +134,7 @@ static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down)
> >  power_up:
> >  	if (is_powered_down) {
> >  		x = 1;
> > -		x = olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
> > +		x = olpc_ec_cmd(0x26, (unsigned char *)&x, 1, NULL, 0);
>                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> This will only work on little endian systems btw.  On big endian
> systems the first byte is going to be 0x00 instead of 0x01.
> 
Thank you, Dan, for bothering to take a look at this trivial patch.

I hope we can agree that this issue is not affected by my trivial 
whitespace cleanup ;-)  So, would you be OK with just leaving the patch 
alone for Greg to merge along with the others and then address this issue 
in a separate patch later?


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


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

* Re: [PATCH 3/3] staging: olpc_dcon.c: Remove a few spaces between casts and variables
  2012-04-21 20:41     ` Jesper Juhl
@ 2012-04-21 22:13       ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2012-04-21 22:13 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: linux-kernel, Valentin Rothberg, devel, Greg Kroah-Hartman,
	Jon Nettleton, Wolfram Sang, Jordan Crouse, Paul Gortmaker,
	Andres Salomon, Chris Ball, David Woodhouse

On Sat, Apr 21, 2012 at 10:41:00PM +0200, Jesper Juhl wrote:
> On Sat, 21 Apr 2012, Dan Carpenter wrote:
> 
> > On Sat, Apr 21, 2012 at 08:33:15PM +0200, Jesper Juhl wrote:
> > > Just a trivial style cleanup.
> > > 
> > > Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> > > ---
> > >  drivers/staging/olpc_dcon/olpc_dcon.c |    8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
> > > index 7fe6eb6..992275c 100644
> > > --- a/drivers/staging/olpc_dcon/olpc_dcon.c
> > > +++ b/drivers/staging/olpc_dcon/olpc_dcon.c
> > > @@ -134,7 +134,7 @@ static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down)
> > >  power_up:
> > >  	if (is_powered_down) {
> > >  		x = 1;
> > > -		x = olpc_ec_cmd(0x26, (unsigned char *) &x, 1, NULL, 0);
> > > +		x = olpc_ec_cmd(0x26, (unsigned char *)&x, 1, NULL, 0);
> >                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > This will only work on little endian systems btw.  On big endian
> > systems the first byte is going to be 0x00 instead of 0x01.
> > 
> Thank you, Dan, for bothering to take a look at this trivial patch.
> 

Trivial patches are the easiest to review.  ;)

> I hope we can agree that this issue is not affected by my trivial 
> whitespace cleanup ;-)  So, would you be OK with just leaving the patch 
> alone for Greg to merge along with the others and then address this issue 
> in a separate patch later?
> 

Sure.  That's not a problem.

regards,
dan carpenter

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

* Re: [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups
  2012-04-21 18:32 [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups Jesper Juhl
                   ` (2 preceding siblings ...)
  2012-04-21 18:33 ` [PATCH 3/3] staging: olpc_dcon.c: Remove a few spaces between casts and variables Jesper Juhl
@ 2012-04-21 23:15 ` Andres Salomon
  3 siblings, 0 replies; 8+ messages in thread
From: Andres Salomon @ 2012-04-21 23:15 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: linux-kernel, David Woodhouse, Jordan Crouse, Chris Ball,
	Jon Nettleton, Greg Kroah-Hartman, Valentin Rothberg,
	Wolfram Sang, Paul Gortmaker, devel

These all look fine to me, feel free to add my Acked-by to all of
them.  Thanks for doing this!


On Sat, 21 Apr 2012 20:32:36 +0200 (CEST)
Jesper Juhl <jj@chaosbits.net> wrote:

> Hi
> 
> Greg KH asked that these changes, which I had originally put in a
> single patch, be submitted as individual patches with just a single
> change per patch. So here goes.
> 
> The 3 patches - submitted as replies to this email are:
> 
> 

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

end of thread, other threads:[~2012-04-21 23:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-21 18:32 [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups Jesper Juhl
2012-04-21 18:32 ` [PATCH 1/3] staging: olpc_dcon.c: strings printed with printk() put on a single line Jesper Juhl
2012-04-21 18:33 ` [PATCH 2/3] staging: olpc_dcon.c: Add missing level to a printk() Jesper Juhl
2012-04-21 18:33 ` [PATCH 3/3] staging: olpc_dcon.c: Remove a few spaces between casts and variables Jesper Juhl
2012-04-21 20:28   ` Dan Carpenter
2012-04-21 20:41     ` Jesper Juhl
2012-04-21 22:13       ` Dan Carpenter
2012-04-21 23:15 ` [PATCH 0/3] staging: olpc_dcon.c: checkpatch.pl and style fixups Andres Salomon

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.