staging: rtl8192e: Fix smatch warnings regarding large arrays on stack
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 1 Sep 2011 17:23:20 +0000 (12:23 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:35:59 +0000 (16:35 -0700)
commit2eed3dee92453c1798f0932613b1b66f0763ab2e
tree44ff25dc51f603186073ff85bed655b70fde6e48
parent52a7fb0951b35840a79a5b162fb853b78cec3c09
staging: rtl8192e: Fix smatch warnings regarding large arrays on stack

Smatch reports the follwing warnings:

  CHECK   drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_rx.c +552 RxReorderIndicatePacket(6) warn: 'prxbIndicateArray' puts 1024 bytes on stack

  CHECK   drivers/staging/rtl8192e/rtl819x_TSProc.c
drivers/staging/rtl8192e/rtl819x_TSProc.c +40 RxPktPendingTimeout(9) warn: 'stats_IndicateArray' puts 1024 bytes on stack

  CHECK   drivers/staging/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/r8192E_phy.c +859 rtl8192_phy_SwChnlStepByStep(11) warn: function puts 797 bytes on stack

  CHECK   drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_rx.c +552 RxReorderIndicatePacket(6) warn: 'prxbIndicateArray' puts 1024 bytes on stack

These are fixed by adding the arrays in question as a union in a struct used
by nearly all routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/r8192E_phy.h
drivers/staging/rtl8192e/rtl819x_TSProc.c
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_rx.c