[PATCH 5/5] xfree86: nds32: add nds32 support for compiler related mmio codes
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Sep 8 08:11:17 PDT 2010
Macpaul Lin wrote:
> +#if 0
> +/*unsigned int IOPortBase; */ /* Memory mapped I/O port area */
> +unsigned int ioportBase; /* Memory mapped I/O port area */
> +asm(".weak ioportBase\n");
> +/*asm(".weak IOPortBase\n");*/
> +#endif
Why not just delete that section instead of putting more #if 0 mistakes
into our shared code base?
> +#if 1
> +static __inline__ void
> +outb(unsigned PORT_SIZE port, unsigned char val)
> +{
> + /**(volatile unsigned char*)(((unsigned PORT_SIZE)(port))+IOPortBase) = val;*/
> + *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))) = val;
> + barrier();
> +}
[...]
> +#endif /*0*/
Don't know about your new CPU, but on the existing ones we support, 1 != 0.
More seriously, like the first comment, #if 0/1 are fine for debugging, but
putting them into commits going upstream just annoys the people who come
clean them out later.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list