From mboxrd@z Thu Jan 1 00:00:00 1970 From: jaswinder.singh@linaro.org (Jassi Brar) Date: Sat, 24 Nov 2012 16:35:37 +0530 Subject: [PATCH 1/8 v3] DMA: PL330: use prefix in reg names to build under x86 In-Reply-To: <20121124070337.GA8030@mail.gnudd.com> References: <1353718436-20194-1-git-send-email-ciminaghi@gnudd.com> <20121124070337.GA8030@mail.gnudd.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 24 November 2012 12:33, Alessandro Rubini wrote: > 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. > Sorry if I gave the wrong impression. I didn't agree (and IIRC nobody suggested) we prefix _every_ symbol in the driver now. Just CS, DS, ES and maybe SA, DA, CC too for some consistency. IOW, only regs, not bit-fields. regards.