From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Thu, 07 Apr 2011 19:00:47 +0200 Subject: [U-Boot] [PATCH v7 01/10] nds32: add header files support for nds32 In-Reply-To: References: <1302180333-25372-1-git-send-email-macpaul@andestech.com> <20110407145558.8588D14F02E@gemini.denx.de> Message-ID: <20110407170047.2DD04151F83@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Macpaul Lin, In message you wrote: > > > Checkpatch complains a lot about "do not add new typedefs". > > Indeed, but this seems is special for Linux Kernel, Not really. This is Linux CodingStyle policy, which we usually adapt. > I've checked some of the "typedefs" from other architecture code in u-boot. This does not mean much. Yes, there are tons of typedef's in U-Boot, but this is old code that has not been cleaned up yet. At least we now try not to add to that pool. > I did check typedefs one by one by myself in hand and eye checking. > If some thing is not suitable for using "typedefs" please let me know. Please don't add any new typedef's. > >> +#define PTREGS(reg) [reg] > > > > This also triggers an erro-r from checkpatch, and indeed this is a > > strange define. > > It was strange for me, too. > However, it looks like I must use PTREGS define for ptregs for API > compatibility. > Please refer to the ARM code and MIPS, etc. I did check. There is not any code anywhere that references anything like "ptreg" or similar. > > NAK. Please use a C struct instead. > > Other architecture use specific ARM_XXX_R0 or MIPS_XXX _R. I'm not sure what you might be referring to. The only other file which I can find which has similar code is arch/arm/include/asm/proc-armv/ptrace.h, and this indeed should be cleaned up, too. Sorry, sometimes such things slip through the reviews. > And I think this part is specific for the API to ptregs.h. It appears this is something no other architecture needs in U-Boot? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Every time history repeats itself the price goes up.