From: jacopo mondi <jacopo@jmondi.org>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
laurent.pinchart@ideasonboard.com, hans.verkuil@cisco.com,
g.liakhovetski@gmx.de, bhumirks@gmail.com, joe@perches.com,
linux-media@vger.kernel.org
Subject: Re: [PATCH v2 01/11] media: tw9910: Re-order variables declaration
Date: Tue, 6 Mar 2018 17:57:15 +0100 [thread overview]
Message-ID: <20180306165715.GD19648@w540> (raw)
In-Reply-To: <20180306135152.3fed9766@vento.lan>
Hi Mauro,
On Tue, Mar 06, 2018 at 01:51:52PM -0300, Mauro Carvalho Chehab wrote:
> Em Fri, 2 Mar 2018 15:46:33 +0100
> Jacopo Mondi <jacopo+renesas@jmondi.org> escreveu:
>
> > Re-order variables declaration to respect 'reverse christmas tree'
> > ordering whenever possible.
>
> To be frank, I don't like the idea of reverse christmas tree ordering
> myself... Perhaps due to the time I used to program on assembler,
> where alignment issues could happen, I find a way more logic to order
> based on complexity and size of the argument...
>
> >
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> > ---
> > drivers/media/i2c/tw9910.c | 23 +++++++++++------------
> > 1 file changed, 11 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/media/i2c/tw9910.c b/drivers/media/i2c/tw9910.c
> > index cc648de..3a5e307 100644
> > --- a/drivers/media/i2c/tw9910.c
> > +++ b/drivers/media/i2c/tw9910.c
> > @@ -406,9 +406,9 @@ static void tw9910_reset(struct i2c_client *client)
> >
> > static int tw9910_power(struct i2c_client *client, int enable)
> > {
> > - int ret;
> > u8 acntl1;
> > u8 acntl2;
> > + int ret;
>
> ... So, in this case, the order is already the right one, according
> with my own criteria :-)
>
> There was some discussion about the order sometime ago at LKML:
>
> https://patchwork.kernel.org/patch/9411999/
>
> As I'm not seeing the proposed patch there at checkpatch, nor any
> comments about xmas tree at coding style, I think that there were no
> agreements about the ordering.
>
> So, while there's no consensus about that, let's keep it as-is.
Thanks for explaining. I was sure it was part of the coding style
rules! My bad, feel free to ditch this patch (same for ov772x ofc).
Thanks
j
>
> Regards,
> Mauro
next prev parent reply other threads:[~2018-03-06 16:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 14:46 [PATCH v2 00/11] media: ov772x/tw9910 cleanup Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 01/11] media: tw9910: Re-order variables declaration Jacopo Mondi
2018-03-06 16:51 ` Mauro Carvalho Chehab
2018-03-06 16:57 ` jacopo mondi [this message]
2018-03-06 17:03 ` Mauro Carvalho Chehab
2018-03-02 14:46 ` [PATCH v2 02/11] media: tw9910: Re-organize in-code comments Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 03/11] media: tw9910: Mixed style fixes Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 04/11] media: tw9910: Sort includes alphabetically Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 05/11] media: tw9910: Replace msleep(1) with usleep_range Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 06/11] media: ov772x: Align function parameters Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 07/11] media: ov772x: Re-organize in-code comments Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 08/11] media: ov772x: Empty line before end-of-function return Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 09/11] media: ov772x: Re-order variables declaration Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 10/11] media: ov772x: Replace msleep(1) with usleep_range Jacopo Mondi
2018-03-02 14:46 ` [PATCH v2 11/11] media: ov772x: Unregister async subdevice Jacopo Mondi
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=20180306165715.GD19648@w540 \
--to=jacopo@jmondi.org \
--cc=bhumirks@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=hans.verkuil@cisco.com \
--cc=jacopo+renesas@jmondi.org \
--cc=joe@perches.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@s-opensource.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