Re: [PATCH] Fix kunmap() argument in sg_miter_stop

From: Ingo Molnar
Date: Mon Nov 17 2008 - 03:22:38 EST



* Jens Axboe <jens.axboe@xxxxxxxxxx> wrote:

> +#define kunmap(p) \
> + do { \
> + struct page *__p; \
> + (void) (&__p == &(p)); \
> + __kunmap(p); \
> + } while (0)
> +
> +#define kunmap_atomic(a, t) \
> + do { \
> + void *__p; \
> + (void) (&__p == &(a)); \
> + __kunmap_atomic(a, t); \
> + } while (0)

Agreed - but please use the typecheck() primitive. (linux/typecheck.h)

Ingo
--
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/