Re: [announce] HVCS for inclusion in 2.6 tree

From: Andrew Morton
Date: Thu Jul 22 2004 - 18:01:18 EST


Ryan Arnold <rsa@xxxxxxxxxx> wrote:
>

A little stylistic thing:

> + struct hvcs_struct *hvcsd = (struct hvcs_struct *)tty->driver_data;
> + struct hvcs_struct *hvcsd = (struct hvcs_struct *)tty->driver_data;
> + struct hvcs_struct *hvcsd = (struct hvcs_struct *)dev_instance;

It's not necessary to add a typecast when assigning to and from a void*.
In fact, it's harmful: if someone were to later change, say,
tty->driver_data to a `struct foo *', your typecast will suppress the
warning which we would very much like to receive.

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