Re: [PATCH net-next] intel: Remove addressof casts to same type

From: Jeff Kirsher
Date: Mon Mar 24 2014 - 16:21:36 EST


On Mon, 2014-03-24 at 10:45 -0700, Joe Perches wrote:
> Using addressof then casting to the original type is pointless,
> so remove these unnecessary casts.
>
> Done via coccinelle script:
>
> $ cat typecast.cocci
> @@
> type T;
> T foo;
> @@
>
> - (T *)&foo
> + &foo
>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/i40e/i40e_common.c | 4 ++--

Thanks again Joe, I will add this to my queue.

Attachment: signature.asc
Description: This is a digitally signed message part