Re: [Cocci] coccinelle: generalized removal of unnecessary pointer casts?

2016-03-14 Thread Julia Lawall
On Mon, 14 Mar 2016, Joe Perches wrote: > On Mon, 2016-03-14 at 21:43 +0100, Julia Lawall wrote: > > On Mon, 14 Mar 2016, Joe Perches wrote: > > > I wrote a little cocci script to remove unnecessary > > > casts for memset and memcpy (below) and tested it on > > > linux kernel's drivers/staging/

[Cocci] coccinelle: generalized removal of unnecessary pointer casts?

2016-03-14 Thread Joe Perches
I wrote a little cocci script to remove unnecessary casts for memset and memcpy (below) and tested it on linux kernel's drivers/staging/ directory. For instance, when dst and src are already pointers: - memcpy((u8 *)dst, (u8 *)src, r8712_get_wlan_bssid_ex_sz(src)); + memcpy(dst, src,

Re: [Cocci] coccinelle: generalized removal of unnecessary pointer casts?

2016-03-14 Thread Joe Perches
On Mon, 2016-03-14 at 21:43 +0100, Julia Lawall wrote: > On Mon, 14 Mar 2016, Joe Perches wrote: > > I wrote a little cocci script to remove unnecessary > > casts for memset and memcpy (below) and tested it on > > linux kernel's drivers/staging/ directory. > >  > > For instance, when dst and src