Re: [PATCH] make buffer head argument of buffer_##name "const"

From: Andrew Morton
Date: Tue Oct 26 2004 - 02:27:02 EST


Werner Almesberger <werner@xxxxxxxxxxxxxxx> wrote:
>
> --- linux-2.6.9/include/linux/buffer_head.h.orig Tue Oct 26 02:57:54 2004
> +++ linux-2.6.9/include/linux/buffer_head.h Tue Oct 26 02:21:04 2004
> @@ -76,7 +76,7 @@
> { \
> clear_bit(BH_##bit, &(bh)->b_state); \
> } \
> -static inline int buffer_##name(struct buffer_head *bh) \
> +static inline int buffer_##name(const struct buffer_head *bh) \
> { \
> return test_bit(BH_##bit, &(bh)->b_state); \
> }

OK, but why? Does it generate better code or something?
-
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/