Re: [Dri-devel] 2.6 kernel change in nopage

From: William Lee Irwin III
Date: Thu Jan 01 2004 - 10:20:00 EST


On Thu, Jan 01, 2004 at 03:27:59PM +0100, Michel D?nzer wrote:
> Does this look better? Maybe a macro (or a typedef?) for the type of the
> last argument would still be a good idea? Or is there yet a better way?

I'm going to regret suggesting this, but how about:
(a) a typedef for the arg itself
(b) a macro and/or inline for the type update

both simultaneously?

So we'd have centralized in one place:

#if /* kernel version > 2.6.0 */
typdef int *third_arg_t;
#define third_arg_update(type) do { *(type) = VM_FAULT_MINOR; } while (0)
#else
typdef int third_arg_t;
#define third_arg_update(type) do { } while (0)
#endif

... and the natural usage that follows.

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