Re: [PATCH 11/11] ARM: S5P6440: Remove redundant defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 13, 2010 at 10:06:08AM +0100, Russell King - ARM Linux wrote:
> On Thu, May 13, 2010 at 01:54:12PM +0900, Kyungmin Park wrote:
> > On Thu, May 13, 2010 at 11:02 AM, Ben Dooks <ben-linux@xxxxxxxxx> wrote:
> > > 1) It takes two lines of code, where one is sufficient.
> > >
> > > 2) You only have to look in the relevant .c file to find out the
> > >   value instead of tracking down a header. This makes it easier
> > >   to verify the value against the manual and easier to compare
> > >   against simialr code.
> > 
> > Then define it at c code and use the macro. I also don't like the
> > hard-coded values.
> 
> I'm almost with Ben on this; but we can do better to satisfy both camps.
> 
> 	.ctrlbit	= 1 << 2, /* CLKCON_MEM0_HCLK_NFCON */

As a note, the following awk will do that to this patch:

#!/bin/awk

{
    if ($0 ~ /^-.*ctrlbit*/) {
	last = $4;
	gsub(/,/,"",last)
	print $0;
    } else if ($0 ~ /^\+.*ctrlbit*/) {
	print $0 " /* " last " */";
    } else {
	print $0 default;
    }
}

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux