]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8723bs: hal: Remove unnecessary cast on void pointer
authorSimran Singhal <singhalsimran0@gmail.com>
Thu, 26 Mar 2020 11:32:10 +0000 (17:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2020 14:45:08 +0000 (15:45 +0100)
commit8eccf2d920134000ff776a983a97899c82417a37
treea63423d3e0ac9ac18aadd6de70b2b3a0b66b7a72
parent2a3b9a2e1d0b0cd89a0d7de84f34b9d2a148f8b4
staging: rtl8723bs: hal: Remove unnecessary cast on void pointer

Assignment to a typed pointer is sufficient in C.
No cast is needed.

The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|

- (T*)
  e
)

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200326113210.GA29951@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/odm_CfoTracking.c