Re: [PATCH] Add to_delayed_work macro

From: Andrew Morton
Date: Tue Mar 03 2009 - 03:31:25 EST


On Tue, 3 Mar 2009 08:34:40 +0100 Jean Delvare <khali@xxxxxxxxxxxx> wrote:

> +#define to_delayed_work(_work) container_of(_work, struct delayed_work, work)

As this is specifically designed to operate on a `struct work*', as
opposed to "any struct which has a field called `work'", we can get
additional type-safety by putting a C interface around it.

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