From: Ian Campbell <ijc@hellion.org.uk>
To: linux-sunxi@googlegroups.com
Cc: linux-arm-kernel@lists.infradead.org,
Emilio Lopez <emilio@elopez.com.ar>,
kevin.z.m.zh@gmail.com, sunny@allwinnertech.com,
shuge@allwinnertech.com, linux-kernel@vger.kernel.org,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [linux-sunxi] [PATCH 04/10] pinctrl: sunxi: Wrap long compatible declaration lines
Date: Tue, 30 Jul 2013 16:09:13 +0100 [thread overview]
Message-ID: <1375196953.32691.61.camel@kazak.uk.xensource.com> (raw)
In-Reply-To: <1375196394-21138-5-git-send-email-maxime.ripard@free-electrons.com>
On Tue, 2013-07-30 at 16:59 +0200, Maxime Ripard wrote:
> The compatible declaration and their associated data are exceeding the
> 80-characters width limit.
>
> Split these lines to make them more readable and fit in the kernel
> coding guidelines.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/pinctrl/pinctrl-sunxi.c | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c
> index 5985e60..246310b 100644
> --- a/drivers/pinctrl/pinctrl-sunxi.c
> +++ b/drivers/pinctrl/pinctrl-sunxi.c
> @@ -628,10 +628,22 @@ static void sunxi_pinctrl_irq_handler(unsigned irq, struct irq_desc *desc)
> }
>
> static struct of_device_id sunxi_pinctrl_match[] = {
> - { .compatible = "allwinner,sun4i-a10-pinctrl", .data = (void *)&sun4i_a10_pinctrl_data },
> - { .compatible = "allwinner,sun5i-a10s-pinctrl", .data = (void *)&sun5i_a10s_pinctrl_data },
> - { .compatible = "allwinner,sun5i-a13-pinctrl", .data = (void *)&sun5i_a13_pinctrl_data },
> - { .compatible = "allwinner,sun6i-a31-pinctrl", .data = (void *)&sun6i_a31_pinctrl_data },
> + {
> + .compatible = "allwinner,sun4i-a10-pinctrl",
> + .data = (void *)&sun4i_a10_pinctrl_data,
> + },
I'm not sure this is actually an improvement, the original reads quite
naturally even if it is a little long. What about a #define such that
you can write:
COMPAT("allwinner,sun4i-a10-pinctrl", sun4i_a10_pinctrl_data),
and thereby stay within 80-chars?
If you wanted to go overboard you could code the macro such that:
SUNXI_COMPAT(sun4i,a10),
expanded to what you want, that's pretty obfuscated though.
Ian.
next prev parent reply other threads:[~2013-07-30 15:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 14:59 [PATCH 00/10] Introduce Allwinner A20 support Maxime Ripard
2013-07-30 14:59 ` [PATCH 01/10] ARM: sunxi: " Maxime Ripard
2013-07-30 14:59 ` [PATCH 02/10] ARM: sun7i: Add Allwinner A20 DTSI Maxime Ripard
2013-07-30 14:59 ` [PATCH 03/10] ARM: sun7i: Add Olimex A20-Olinuxino-Micro support Maxime Ripard
2013-07-30 14:59 ` [PATCH 04/10] pinctrl: sunxi: Wrap long compatible declaration lines Maxime Ripard
2013-07-30 15:09 ` Ian Campbell [this message]
2013-07-30 20:31 ` [linux-sunxi] " Maxime Ripard
2013-07-30 14:59 ` [PATCH 05/10] pinctrl: sunxi: Add Allwinner A20 pins set Maxime Ripard
2013-07-30 14:59 ` [PATCH 06/10] pinctrl: sunxi: Fix inconsistent indentation Maxime Ripard
2013-07-30 14:59 ` [PATCH 07/10] ARM: sun7i: Add the PIO controller node to the DTSI Maxime Ripard
2013-07-30 14:59 ` [PATCH 08/10] ARM: sun7i: DT: Add UART muxing options " Maxime Ripard
2013-07-30 19:07 ` Sergei Shtylyov
2013-07-30 20:10 ` Maxime Ripard
2013-07-30 14:59 ` [PATCH 09/10] ARM: sun7i: a20-olinuxino: Enable UARTs muxing Maxime Ripard
2013-07-30 14:59 ` [PATCH 10/10] ARM: sun7i: a20-olinuxino: Enable the user LED Maxime Ripard
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=1375196953.32691.61.camel@kazak.uk.xensource.com \
--to=ijc@hellion.org.uk \
--cc=emilio@elopez.com.ar \
--cc=kevin.z.m.zh@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=maxime.ripard@free-electrons.com \
--cc=shuge@allwinnertech.com \
--cc=sunny@allwinnertech.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
all inboxes | Powered by JetHome®