Re: [PATCH] Rename D macro in kmap_types.h

From: AmÃrico Wang
Date: Thu Sep 17 2009 - 22:33:03 EST


On Thu, Sep 17, 2009 at 4:25 AM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
> Rename D macro in kmap_types.h
>
> I tend to use a 'D' debugging macro a lot during debugging.
> When I define it before includes I often get conflicts
> with kmap_types.h's use of 'D' too. It's not very nice
> when a global include pollutes the name space like this.
>
> Rename the kmap_types.h D to KMAP_D. It is only used
> temporarily in the header so has no effect on anything else.
>
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>


Makes sense.

Reviewed-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>

>
> ---
> Âinclude/asm-generic/kmap_types.h | Â 47 +++++++++++++++++++--------------------
> Â1 file changed, 24 insertions(+), 23 deletions(-)
>
> Index: linux-2.6.31-rc3-ak/include/asm-generic/kmap_types.h
> ===================================================================
> --- linux-2.6.31-rc3-ak.orig/include/asm-generic/kmap_types.h
> +++ linux-2.6.31-rc3-ak/include/asm-generic/kmap_types.h
> @@ -2,34 +2,35 @@
> Â#define _ASM_GENERIC_KMAP_TYPES_H
>
> Â#ifdef __WITH_KM_FENCE
> -# define D(n) __KM_FENCE_##n ,
> +# define KMAP_D(n) __KM_FENCE_##n ,
> Â#else
> -# define D(n)
> +# define KMAP_D(n)
> Â#endif
>
> Âenum km_type {
> -D(0) Â KM_BOUNCE_READ,
> -D(1) Â KM_SKB_SUNRPC_DATA,
> -D(2) Â KM_SKB_DATA_SOFTIRQ,
> -D(3) Â KM_USER0,
> -D(4) Â KM_USER1,
> -D(5) Â KM_BIO_SRC_IRQ,
> -D(6) Â KM_BIO_DST_IRQ,
> -D(7) Â KM_PTE0,
> -D(8) Â KM_PTE1,
> -D(9) Â KM_IRQ0,
> -D(10) ÂKM_IRQ1,
> -D(11) ÂKM_SOFTIRQ0,
> -D(12) ÂKM_SOFTIRQ1,
> -D(13) ÂKM_SYNC_ICACHE,
> -D(14) ÂKM_SYNC_DCACHE,
> -D(15) ÂKM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */
> -D(16) ÂKM_IRQ_PTE,
> -D(17) ÂKM_NMI,
> -D(18) ÂKM_NMI_PTE,
> -D(19) ÂKM_TYPE_NR
> +KMAP_D(0) Â Â ÂKM_BOUNCE_READ,
> +KMAP_D(1) Â Â ÂKM_SKB_SUNRPC_DATA,
> +KMAP_D(2) Â Â ÂKM_SKB_DATA_SOFTIRQ,
> +KMAP_D(3) Â Â ÂKM_USER0,
> +KMAP_D(4) Â Â ÂKM_USER1,
> +KMAP_D(5) Â Â ÂKM_BIO_SRC_IRQ,
> +KMAP_D(6) Â Â ÂKM_BIO_DST_IRQ,
> +KMAP_D(7) Â Â ÂKM_PTE0,
> +KMAP_D(8) Â Â ÂKM_PTE1,
> +KMAP_D(9) Â Â ÂKM_IRQ0,
> +KMAP_D(10) Â Â KM_IRQ1,
> +KMAP_D(11) Â Â KM_SOFTIRQ0,
> +KMAP_D(12) Â Â KM_SOFTIRQ1,
> +KMAP_D(13) Â Â KM_SYNC_ICACHE,
> +KMAP_D(14) Â Â KM_SYNC_DCACHE,
> +/* UML specific, for copy_*_user - used in do_op_one_page */
> +KMAP_D(15) Â Â KM_UML_USERCOPY,
> +KMAP_D(16) Â Â KM_IRQ_PTE,
> +KMAP_D(17) Â Â KM_NMI,
> +KMAP_D(18) Â Â KM_NMI_PTE,
> +KMAP_D(19) Â Â KM_TYPE_NR
> Â};
>
> -#undef D
> +#undef KMAP_D
>
> Â#endif
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> Please read the FAQ at Âhttp://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/