[PATCH 0/3] staging: ks7010: clean function calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Driver file ks7010_sdio.c contains a few function definition
anomalies. One function is defined with two parameters, one of which
is a struct member of the other. This is unnecessary.

A couple of functions with internal linkage take as input parameters
of type void *. All call sites then cast struct pointers to void * in
order to do the function call, void * must then be cast back to the
original struct pointer type. This casting both ways is unnecessary.

Patch 01 removes the unnecessary function parameter.

Patch 02 fixes the function parameter types so casting is not used.

Patch 03 fixes a buffer overflow, not a real bug since the containing
function has internal linkage. Fixing this prevents future failure.

Code is untested. Builds on x86_64 and PowerPC.

Tobin C. Harding (3):
  staging: ks7010: remove unnecessary function parameter
  staging: ks7010: remove void * cast
  staging: ks7010: fix buffer overflow vulnerability

 drivers/staging/ks7010/ks7010_sdio.c | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux