From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Jacopo Mondi <jacopo+renesas@jmondi.org>
Cc: 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 13:51:52 -0300 [thread overview]
Message-ID: <20180306135152.3fed9766@vento.lan> (raw)
In-Reply-To: <1520002003-10200-2-git-send-email-jacopo+renesas@jmondi.org>
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.
Regards,
Mauro
next prev parent reply other threads:[~2018-03-06 16:52 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 [this message]
2018-03-06 16:57 ` jacopo mondi
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=20180306135152.3fed9766@vento.lan \
--to=mchehab@s-opensource.com \
--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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.