[parisc-linux-cvs] 2.6.0-test5-pa0 cleanups
Matthew Wilcox
willy@debian.org
Thu, 11 Sep 2003 13:08:44 +0100
On Wed, Sep 10, 2003 at 11:07:10PM -0600, Grant Grundler wrote:
> arch/parisc/Kconfig
> Disable HPUX for 64-bit since it doesn't compile
> since I modified it to use STREG/LDREG.
Looks good.
> drivers/serial/Kconfig
> CONFIG_PDC_CONSOLE depends on CONFIG_VT in order
> to pick up console_driver global.
Yes, but I think your patch to the comment is wrong.
> Saying Y here will enable the software based PDC console to be
> used as the system console. This is useful for machines in
> - which the hardware based console has not been written yet. The
> - following steps must be competed to use the PDC console:
> + which the hardware based console has not been written yet or to
> + enable console output before regular console device has started.
> + The following steps must be competed to use the PDC console:
Enabling early console output is not done by CONFIG_PDC_CONSOLE but by
changing
#undef EARLY_BOOTUP_DEBUG
to
#define EARLY_BOOTUP_DEBUG
in arch/parisc/kernel/pdc_cons.c (which is alwas compiled in, regardless
of the setting of CONFIG_PDC_CONSOLE).
> include/asm-parisc/bitops.h
> add comments to __ffs()
Yep, looks good, thanks.
> net/ipv4/ip_fragment.c
> fix warning. atomic_sub() takes int for the first parameter.
> "- sizeof()" is a long negative constant. Perhaps it's a
> gcc 3.0.4 (hppa64) compiler bug that it doesn't get reduced to int.
> No warnings for atomic_add(sizeof(foo),xxx) suggest it's normally ok.
Just remembering Rusty's comments about making interfaces intuitive to
use, how about the followig patch instead?
-#define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v))))
-#define atomic_sub(i,v) ((void)(__atomic_add_return(-(i),(v))))
-#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v))))
-#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v))))
+#define atomic_add(i,v) ((void)(__atomic_add_return( ((int)i),(v))))
+#define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)i),(v))))
+#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v))))
+#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v))))
-#define atomic_add_return(i,v) (__atomic_add_return( (i),(v)))
-#define atomic_sub_return(i,v) (__atomic_add_return(-(i),(v)))
+#define atomic_add_return(i,v) (__atomic_add_return( ((int)i),(v)))
+#define atomic_sub_return(i,v) (__atomic_add_return(-((int)i),(v)))
#define atomic_inc_return(v) (__atomic_add_return( 1,(v)))
#define atomic_dec_return(v) (__atomic_add_return( -1,(v)))
> @@ -291,7 +291,7 @@ static __inline__ int fls(int x)
> - " zdep,TR %0,29,30,%0\n" /* y0000000 (y&3 = 0 */
> + " zdep,TR %0,29,30,%0\n" /* y0000000 (y&3) = 0 */
I actually meant parentheses here, rather than operator precedence, so (y&3 = 0)
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk