Re: [PATCH 4/4] pxafb: preliminary smart panel interface support

From: Andrew Morton
Date: Tue Apr 08 2008 - 04:24:45 EST


On Tue, 8 Apr 2008 12:07:27 +0800 "eric miao" <eric.y.miao@xxxxxxxxx> wrote:

> +static int pxafb_smart_thread(void *arg)
> +{
> + struct pxafb_info *fbi = (struct pxafb_info *) arg;

Please don't typecast when assigning a pointer to or from void*.

Reasons:

- It defeats typechecking: if someone later converts `arg' to a u8, they
won't even get a compiler warning.

- Improved code readability.

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