linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rubini@gnudd.com (Alessandro Rubini)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8 v3] DMA: PL330: use prefix in reg names to build under x86
Date: Sat, 24 Nov 2012 08:03:37 +0100	[thread overview]
Message-ID: <20121124070337.GA8030@mail.gnudd.com> (raw)
In-Reply-To: <CAJe_ZhcGmeTviV8v8eCMFZTWLnOb24_kVa1TkZF=9oyc6=vA4A@mail.gmail.com>

My patch:
>> This driver would not compile if ARM_AMBA is selected under x86,
>> because "CS" and "DS" are already defined there.  But AMBA
>> is used in the x86 world by a PCI-to-AMBA bridge, to be submitted.
>>
>> The patch just adds the "PL330_" prefix to all register and bit fields,
>> so it can be built by randomconfig after ARM_AMBA appears within x86.

Jassy Brar:
> Prefixing only CS and DS should be do the job.
> Why do we have to make every symbol noisy with PL330_ ?

For internal consistency. I attacked this problem in July. This is
what you wrote:

   I fully agree with your point and IIRC I always add some prefix to
   definitions in header files.
   Private defines in a .c file, without redundant prefixes, sounded like
   safe to me at the time, but perhaps I was wrong.

   (references: http://lkml.org/lkml/2012/7/1/56)

So I made the changes overall.  I dislike needless long patches, but
picking symbols to work around the conflict of the day while
introducing inconsistent naming doesn't look good to me.

The other option is making the driver depend on CONFIG_ARM, like other
patches in the series.  That would be a smaller patch: we have a dozen
AMBA peripherals under X86, and the PL330 was not thre.

But I got the impression that we don't want to single-out every driver
that doesn't compile: an overall more portable system is better.

I'm fine either way, but your "perhaps I was wrong" above made me choose
the overall-prefixing approach.

Thank you all for your patience in this (especially Davide for the
upstreaming effort)

/alessandro

  parent reply	other threads:[~2012-11-24  7:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-23 15:08 [PATCH v2 0/8] enable support for AMBA drivers under x86 Davide Ciminaghi
2012-11-23 15:08 ` [PATCH 1/8] DMA: PL330: use prefix in reg names to build " Davide Ciminaghi
2012-11-23 15:51   ` viresh kumar
2012-11-23 17:23     ` Davide Ciminaghi
2012-11-23 17:28       ` Viresh Kumar
2012-11-24  0:53         ` [PATCH 1/8 v3] " Davide Ciminaghi
2012-11-24  5:14           ` Jassi Brar
2012-11-24  7:03           ` Alessandro Rubini [this message]
2012-11-24 11:05             ` Jassi Brar
2012-11-28 16:15               ` Davide Ciminaghi
2012-11-23 15:08 ` [PATCH 2/8] gpio: pl061 depends on ARM Davide Ciminaghi
2012-11-23 15:57   ` viresh kumar
2012-12-01 15:11   ` Linus Walleij
2012-12-03 13:31     ` Davide Ciminaghi
2012-11-23 15:08 ` [PATCH 3/8] pl080.h: moved from arm/include/asm/hardware to include/linux/amba/ Davide Ciminaghi
2012-11-23 15:53   ` viresh kumar
2012-11-24  0:22     ` [PATCH 3/8 v3] " Davide Ciminaghi
2012-11-28 16:04       ` Linus Walleij
2012-11-23 15:08 ` [PATCH 4/8] watchdog: sp805_wdt depends on ARM Davide Ciminaghi
2012-11-23 15:56   ` viresh kumar
2012-11-28 16:00   ` Linus Walleij
2012-11-23 15:08 ` [PATCH 5/8] mmci: replace readsl/writesl with ioread32_rep/iowrite32_rep Davide Ciminaghi
2012-11-28 16:08   ` Linus Walleij
2012-11-28 16:33     ` Davide Ciminaghi
2012-12-03 14:47   ` Will Deacon
2012-12-03 16:55     ` Davide Ciminaghi
2012-11-23 15:08 ` [PATCH 6/8] mmc: use the new <linux/sizes.h> Davide Ciminaghi
2012-11-23 15:59   ` viresh kumar
2012-11-26 19:08   ` David Brown
2012-12-01 17:05   ` Linus Walleij
2012-11-23 15:08 ` [PATCH 7/8] drivers/amba: add support for a PCI bridge Davide Ciminaghi
2012-11-23 15:08 ` [PATCH 8/8] x86: add CONFIG_ARM_AMBA, selected by STA2X11 Davide Ciminaghi

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=20121124070337.GA8030@mail.gnudd.com \
    --to=rubini@gnudd.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).