linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] treewide: Fix format strings that misuse continuations
@ 2010-01-31 20:02 Joe Perches
  2010-01-31 20:02 ` [PATCH 01/10] arch/powerpc: Fix continuation line formats Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2010-01-31 20:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: alsa-devel, Greg Kroah-Hartman, Christoph Lameter, Takashi Iwai,
	Jaroslav Kysela, linux-ide, James E.J. Bottomley, Paul Mackerras,
	Sonic Zhang, devel, linux-scsi, linuxppc-dev, Mike Frysinger,
	Pekka Enberg, Matt Mackall, Liam Girdwood, linux-mm, netdev,
	Mark Brown, uclinux-dist-devel, David S. Miller

Format strings that are continued with \ are frequently misused.
Change them to use mostly single line formats, some longer than 80 chars.
Fix a few miscellaneous typos at the same time.

Joe Perches (10):
  arch/powerpc: Fix continuation line formats
  arch/blackfin: Fix continuation line formats
  drivers/ide: Fix continuation line formats
  drivers/serial/bfin_5xx.c: Fix continuation line formats
  drivers/scsi/arcmsr: Fix continuation line formats
  drivers/staging: Fix continuation line formats
  drivers/net/amd8111e.c: Fix continuation line formats
  fs/proc/array.c: Fix continuation line formats
  mm/slab.c: Fix continuation line formats
  sound/soc/blackfin: Fix continuation line formats

 arch/blackfin/mach-common/smp.c                    |    4 +-
 arch/powerpc/kernel/nvram_64.c                     |    6 +-
 arch/powerpc/platforms/pseries/hotplug-cpu.c       |    8 ++--
 arch/powerpc/platforms/pseries/smp.c               |    4 +-
 drivers/ide/au1xxx-ide.c                           |    4 +-
 drivers/ide/pmac.c                                 |    4 +-
 drivers/net/amd8111e.c                             |    3 +-
 drivers/scsi/arcmsr/arcmsr_hba.c                   |   49 +++++++++----------
 drivers/serial/bfin_5xx.c                          |    6 +--
 drivers/staging/dream/qdsp5/audio_mp3.c            |    3 +-
 .../rtl8187se/ieee80211/ieee80211_softmac_wx.c     |    3 +-
 drivers/staging/rtl8187se/r8180_core.c             |    3 +-
 drivers/staging/sep/sep_driver.c                   |    3 +-
 fs/proc/array.c                                    |    7 ++-
 mm/slab.c                                          |    4 +-
 sound/soc/blackfin/bf5xx-ac97-pcm.c                |    8 +--
 sound/soc/blackfin/bf5xx-i2s-pcm.c                 |    3 +-
 sound/soc/blackfin/bf5xx-tdm-pcm.c                 |    3 +-
 18 files changed, 55 insertions(+), 70 deletions(-)

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

* [PATCH 01/10] arch/powerpc: Fix continuation line formats
  2010-01-31 20:02 [PATCH 00/10] treewide: Fix format strings that misuse continuations Joe Perches
@ 2010-01-31 20:02 ` Joe Perches
  2010-02-01  2:16   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2010-01-31 20:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Paul Mackerras, linuxppc-dev

String constants that are continued on subsequent lines with \
are not good.

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/powerpc/kernel/nvram_64.c               |    6 +++---
 arch/powerpc/platforms/pseries/hotplug-cpu.c |    8 ++++----
 arch/powerpc/platforms/pseries/smp.c         |    4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index ad461e7..9cf197f 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -338,8 +338,8 @@ static int __init nvram_create_os_partition(void)
 
 	rc = nvram_write_header(new_part);
 	if (rc <= 0) {
-		printk(KERN_ERR "nvram_create_os_partition: nvram_write_header \
-				failed (%d)\n", rc);
+		printk(KERN_ERR "nvram_create_os_partition: nvram_write_header "
+				"failed (%d)\n", rc);
 		return rc;
 	}
 
@@ -349,7 +349,7 @@ static int __init nvram_create_os_partition(void)
 	rc = ppc_md.nvram_write((char *)&seq_init, sizeof(seq_init), &tmp_index);
 	if (rc <= 0) {
 		printk(KERN_ERR "nvram_create_os_partition: nvram_write "
-				"failed (%d)\n", rc);
+		       "failed (%d)\n", rc);
 		return rc;
 	}
 	
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 6ea4698..a70de10 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -397,12 +397,12 @@ static int parse_cede_parameters(void)
 				CEDE_LATENCY_PARAM_MAX_LENGTH);
 
 	if (call_status != 0)
-		printk(KERN_INFO "CEDE_LATENCY: \
-			%s %s Error calling get-system-parameter(0x%x)\n",
+		printk(KERN_INFO "CEDE_LATENCY: "
+			"%s %s Error calling get-system-parameter(0x%x)\n",
 			__FILE__, __func__, call_status);
 	else
-		printk(KERN_INFO "CEDE_LATENCY: \
-			get-system-parameter successful.\n");
+		printk(KERN_INFO "CEDE_LATENCY: "
+			"get-system-parameter successful.\n");
 
 	return call_status;
 }
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index b488663..4e7f89a 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -144,8 +144,8 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
 		hcpuid = get_hard_smp_processor_id(nr);
 		rc = plpar_hcall_norets(H_PROD, hcpuid);
 		if (rc != H_SUCCESS)
-			printk(KERN_ERR "Error: Prod to wake up processor %d\
-						Ret= %ld\n", nr, rc);
+			printk(KERN_ERR "Error: Prod to wake up processor %d "
+						"Ret= %ld\n", nr, rc);
 	}
 }
 
-- 
1.6.6.rc0.57.gad7a

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

* Re: [PATCH 01/10] arch/powerpc: Fix continuation line formats
  2010-01-31 20:02 ` [PATCH 01/10] arch/powerpc: Fix continuation line formats Joe Perches
@ 2010-02-01  2:16   ` Benjamin Herrenschmidt
  2010-02-01 18:30     ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-01  2:16 UTC (permalink / raw)
  To: Joe Perches; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel

On Sun, 2010-01-31 at 12:02 -0800, Joe Perches wrote:
> String constants that are continued on subsequent lines with \
> are not good.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

You want me to take that in the powerpc tree ?

A minor glitch below tho...

> ---
>  arch/powerpc/kernel/nvram_64.c               |    6 +++---
>  arch/powerpc/platforms/pseries/hotplug-cpu.c |    8 ++++----
>  arch/powerpc/platforms/pseries/smp.c         |    4 ++--
>  3 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
> index ad461e7..9cf197f 100644
> --- a/arch/powerpc/kernel/nvram_64.c
> +++ b/arch/powerpc/kernel/nvram_64.c
> @@ -338,8 +338,8 @@ static int __init nvram_create_os_partition(void)
>  
>  	rc = nvram_write_header(new_part);
>  	if (rc <= 0) {
> -		printk(KERN_ERR "nvram_create_os_partition: nvram_write_header \
> -				failed (%d)\n", rc);
> +		printk(KERN_ERR "nvram_create_os_partition: nvram_write_header "
> +				"failed (%d)\n", rc);
>  		return rc;
>  	}
>  
> @@ -349,7 +349,7 @@ static int __init nvram_create_os_partition(void)
>  	rc = ppc_md.nvram_write((char *)&seq_init, sizeof(seq_init), &tmp_index);
>  	if (rc <= 0) {
>  		printk(KERN_ERR "nvram_create_os_partition: nvram_write "
> -				"failed (%d)\n", rc);
> +		       "failed (%d)\n", rc);
>  		return rc;
>  	}

The above is objectionable :-)

>  	
> diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> index 6ea4698..a70de10 100644
> --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
> +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
> @@ -397,12 +397,12 @@ static int parse_cede_parameters(void)
>  				CEDE_LATENCY_PARAM_MAX_LENGTH);
>  
>  	if (call_status != 0)
> -		printk(KERN_INFO "CEDE_LATENCY: \
> -			%s %s Error calling get-system-parameter(0x%x)\n",
> +		printk(KERN_INFO "CEDE_LATENCY: "
> +			"%s %s Error calling get-system-parameter(0x%x)\n",
>  			__FILE__, __func__, call_status);
>  	else
> -		printk(KERN_INFO "CEDE_LATENCY: \
> -			get-system-parameter successful.\n");
> +		printk(KERN_INFO "CEDE_LATENCY: "
> +			"get-system-parameter successful.\n");
>  
>  	return call_status;
>  }
> diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
> index b488663..4e7f89a 100644
> --- a/arch/powerpc/platforms/pseries/smp.c
> +++ b/arch/powerpc/platforms/pseries/smp.c
> @@ -144,8 +144,8 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
>  		hcpuid = get_hard_smp_processor_id(nr);
>  		rc = plpar_hcall_norets(H_PROD, hcpuid);
>  		if (rc != H_SUCCESS)
> -			printk(KERN_ERR "Error: Prod to wake up processor %d\
> -						Ret= %ld\n", nr, rc);
> +			printk(KERN_ERR "Error: Prod to wake up processor %d "
> +						"Ret= %ld\n", nr, rc);
>  	}
>  }
>  

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

* Re: [PATCH 01/10] arch/powerpc: Fix continuation line formats
  2010-02-01  2:16   ` Benjamin Herrenschmidt
@ 2010-02-01 18:30     ` Joe Perches
  2010-02-08  3:46       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2010-02-01 18:30 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel

On Mon, 2010-02-01 at 13:16 +1100, Benjamin Herrenschmidt wrote:
> On Sun, 2010-01-31 at 12:02 -0800, Joe Perches wrote:
> > String constants that are continued on subsequent lines with \
> > are not good.
> > Signed-off-by: Joe Perches <joe@perches.com>
> You want me to take that in the powerpc tree ?

Yes please.

> A minor glitch below tho...
> > @@ -349,7 +349,7 @@ static int __init nvram_create_os_partition(void)
> >  	rc = ppc_md.nvram_write((char *)&seq_init, sizeof(seq_init), &tmp_index);
> >  	if (rc <= 0) {
> >  		printk(KERN_ERR "nvram_create_os_partition: nvram_write "
> > -				"failed (%d)\n", rc);
> > +		       "failed (%d)\n", rc);
> >  		return rc;
> >  	}
> 
> The above is objectionable :-)

Can you drop that section or do you need another patch?

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

* Re: [PATCH 01/10] arch/powerpc: Fix continuation line formats
  2010-02-01 18:30     ` Joe Perches
@ 2010-02-08  3:46       ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-08  3:46 UTC (permalink / raw)
  To: Joe Perches; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel

On Mon, 2010-02-01 at 10:30 -0800, Joe Perches wrote:
> On Mon, 2010-02-01 at 13:16 +1100, Benjamin Herrenschmidt wrote:
> > On Sun, 2010-01-31 at 12:02 -0800, Joe Perches wrote:
> > > String constants that are continued on subsequent lines with \
> > > are not good.
> > > Signed-off-by: Joe Perches <joe@perches.com>
> > You want me to take that in the powerpc tree ?
> 
> Yes please.
> 
> > A minor glitch below tho...
> > > @@ -349,7 +349,7 @@ static int __init nvram_create_os_partition(void)
> > >  	rc = ppc_md.nvram_write((char *)&seq_init, sizeof(seq_init), &tmp_index);
> > >  	if (rc <= 0) {
> > >  		printk(KERN_ERR "nvram_create_os_partition: nvram_write "
> > > -				"failed (%d)\n", rc);
> > > +		       "failed (%d)\n", rc);
> > >  		return rc;
> > >  	}
> > 
> > The above is objectionable :-)
> 
> Can you drop that section or do you need another patch?

I'll sort it out. Thanks.

Cheers,
Ben.

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

end of thread, other threads:[~2010-02-08  3:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-31 20:02 [PATCH 00/10] treewide: Fix format strings that misuse continuations Joe Perches
2010-01-31 20:02 ` [PATCH 01/10] arch/powerpc: Fix continuation line formats Joe Perches
2010-02-01  2:16   ` Benjamin Herrenschmidt
2010-02-01 18:30     ` Joe Perches
2010-02-08  3:46       ` Benjamin Herrenschmidt

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).