Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1560332 > unrolled thread

[PATCH] staging: fsl-mc: fix coding stye errors

Started byDhananjay Balan <dhananjay@cliqz.com>
First post2017-01-17 09:20 +0100
Last post2017-01-18 18:30 +0100
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: fsl-mc: fix coding stye errors Dhananjay Balan <dhananjay@cliqz.com> - 2017-01-17 09:20 +0100
    Re: [PATCH] staging: fsl-mc: fix coding stye errors Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-17 09:30 +0100
      Re: [PATCH] staging: fsl-mc: fix coding stye errors Joe Perches <joe@perches.com> - 2017-01-17 09:50 +0100
        Re: [PATCH] staging: fsl-mc: fix coding stye errors Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-17 11:10 +0100
          [PATCH v2] staging: fsl-mc: fix coding stye errors Dhananjay Balan <dhananjay@cliqz.com> - 2017-01-18 12:00 +0100
            Re: [PATCH v2] staging: fsl-mc: fix coding stye errors Greg KH <gregkh@linuxfoundation.org> - 2017-01-18 12:30 +0100
            Re: [PATCH v2] staging: fsl-mc: fix coding stye errors Greg KH <gregkh@linuxfoundation.org> - 2017-01-18 18:30 +0100

#1560332 — [PATCH] staging: fsl-mc: fix coding stye errors

FromDhananjay Balan <dhananjay@cliqz.com>
Date2017-01-17 09:20 +0100
Subject[PATCH] staging: fsl-mc: fix coding stye errors
Message-ID<t0x9M-4At-21@gated-at.bofh.it>
Split line at boolean operator.

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

Signed-off-by: Dhananjay Balan <dhananjay@cliqz.com>
---
 drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
index 6b1cd57..6b19a21 100644
--- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
+++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
@@ -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);
 	}
-- 
2.7.4

[toc] | [next] | [standalone]


#1560343

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-01-17 09:30 +0100
Message-ID<t0xjs-4DL-21@gated-at.bofh.it>
In reply to#1560332
On Tue, Jan 17, 2017 at 09:11:28AM +0100, Dhananjay Balan wrote:
> Split line at boolean operator.
> 
> Error was reported by checkpatch.pl as
> WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'
> 
> Signed-off-by: Dhananjay Balan <dhananjay@cliqz.com>
> ---
>  drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
> index 6b1cd57..6b19a21 100644
> --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
> +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
> @@ -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

[toc] | [prev] | [next] | [standalone]


#1560352

FromJoe Perches <joe@perches.com>
Date2017-01-17 09:50 +0100
Message-ID<t0xCN-4Kt-1@gated-at.bofh.it>
In reply to#1560343
On Tue, 2017-01-17 at 11:27 +0300, Dan Carpenter wrote:
> On Tue, Jan 17, 2017 at 09:11:28AM +0100, Dhananjay Balan wrote:
> > Split line at boolean operator.
> > 
> > Error was reported by checkpatch.pl as
> > WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'
[]
> > diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
[]
> > @@ -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);

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.

[toc] | [prev] | [next] | [standalone]


#1560420

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-01-17 11:10 +0100
Message-ID<t0ySe-5M4-19@gated-at.bofh.it>
In reply to#1560352
On Tue, Jan 17, 2017 at 12:47:30AM -0800, Joe Perches wrote:
> On Tue, 2017-01-17 at 11:27 +0300, Dan Carpenter wrote:
> > On Tue, Jan 17, 2017 at 09:11:28AM +0100, Dhananjay Balan wrote:
> > > Split line at boolean operator.
> > > 
> > > Error was reported by checkpatch.pl as
> > > WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'
> []
> > > diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
> []
> > > @@ -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);
> 
> 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.

> 		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

[toc] | [prev] | [next] | [standalone]


#1561477 — [PATCH v2] staging: fsl-mc: fix coding stye errors

FromDhananjay Balan <dhananjay@cliqz.com>
Date2017-01-18 12:00 +0100
Subject[PATCH v2] staging: fsl-mc: fix coding stye errors
Message-ID<t0W8a-2X3-13@gated-at.bofh.it>
In reply to#1560420
Split line at boolean operator.

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

Signed-off-by: Dhananjay Balan <dhananjay@cliqz.com>
---
 drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
index 6b1cd57..7a402eb 100644
--- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
+++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
@@ -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);
 	}
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1561627 — Re: [PATCH v2] staging: fsl-mc: fix coding stye errors

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-01-18 12:30 +0100
SubjectRe: [PATCH v2] staging: fsl-mc: fix coding stye errors
Message-ID<t0WBc-3tQ-29@gated-at.bofh.it>
In reply to#1561477
On Wed, Jan 18, 2017 at 11:53:07AM +0100, Dhananjay Balan wrote:
> Split line at boolean operator.
> 
> Error was reported by checkpatch.pl as
> WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'
> 
> Signed-off-by: Dhananjay Balan <dhananjay@cliqz.com>
> ---
>  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

[toc] | [prev] | [next] | [standalone]


#1561980 — Re: [PATCH v2] staging: fsl-mc: fix coding stye errors

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-01-18 18:30 +0100
SubjectRe: [PATCH v2] staging: fsl-mc: fix coding stye errors
Message-ID<t12dz-6VI-1@gated-at.bofh.it>
In reply to#1561477
On Wed, Jan 18, 2017 at 11:53:07AM +0100, Dhananjay Balan wrote:
> Split line at boolean operator.
> 
> Error was reported by checkpatch.pl as
> WARNING: Avoid multiple line dereference - prefer 'mc_msi_domain->host_data'
> 
> Signed-off-by: Dhananjay Balan <dhananjay@cliqz.com>
> ---
>  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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web