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

Jens Axboe
2008-11-17T08:32:19Z

On Mon, Nov 17 2008, Ingo Molnar wrote:
>
> * Jens Axboe <jens.axboe@oracle.com> 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)

Neat, didn't know about that, thanks.

--
Jens Axboe