public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: jacopo mondi <jacopo@jmondi.org>
To: "Riccardo S." <sirmy15@gmail.com>
Cc: alan@linux.intel.com, gregkh@linuxfoundation.org,
	linux-media@vger.kernel.org
Subject: Re: [PATCH 0/4] fix some checkpatch style issues in atomisp driver
Date: Wed, 29 Nov 2017 11:09:23 +0100	[thread overview]
Message-ID: <20171129100923.GB17767@w540> (raw)
In-Reply-To: <20171129093117.GB58504@rschirone-mbp.local>

Hello Riccardo,

On Wed, Nov 29, 2017 at 10:31:17AM +0100, Riccardo S. wrote:
> Hi Jacopo,
>
> for some reason your comment about "[PATCH 3/4] staging: improves
> comparisons readability in atomisp-ov5693" did not reach my inbox.
>
> Unfortunately I already sent PATCHv2 and it has been accepted.
> Anyway...

No worries!

>
> > > @@ -780,7 +780,7 @@ static int __ov5693_otp_read(struct v4l2_subdev *sd, u8 *buf)
> > >  				b = buf;
> > >  				continue;
> > >  			}
> > > -		} else if (27 == i) {		//if the prvious 32bytes data doesn't exist, try to read the next 32bytes data again.
> > > +		} else if (i == 27) {		//if the prvious 32bytes data doesn't exist, try to read the next 32bytes data again.
> >
> > I wonder why checkpatch does not complain about these C++ style
> > comments clearly exceeding 80 columns...
> >
>
> It complained, but I didn't put that fix in this series. Should I have
> cleaned those lines in the same commit since I was already touching
> that part of the code? Or better in a separate patch?

As you wish.. This is a cleanup series, and fixing comments is
really a minor issues, so if you like to change them in this single
patch you can do that, imo, and mention it in the commit message:
"Fix C++ style comments exceeding 80 columns while at there."
or similar.

>
> > >  			if ((*b) == 0) {
> > >  				dev->otp_size = 32;
> > >  				break;
> > > @@ -1351,7 +1351,7 @@ static int __power_up(struct v4l2_subdev *sd)
> > >  	struct i2c_client *client = v4l2_get_subdevdata(sd);
> > >  	int ret;
> > >
> > > -	if (NULL == dev->platform_data) {
> > > +	if (!dev->platform_data) {
>
> > Please mention in changelog that you're also substituting a comparison to
> > NULL with this.
> >
> > Checkpatch points this out, didn't it?
>
> It actually warned about the comparison that should place the constant
> on the right side of the test. When fixing this, I used the "!foo"
> syntax. I got your point though.

Oh, ok, I thought it gave you back a different warning for
comparisons with NULL!

>
> Thanks for your review!

You're welcome!

Cheers
   j

>
>
> Riccardo Schirone

      reply	other threads:[~2017-11-29 10:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 21:44 [PATCH 0/4] fix some checkpatch style issues in atomisp driver Riccardo Schirone
2017-11-27 21:44 ` [PATCH 1/4] staging: add missing blank line after declarations in atomisp-ov5693 Riccardo Schirone
2017-11-28  9:53   ` jacopo mondi
2017-11-28 10:36     ` Riccardo S.
2017-11-27 21:44 ` [PATCH 2/4] staging: improve comments usage " Riccardo Schirone
2017-11-27 21:44 ` [PATCH 3/4] staging: improves comparisons readability " Riccardo Schirone
2017-11-28  9:51   ` jacopo mondi
2017-11-27 21:44 ` [PATCH 4/4] staging: fix indentation " Riccardo Schirone
2017-11-28 20:40 ` [PATCHv2 0/4] fix some checkpatch style issues in atomisp driver Riccardo Schirone
2017-11-28 20:40   ` [PATCHv2 1/4] staging: add missing blank line after declarations in atomisp-ov5693 Riccardo Schirone
2017-11-28 20:40   ` [PATCHv2 2/4] staging: improve comments usage " Riccardo Schirone
2017-11-28 20:40   ` [PATCHv2 3/4] staging: improves comparisons readability " Riccardo Schirone
2017-11-28 20:40   ` [PATCHv2 4/4] staging: fix indentation " Riccardo Schirone
2017-11-29  8:40   ` [PATCHv2 0/4] fix some checkpatch style issues in atomisp driver Sakari Ailus
2017-11-29  9:07     ` Riccardo S.
2017-11-29  9:31 ` [PATCH " Riccardo S.
2017-11-29 10:09   ` jacopo mondi [this message]

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=20171129100923.GB17767@w540 \
    --to=jacopo@jmondi.org \
    --cc=alan@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sirmy15@gmail.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