staging: rtl8192u: make in ieee80211/rtl819x_HTProc.c some local functions static

Make some local functions static.

These are the local functions that were made static:

IsHTHalfNmode40Bandwidth, IsHTHalfNmodeSGI, HTIOTPeerDetermine,
HTIOTActIsDisableMCS14, HTIOTActIsDisableMCS15,
HTIOTActIsDisableMCSTwoSpatialStream, HTIOTActIsDisableEDCATurbo,
HTIOTActIsMgntUseCCK6M, HTIOTActIsCCDFsync, HT_PickMCSRate,
HTFilterMCSRate, HTUseDefaultSetting

Fix the following sparse warnings in ieee80211/rtl819x_HTProc.c

drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:222:6: warning: symbol 'IsHTHalfNmode40Bandwidth' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:241:6: warning: symbol 'IsHTHalfNmodeSGI' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:379:6: warning: symbol 'HTIOTPeerDetermine' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:416:4: warning: symbol 'HTIOTActIsDisableMCS14' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:435:6: warning: symbol 'HTIOTActIsDisableMCS15' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:472:6: warning: symbol 'HTIOTActIsDisableMCSTwoSpatialStream' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:489:4: warning: symbol 'HTIOTActIsDisableEDCATurbo' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:503:4: warning: symbol 'HTIOTActIsMgntUseCCK6M' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:518:4: warning: symbol 'HTIOTActIsCCDFsync' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:795:4: warning: symbol 'HT_PickMCSRate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:910:4: warning: symbol 'HTFilterMCSRate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:1320:6: warning: symbol 'HTUseDefaultSetting' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: make in ieee80211/rtl819x_BAProc.c some local functions static

Make some local functions (ActivateBAEntry, DeActivateBAEntry,
TxTsDeleteBA ,RxTsDeleteBA and ieee80211_send_DELBA) static and fix
coding style in this function declarations when It is necessary

Fix the following sparse warnings in ieee80211/rtl819x_BAProc.c

drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:16:6: warning: symbol 'ActivateBAEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:28:6: warning: symbol 'DeActivateBAEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:40:4: warning: symbol 'TxTsDeleteBA' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:70:4: warning: symbol 'RxTsDeleteBA' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:310:6: warning: symbol 'ieee80211_send_DELBA' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: Deleted 'rtl819xU_cmd_isr' function in r8192U_core.c

This patch delete the 'rtl819xU_cmd_isr' function that is not used in
anywhere in the driver.

Fix the following sparse warning in r8192U_core.c

drivers/staging/rtl8192u/r8192U_core.c:1516:6: warning: symbol 'rtl819xU_cmd_isr' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: Deleted 'rtl8192_set_mode' function in r8192U_core.c

This patch delete the 'rtl8192_set_mode' function that is not used in
anywhere in the driver.

Fix the following sparse warning in r8192U_core.c
drivers/staging/rtl8192u/r8192U_core.c:692:6: warning: symbol 'rtl8192_set_mode' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: Deleted 'rtl8192_proc_module_remove' function in r8192U_core.c

This patch delete the 'rtl8192_proc_module_remove' function that is not
used in anywhere in the driver.

Fix the following sparse warnings in r8192U_core.c

drivers/staging/rtl8192u/r8192U_core.c:595:6: warning: symbol 'rtl8192_proc_module_remove' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: Deleted 'rtl8192_beacon_stop' function in r8192U_core.c

This patch delete the 'rtl8192_beacon_stop' function that is not used
in anywhere in the driver.

Fix the following sparse warning in r8192U_core.c

drivers/staging/rtl8192u/r8192U_core.c:1332:6: warning: symbol 'rtl8192_beacon_stop' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging:lustre: Fix sparse warning of plain integer as NULL

This patch fixes the following sparse warning:
drivers/staging/lustre/lustre/lov/lov_request.c:53:28: warning: Using plain integer as NULL pointer

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: sep: Add fallthrough comment

This patch solves the warning "possible switch/case default not preceded by
break or fallthrough comment".

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Staging: wlan-ng: Fix sparse non-static symbol warning

Fix sparse non-static symbol warning in wlan-ng driver.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Staging: bcm: Fix sparse non-static symbol warning

Fix sparse non-static symbol warning in bcm driver.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Staging: solo6x10: Replace expressions that don't use ALIGN macro

There are some expressions that compute the roundup of a number, but don't use
the existing macro defined in /include/kernel.h. This patch uses the following
Coccinelle semantic patch:
@ haskernel @
@@

@ depends on haskernel @
expression E1, E2;
@@

- (E1 + (E2 - 1)) & ~(E2 - 1)
+ ALIGN(E1, E2)

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: bcm: Replace <asm/uaccess.h> by <linux/uaccess.h>

This patch fixes the checkpatch warning to include <linux/uaccess.h> instead
of <asm/uaccess.h>.

Signed-off-by: Ashley Smith <ashley@eclipso.ch>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: Added in r819xU_firmware_img.c an include to fix a sparse warning

Fix the following warnings from sparse in r819xU_firmware_img.c
due to the missing include of r819xU_firmware_img.h

  CHECK   drivers/staging/rtl8192u/r819xU_firmware_img.c
drivers/staging/rtl8192u/r819xU_firmware_img.c:4:5: warning: symbol 'Rtl8192UsbPHY_REGArray' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:7:5: warning: symbol 'Rtl8192UsbPHY_REG_1T2RArray' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:158:5: warning: symbol 'Rtl8192UsbRadioA_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:284:5: warning: symbol 'Rtl8192UsbRadioB_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:326:5: warning: symbol 'Rtl8192UsbRadioC_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:329:5: warning: symbol 'Rtl8192UsbRadioD_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:332:5: warning: symbol 'Rtl8192UsbMACPHY_Array' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:341:5: warning: symbol 'Rtl8192UsbMACPHY_Array_PG' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware_img.c:354:5: warning: symbol 'Rtl8192UsbAGCTAB_Array' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: make in ieee80211/ieee80211_tx.c some local functions static

Make some local functions (ieee80211_qurey_ShortPreambleMode and
ieee80211_query_HTCapShortGI) static and fix coding style in these
function declarations when It is necessary.

Fix the following sparse warnings in ieee80211/ieee80211_tx.c

drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:381:6: warning: symbol 'ieee80211_qurey_ShortPreambleMode' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:395:1: warning: symbol 'ieee80211_query_HTCapShortGI' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: make in ieee80211/ieee80211_softmac.c some local functions static

Make some local functions static and fix coding style in these function
declarations when It is necessary

These are the local functions that were made static:

ieee80211_MFIE_rate_len, ieee80211_MFIE_Brate, ieee80211_MFIE_Grate,
ieee80211_WMM_Info, enqueue_mgmt, dequeue_mgmt, init_mgmt_queue,
MgntQuery_MgntFrameTxRate, ieee80211_send_beacon,
ieee80211_send_beacon_cb, ieee80211_softmac_scan_wq,
ieee80211_beacons_start, ieee80211_beacons_stop,
ieee80211_softmac_stop_scan, ieee80211_auth_resp, ieee80211_null_func,
ieee80211_resp_to_assoc_rq, ieee80211_resp_to_auth,
ieee80211_resp_to_probe, ieee80211_associate_abort_cb,
ieee80211_associate_step1, ieee80211_auth_challenge,
ieee80211_associate_step2, ieee80211_associate_complete_wq,
ieee80211_associate_complete, ieee80211_associate_procedure_wq,
auth_rq_parse, assoc_rq_parse, ieee80211_sta_ps_send_null_frame,
ieee80211_sta_ps_sleep, ieee80211_process_action, ieee80211_resume_tx,
ieee80211_start_monitor_mode, ieee80211_start_ibss_wq,
ieee80211_associate_retry_wq, ieee80211_wpa_assoc_frame,
ieee80211_sta_ps, ieee80211_send_probe, ieee80211_start_scan
and ieee80211_assoc_resp

Fix the following sparse warnings in ieee80211/ieee80211_softmac.c

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:41:14: warning: symbol 'ieee80211_MFIE_rate_len' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:59:6: warning: symbol 'ieee80211_MFIE_Brate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:76:6: warning: symbol 'ieee80211_MFIE_Grate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:100:6: warning: symbol 'ieee80211_WMM_Info' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:142:6: warning: symbol 'enqueue_mgmt' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:160:16: warning: symbol 'dequeue_mgmt' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:175:6: warning: symbol 'init_mgmt_queue' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:180:4: warning: symbol 'MgntQuery_MgntFrameTxRate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:359:6: warning: symbol 'ieee80211_send_beacon' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:385:6: warning: symbol 'ieee80211_send_beacon_cb' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:488:6: warning: symbol 'ieee80211_softmac_scan_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:532:6: warning: symbol 'ieee80211_beacons_start' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:543:6: warning: symbol 'ieee80211_beacons_stop' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:575:6: warning: symbol 'ieee80211_softmac_stop_scan' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:890:16: warning: symbol 'ieee80211_auth_resp' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:918:16: warning: symbol 'ieee80211_null_func' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:944:6: warning: symbol 'ieee80211_resp_to_assoc_rq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:953:6: warning: symbol 'ieee80211_resp_to_auth' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:962:6: warning: symbol 'ieee80211_resp_to_probe' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1244:6: warning: symbol 'ieee80211_associate_abort_cb' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1250:6: warning: symbol 'ieee80211_associate_step1' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1276:6: warning: symbol 'ieee80211_auth_challenge' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1306:6: warning: symbol 'ieee80211_associate_step2' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1325:6: warning: symbol 'ieee80211_associate_complete_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1372:6: warning: symbol 'ieee80211_associate_complete' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1383:6: warning: symbol 'ieee80211_associate_procedure_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1556:5: warning: symbol 'auth_rq_parse' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1612:5: warning: symbol 'assoc_rq_parse' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1706:6: warning: symbol 'ieee80211_sta_ps_send_null_frame' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1717:7: warning: symbol 'ieee80211_sta_ps_sleep' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1882:6: warning: symbol 'ieee80211_process_action' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2185:6: warning: symbol 'ieee80211_resume_tx' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2314:6: warning: symbol 'ieee80211_start_monitor_mode' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2324:6: warning: symbol 'ieee80211_start_ibss_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2497:6: warning: symbol 'ieee80211_associate_retry_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2768:6: warning: symbol 'ieee80211_wpa_assoc_frame' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1765:13: warning: symbol 'ieee80211_sta_ps' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:398:6: warning: symbol 'ieee80211_send_probe' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:604:6: warning: symbol 'ieee80211_start_scan' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:836:16: warning: symbol 'ieee80211_assoc_resp' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: make in ieee80211/ieee80211_rx.c some local functions static

Make some local functions (AddReorderEntry, RxReorderIndicate and
parse_subframe) static and fix coding style in this function
declarations when It is necessary.

Fix the following sparse warnings in ieee80211/ieee80211_rx.c

drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:521:1: warning: symbol 'AddReorderEntry' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:604:6: warning: symbol 'RxReorderIndicatePacket' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:774:4: warning: symbol 'parse_subframe' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: rtl8192u: Deleted 'HTUseDefaultSetting' function in ieee80211/rtl819x_HTProc.c

This patch delete the 'HTUseDefaultSetting' function that is not used in anywhere in the driver.

Fix the following sparse warnings in ieee80211/rtl819x_HTProc.c

drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c:1323:6: warning: symbol 'HTUseDefaultSetting' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Staging: unisys: Replace kmalloc/memset with kzalloc

This patch solves the Coccinelle warning: "kzalloc should be used instead of
kmalloc/memset".

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: dgap: Fix mismatch in function argument types

This patch fixes the following error reported by sparse:
drivers/staging/dgap/dgap.c:4428:13: error: symbol 'dgap_do_fep_load' redeclared with different type (originally declared at drivers/staging/dgap/dgap.c:215) - incompatible argument 2 (different address spaces)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
staging: dt3155v4l: make q_ops static

Since q_ops is only referenced in dt3155v4l.c, mark it as static.

This removes the following sparse warning:
drivers/staging/media/dt3155v4l//dt3155v4l.c:302:22: warning: symbol 'q_ops' was not declared. Should it be static?

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>