linux-mips
[Top] [All Lists]

Re: [PATCH RESEND 01/17] MIPS: lantiq: reorganize xway code

To: John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH RESEND 01/17] MIPS: lantiq: reorganize xway code
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 13 Jan 2012 13:38:01 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <1326314674-9899-1-git-send-email-blogic@openwrt.org>
References: <1326314674-9899-1-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Jan 11, 2012 at 09:44:18PM +0100, John Crispin wrote:

> +static inline void ltq_ebu_w32_mask(u32 c, u32 s, u32 r) {
> +     ltq_ebu_w32((ltq_ebu_r32(r) & ~c) | s, r);
> +}
> +
> +/* cgu access */
> +static inline void ltq_cgu_w32(u32 v, u32 r) {
> +     ltq_w32(v, ltq_cgu_membase + r);
> +};
> +static inline u32 ltq_cgu_r32(u32 r) {
> +     return ltq_r32(ltq_cgu_membase + r);
> +};
> +static inline void ltq_cgu_w32_mask(u32 c, u32 s, u32 r) {
> +     ltq_cgu_w32((ltq_cgu_r32(r) & ~c) | s, r);
> +}

Documentation/CodingStyle:

[...]

However, there is one special case, namely functions: they have the
opening brace at the beginning of the next line, thus:

        int function(int x)
        {
                body of function
        }

Heretic people all over the world have claimed that this inconsistency
is ...  well ...  inconsistent, but all right-thinking people know that
(a) K&R are _right_ and (b) K&R are right.  Besides, functions are
special anyway (you can't nest them in C).

[...]

So this formatting is heretic.  Pray 10 CodingStyle to Saint K&R.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>