public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@fifo99.com>
To: Olaf Dabrunz <Olaf.Dabrunz@gmx.net>
Cc: Stefan Assmann <sassmann@redhat.com>,
	linux-kernel@vger.kernel.org, jcm@redhat.com,
	sdietrich@novell.com, linux-acpi@vger.kernel.org,
	andi@firstfloor.org, hpa@zytor.com, mingo@elte.hu,
	ktokunag@redhat.com, tglx@linutronix.de, lenb@kernel.org
Subject: Re: [RFC][PATCH 2/2] disable boot interrupts on Intel X58 and 55x0
Date: Sat, 05 Sep 2009 10:07:39 -0700	[thread overview]
Message-ID: <1252170459.6877.44.camel@desktop> (raw)
In-Reply-To: <20090905161852.GA19706@santana.dyndns.org>

On Sat, 2009-09-05 at 18:18 +0200, Olaf Dabrunz wrote:
> On 05-Sep-09, Daniel Walker wrote:
> > On Sat, 2009-09-05 at 11:07 +0200, Stefan Assmann wrote:
> > > On 04.09.2009 19:06, Daniel Walker wrote:
> > > > On Fri, 2009-09-04 at 12:55 -0400, Stefan Assmann wrote:
> > > >> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_QPI_TBG15,  quirk_disable_intel_tylersburg_boot_interrupt);
> > > >> +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_QPI_TBG15,  quirk_disable_intel_tylersburg_boot_interrupt);
> > > > 
> > > > 
> > > > These lines are wildly long .. Could you reduce these down to a max of
> > > > 80 characters..
> > > 
> > > Hi Daniel,
> > > 
> > > you're right about the lines being to long, however if you take a peek
> > > at drivers/pci/quirks.c you'll see that all the quirks are done this
> > > way. :)
> > 
> > I looked, the whole thing is a mess .. Really all these lines need to be
> > cleaned up.. It doesn't help to have you add more to it tho. Especially
> > the tab's or spaces between the commas, I can say I understand why that
> > is.. If there is a good reason why it's like that I'm all ears..
> 
> It makes adding/deleting/modifying the entries easier, with one-line
> editor operations. And if all data for one ID-to-quirk relationship is
> on one line, with tabs to make for nice columns, I can more easily see
> which device is linked to which quirk. That is why I usually prefer one
> line per entry. And the entries in quirks.c are long, but not too long
> for that IMHO.

Firstly I would say these entries aren't consistent at all.. Some are
comma tab delimited, some are comma space delimited, and some are mixed
space plus tab delimited plus comma delimited.. Many are actually broken
down into less than 80 max length already..

I'm not sure I see how this makes "adding/deleting/modifying" easier ..
We have lots of other situations where lines are broken down less than
80, function arguments, macros, structures all sorts of stuff. 

Taking this block for instance,

DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
                        PCI_DEVICE_ID_TIGON3_5780,
                        quirk_msi_intx_disable_bug);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
                        PCI_DEVICE_ID_TIGON3_5780S,
                        quirk_msi_intx_disable_bug);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
                        PCI_DEVICE_ID_TIGON3_5714,
                        quirk_msi_intx_disable_bug);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
                        PCI_DEVICE_ID_TIGON3_5714S,
                        quirk_msi_intx_disable_bug);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
                        PCI_DEVICE_ID_TIGON3_5715,
                        quirk_msi_intx_disable_bug);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
                        PCI_DEVICE_ID_TIGON3_5715S,
                        quirk_msi_intx_disable_bug);

In this block there is a fairly clear pattern you can follow. One
problem with using tabs is that in order to get the perceive benefit
your suggesting you would be forced to have a terminal at a certain
size. Without that the single lines just end up line wrapped but in a
less consistent way. You also have the problem that people have to
deliberately add this formatting , sometimes one tab is enough,
sometimes you need two tabs, maybe someone uses spaces instead .. So you
end up with people potentially using all sorts of different methods and
maybe not getting it right (not to mention it's special formatting just
for this file)..

> So this will only be a problem for terminals that are limited to 80
> rows, and I do not think that anyone is that restricted nowadays.

It's more than that.. In order to un-wrap the lines in this file you
have to have a terminal at over 130 characters in width.

I think it would be better to create a script that parses this file and
produces consistent list in the format your describing, just for review
purposes.. That way it takes the human element out of it, and it still
lets you look at the formatting that your looking for.

Daniel


  reply	other threads:[~2009-09-05 17:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04 16:55 [RFC][PATCH 0/2] boot interrupts on Intel X58 and 55x0 Stefan Assmann
2009-09-04 16:55 ` [RFC][PATCH 1/2] show Intel QuickPath Interconnect Routing and Protocol Layer Registers in PCI config space Stefan Assmann
2009-09-04 17:07   ` Yinghai Lu
2009-09-05  9:02     ` Stefan Assmann
2009-09-04 16:55 ` [RFC][PATCH 2/2] disable boot interrupts on Intel X58 and 55x0 Stefan Assmann
2009-09-04 17:06   ` Daniel Walker
2009-09-05  9:07     ` Stefan Assmann
2009-09-05 14:47       ` Daniel Walker
2009-09-05 16:18         ` Olaf Dabrunz
2009-09-05 17:07           ` Daniel Walker [this message]
2009-09-07  1:37             ` Henrique de Moraes Holschuh
2009-09-07  1:53               ` Daniel Walker
2009-09-07  1:33 ` [RFC][PATCH 0/2] " Henrique de Moraes Holschuh
2009-09-07  8:24   ` Stefan Assmann

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=1252170459.6877.44.camel@desktop \
    --to=dwalker@fifo99.com \
    --cc=Olaf.Dabrunz@gmx.net \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=jcm@redhat.com \
    --cc=ktokunag@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sassmann@redhat.com \
    --cc=sdietrich@novell.com \
    --cc=tglx@linutronix.de \
    /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