mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jack Steiner <steiner@sgi.com>
Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86, UV: Reformat uv_mmrs.h - no code changes
Date: Fri, 13 May 2011 14:40:29 +0200	[thread overview]
Message-ID: <20110513124029.GB3924@elte.hu> (raw)
In-Reply-To: <20110512133308.GA17113@sgi.com>


* Jack Steiner <steiner@sgi.com> wrote:

> No code changes.  Reformat file to eliminate errors caught
> by checkpatch.pl
> 
> Signed-off-by: Jack Steiner <steiner@sgi.com>
> 
> ---
>  arch/x86/include/asm/uv/uv_mmrs.h | 1147 ++++++++++++++++++--------------------
>  1 file changed, 573 insertions(+), 574 deletions(-)

Firstly, the patch does not apply to -tip cleanly.

Secondly, and more importantly, you are only addressing checkpatch errors but 
you are not looking at the end result! The goal is to make the code nicer to 
look at.

 Good example: uvh_event_occurred0_u, uvh_lb_bau_intd_software_acknowledge_u
  Bad example: uvh_bau_data_config_u and most of the other definitions!

There's a couple of other problems as well.

Why the heck is this symbol:

  #define UVH_LB_BAU_MISC_CONTROL_INTD_SOFT_ACK_TIMEOUT_PERIOD_SHFT 16

56 characters long?! Was there possibly no way to make it even longer?

And of course, once used, this symbol craps up the code in 
arch/x86/platform/uv/tlb_uv.c ...

Using BAU_MISC_ACK_PERIOD_SHIFT would be like 3 times shorter, and still as 
obvious. Or if these are the result of some Verilog tooling dependency then 
please keep these tucked away in the .h and use some sensible symbol instead, 
never pollute the .c file with the insanely long symbol names!

Also, if you look at the line of definitions you will see the same kind of 
ugliness you can see at uvh_bau_data_config_u et al.

And then i have not even started about enable_programmed_initial_priority 
structure fields.

Thanks,

	Ingo

  reply	other threads:[~2011-05-13 12:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 13:33 Jack Steiner
2011-05-13 12:40 ` Ingo Molnar [this message]
2011-05-25 16:16   ` [PATCH V2] " Jack Steiner
2011-05-25 20:45     ` Ingo Molnar
2011-05-26 17:17       ` [PATCH V3] " Jack Steiner
2011-05-27 12:40         ` Ingo Molnar
2011-05-27 14:52           ` [PATCH V4] x86, UV: Clean up uv_mmrs.h Jack Steiner
2011-05-30 11:04             ` [tip:x86/uv] " tip-bot for Jack Steiner

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=20110513124029.GB3924@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steiner@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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 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®