From: Dan Carpenter <dan.carpenter@oracle.com>
To: Joe Perches <joe@perches.com>
Cc: Dhananjay Balan <dhananjay@cliqz.com>,
Stuart Yoder <stuart.yoder@nxp.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: fsl-mc: fix coding stye errors
Date: Tue, 17 Jan 2017 13:00:36 +0300 [thread overview]
Message-ID: <20170117095818.GH4104@mwanda> (raw)
In-Reply-To: <1484642850.9538.7.camel@perches.com>
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
next prev parent reply other threads:[~2017-01-17 10:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 8:11 [PATCH] staging: fsl-mc: fix coding stye errors Dhananjay Balan
2017-01-17 8:27 ` Dan Carpenter
2017-01-17 8:47 ` Joe Perches
2017-01-17 10:00 ` Dan Carpenter [this message]
2017-01-18 10:53 ` [PATCH v2] " Dhananjay Balan
2017-01-18 11:14 ` Greg KH
2017-01-18 17:20 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170117095818.GH4104@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=dhananjay@cliqz.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stuart.yoder@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).