public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Hans Verkuil" <hans.verkuil@cisco.com>
Subject: Re: [PATCH 2/2] v4l: vsp1: Add HGT support
Date: Mon, 05 Sep 2016 21:24:51 +0300	[thread overview]
Message-ID: <2200910.O8YNAjPdlI@avalon> (raw)
In-Reply-To: <CAMuHMdXLS6FpZB0CkAvO2_oMUCv1q2Lxps2vMp4Ghu43bVQp9w@mail.gmail.com>

On Monday 05 Sep 2016 17:57:11 Geert Uytterhoeven wrote:
> On Mon, Sep 5, 2016 at 5:43 PM, Laurent Pinchart wrote:
> >> +     for (n = 0; n < 6; n++)
> > 
> > Nitpicking, the driver uses pre-increment in for loops (++n), not post-
> > increment. This used to be a best-practice rule in C++, where
> > pre-increment can be faster for non-native types (see
> > http://antonym.org/2008/05/stl-iterators-and-performance.html for
> > instance). I'm not sure if that's still relevant, but I've taken the
> > habit of using the pre-increment operator in for loops, and that's what
> > the rest of this driver does. This comment applies to all other locations
> > in this file.
> 
> <surprised>
> Didn't know we used C++ and operator overloading in the kernel...
> </surprised>

Really ? Where were you when we decided to switch to C++ ? :-)

On a more serious note, as I've explained, the *style* comes from a best 
practice rule in C++. This obviously makes no difference whatsoever in C, nor 
does it in C++ for integer types, it's only a matter of consistency with the 
rest of the driver.

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2016-09-05 18:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 13:47 [PATCH 0/2] v4l: vsp1: Add HGT support Niklas Söderlund
2016-09-02 13:47 ` [PATCH 1/2] v4l: Define a pixel format for the R-Car VSP1 2-D histogram engine Niklas Söderlund
2016-09-05 13:05   ` Laurent Pinchart
2016-09-05 13:34     ` Niklas Söderlund
2016-09-02 13:47 ` [PATCH 2/2] v4l: vsp1: Add HGT support Niklas Söderlund
2016-09-05 15:43   ` Laurent Pinchart
2016-09-05 15:57     ` Geert Uytterhoeven
2016-09-05 18:24       ` Laurent Pinchart [this message]
2016-09-06  6:45     ` Niklas Söderlund

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=2200910.O8YNAjPdlI@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=corbet@lwn.net \
    --cc=geert@linux-m68k.org \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=sakari.ailus@linux.intel.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