Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: fbtft: fb_ra8875.c: Remove unneeded void pointer cast

Void pointers need not be cast to other pointer types.
Semantic patch used:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
*((T *)e)
|
((T *)x) [...]
|
((T *)x)->f
|
- (T *)
e
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Janani Ravichandran and committed by
Greg Kroah-Hartman
264cd1d1 64f93e17

+2 -2
+2 -2
drivers/staging/fbtft/fb_ra8875.c
··· 257 257 static int write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len) 258 258 { 259 259 u16 *vmem16; 260 - u16 *txbuf16 = (u16 *)par->txbuf.buf; 260 + u16 *txbuf16 = par->txbuf.buf; 261 261 size_t remain; 262 262 size_t to_copy; 263 263 size_t tx_array_size; ··· 271 271 remain = len / 2; 272 272 vmem16 = (u16 *)(par->info->screen_buffer + offset); 273 273 tx_array_size = par->txbuf.len / 2; 274 - txbuf16 = (u16 *)(par->txbuf.buf + 1); 274 + txbuf16 = par->txbuf.buf + 1; 275 275 tx_array_size -= 2; 276 276 *(u8 *)(par->txbuf.buf) = 0x00; 277 277 startbyte_size = 1;