Skip to contentSkip to conversation

staging: fsl-mc: fix coding stye errors

PATCH Superseded Dhananjay Balan 4 participants 7 messages Jan 17, 2017 – Jan 18, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fsl-mc: fix coding stye errors

Split line at boolean operator.

Error was reported by checkpatch.pl as
WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'

---
 drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +2 -2
index 6b1cd57..6b19a21 100644
@@ -94,8 +94,8 @@ int __init its_fsl_mc_msi_init(void)
 			continue;
 		}
 
-		WARN_ON(mc_msi_domain->
-				host_data != &its_fsl_mc_msi_domain_info);
+		WARN_ON(mc_msi_domain->host_data !=
+						&its_fsl_mc_msi_domain_info);
 
 		pr_info("fsl-mc MSI: %s domain created\n", np->full_name);
 	}
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · Dhananjay Balan

Split line at boolean operator.

Error was reported by checkpatch.pl as
WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'

---
 drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +0 -0
index 6b1cd57..6b19a21 100644

drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c int __init its_fsl_mc_msi_init(void) · line 98

Quoted 7 lines
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +2 -2
@@ -94,8 +94,8 @@ int __init its_fsl_mc_msi_init(void)
 			continue;
 		}
 
-		WARN_ON(mc_msi_domain->
-				host_data != &its_fsl_mc_msi_domain_info);
+		WARN_ON(mc_msi_domain->host_data !=
+						&its_fsl_mc_msi_domain_info);

Better to line it up like this:

		WARN_ON(mc_msi_domain->host_data !=
			&its_fsl_mc_msi_domain_info);

regards,
dan carpenter

#2 lore raw
Quoted 5 lines · Dan Carpenter
Quoted 4 lines · Dhananjay Balan

Split line at boolean operator.

Error was reported by checkpatch.pl as
WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'

[]

Quoted 1 line

drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c

Quoted 1 line
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +0 -0

[]

Quoted 11 lines

drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c int __init its_fsl_mc_msi_init(void) · line 98

Quoted 8 lines
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +2 -2
@@ -94,8 +94,8 @@ int __init its_fsl_mc_msi_init(void)
 			continue;
 		}
 
-		WARN_ON(mc_msi_domain->
-				host_data != &its_fsl_mc_msi_domain_info);
+		WARN_ON(mc_msi_domain->host_data !=
+						&its_fsl_mc_msi_domain_info);

Better to line it up like this:

Quoted 2 lines
		WARN_ON(mc_msi_domain->host_data !=
			&its_fsl_mc_msi_domain_info);

At 81 chars, it might be better on a single line instead.

		WARN_ON(mc_msi_domain->host_data != &its_fsl_mc_msi_domain_info);

It also might be better to shorten some of the identifiers.

#3 lore raw
Quoted 20 lines · Joe Perches
Quoted 5 lines · Dan Carpenter
Quoted 4 lines · Dhananjay Balan

Split line at boolean operator.

Error was reported by checkpatch.pl as
WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'

[]

Quoted 1 line

drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c

Quoted 1 line
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +0 -0

[]

Quoted 11 lines

drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c int __init its_fsl_mc_msi_init(void) · line 98

Quoted 8 lines
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +2 -2
@@ -94,8 +94,8 @@ int __init its_fsl_mc_msi_init(void)
 			continue;
 		}
 
-		WARN_ON(mc_msi_domain->
-				host_data != &its_fsl_mc_msi_domain_info);
+		WARN_ON(mc_msi_domain->host_data !=
+						&its_fsl_mc_msi_domain_info);

Better to line it up like this:

Quoted 5 lines
Quoted 2 lines
		WARN_ON(mc_msi_domain->host_data !=
			&its_fsl_mc_msi_domain_info);

At 81 chars, it might be better on a single line instead.

Yeah. Except you can't fight checkpatch.pl... In the long run it will just wear you down for no good reason.

Quoted 3 lines
		WARN_ON(mc_msi_domain->host_data != &its_fsl_mc_msi_domain_info);

It also might be better to shorten some of the identifiers.

Yeah. Shorter names are a great idea. This driver went a bit crazy with all the prefixes. It's a static variable.

regards,
dan carpenter

#4 lore raw

PATCH v2 1/1 staging: fsl-mc: fix coding stye errors

Split line at boolean operator.

Error was reported by checkpatch.pl as
WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'

---
 drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +2 -2
index 6b1cd57..7a402eb 100644
@@ -94,8 +94,8 @@ int __init its_fsl_mc_msi_init(void)
 			continue;
 		}
 
-		WARN_ON(mc_msi_domain->
-				host_data != &its_fsl_mc_msi_domain_info);
+		WARN_ON(mc_msi_domain->host_data !=
+			&its_fsl_mc_msi_domain_info);
 
 		pr_info("fsl-mc MSI: %s domain created\n", np->full_name);
 	}
Signature · 1 line
2.7.4
maintainer
#5 lore raw
Quoted 9 lines · Dhananjay Balan

Split line at boolean operator.

Error was reported by checkpatch.pl as
WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'

---
 drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

What changed from v1? Always put that information below the --- line.

Please try again with v3.

thanks,

greg k-h

maintainer
#6 lore raw
In reply to Dhananjay Balan
Quoted 9 lines · Dhananjay Balan

Split line at boolean operator.

Error was reported by checkpatch.pl as
WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'

---
 drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

What changed in v2? That has to go below the --- line. Please fix it up and resend v3 with that information and read Documentation/SubmittingPatches for all of the details about this.

thanks,

greg k-h