Skip to contentSkip to conversation

arch/arm/plat-mxc/cpufreq.c: Fix line continuation defect

PATCH In review Joe Perches 3 participants 4 messages Nov 7, 2010 – Nov 8, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/arm/plat-mxc/cpufreq.c: Fix line continuation defect

---
 arch/arm/plat-mxc/cpufreq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-mxc/cpufreq.c +2 -2
index 039538e..9f358af 100644
@@ -154,8 +154,8 @@ static int __init mxc_cpufreq_init(struct cpufreq_policy *policy)
 	ret = cpufreq_frequency_table_cpuinfo(policy, imx_freq_table);
 
 	if (ret < 0) {
-		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq \
-				with error code %d\n", __func__, ret);
+		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq with error code %d\n",
+		       __func__, ret);
 		goto err;
 	}
 
#1 lore raw

Hi Joe,

Quoted 10 lines · Joe Perches
---
 arch/arm/plat-mxc/cpufreq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-mxc/cpufreq.c +0 -0
index 039538e..9f358af 100644

arch/arm/plat-mxc/cpufreq.c static int __init mxc_cpufreq_init(struct cpufreq_policy *policy) · line 158

Quoted 7 lines
arch/arm/plat-mxc/cpufreq.c +2 -2
@@ -154,8 +154,8 @@ static int __init mxc_cpufreq_init(struct cpufreq_policy *policy)
 	ret = cpufreq_frequency_table_cpuinfo(policy, imx_freq_table);
 
 	if (ret < 0) {
-		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq \
-				with error code %d\n", __func__, ret);
+		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq with error code %d\n",
+		       __func__, ret);

I'd prefer
+ printk(KERN_ERR "%s: failed to register i.MXC CPUfreq "
+ "with error code %d\n", __func__, ret);

(actually I'd consider

+ pr_err("failed to register i.MXC CPUfreq (error: %d)\n", ret)

even better, but this is out of scope for this patch, isn't it?)

Thanks
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#2 lore raw
Quoted 21 lines · Uwe Kleine-K?nig

Hi Joe,

Quoted 10 lines · Joe Perches
---
 arch/arm/plat-mxc/cpufreq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-mxc/cpufreq.c +0 -0
index 039538e..9f358af 100644

arch/arm/plat-mxc/cpufreq.c static int __init mxc_cpufreq_init(struct cpufreq_policy *policy) · line 158

Quoted 7 lines
arch/arm/plat-mxc/cpufreq.c +2 -2
@@ -154,8 +154,8 @@ static int __init mxc_cpufreq_init(struct cpufreq_policy *policy)
 	ret = cpufreq_frequency_table_cpuinfo(policy, imx_freq_table);
 
 	if (ret < 0) {
-		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq \
-				with error code %d\n", __func__, ret);
+		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq with error code %d\n",
+		       __func__, ret);

I'd prefer

Review

Quoted 2 lines
(quoted diff) +2 -0
+		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq "
+				"with error code %d\n", __func__, ret);

No - you don't wrap error messages. It's the one exception to the 80 column rule.

#3 lore raw
In reply to Uwe Kleine-König
Quoted 2 lines · Uwe Kleine-K?nig

arch/arm/plat-mxc/cpufreq.c

Quoted 1 line · Joe Perches
arch/arm/plat-mxc/cpufreq.c +0 -0

[]

Quoted 10 lines

arch/arm/plat-mxc/cpufreq.c static int __init mxc_cpufreq_init(struct cpufreq_policy *policy) · line 158

Quoted 4 lines
arch/arm/plat-mxc/cpufreq.c +2 -2
-		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq \
-				with error code %d\n", __func__, ret);
+		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq with error code %d\n",
+		       __func__, ret);

I'd prefer

(quoted diff) +2 -0
+		printk(KERN_ERR "%s: failed to register i.MXC CPUfreq "
+				"with error code %d\n", __func__, ret);

(actually I'd consider

(quoted diff) +1 -0
+		pr_err("failed to register i.MXC CPUfreq (error: %d)\n", ret)

even better, but this is out of scope for this patch, isn't it?)

Yes, it's out of scope.

I do have a perl & emacs script that converts printk(KERN_<level> to pr_<level>, coalesces formats, and wraps/aligns arguments.

It's around 2K lines of changes though for arch/arm.

Anyone want that all at once or by platform by platform?