platform/kernel/linux-starfive.git
9 years agostaging: comedi: pcl818: remove VIRT_TO_BUS dependancy
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:58 +0000 (10:55 -0700)]
staging: comedi: pcl818: remove VIRT_TO_BUS dependancy

Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl818: introduce struct pcl818_dma_desc
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:57 +0000 (10:55 -0700)]
staging: comedi: pcl818: introduce struct pcl818_dma_desc

For aesthetics, introduce a struct to hold the DMA descriptor data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl818: introduce pcl818_dma_free()
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:56 +0000 (10:55 -0700)]
staging: comedi: pcl818: introduce pcl818_dma_free()

For aesthetics, move the freeing of the DMA channel and the buffers to
a helper function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl818: introduce pcl818_alloc_dma()
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:55 +0000 (10:55 -0700)]
staging: comedi: pcl818: introduce pcl818_alloc_dma()

DMA is optional with this driver. Introduce a helper function to request
the DMA channel and allocate the buffers. Don't fail the driver attach
if the user passed an invalid DMA channel or the channel cannot be
requested.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_labpc: remove VIRT_TO_BUS dependancy
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:54 +0000 (10:55 -0700)]
staging: comedi: ni_labpc: remove VIRT_TO_BUS dependancy

Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_labpc_isadma: tidy up labpc_init_dma_chan()
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:53 +0000 (10:55 -0700)]
staging: comedi: ni_labpc_isadma: tidy up labpc_init_dma_chan()

DMA support is optional for the labpc driver. The return value from
labpc_init_dma_chan() is not even checked by the caller.

Change the return type to void and tidy up the function a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_labpc: introduce struct labpc_dma_desc
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:52 +0000 (10:55 -0700)]
staging: comedi: ni_labpc: introduce struct labpc_dma_desc

For aesthetics, introduce a struct to hold the DMA descriptor data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_at_a2150: remove VIRT_TO_BUS dependancy
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:51 +0000 (10:55 -0700)]
staging: comedi: ni_at_a2150: remove VIRT_TO_BUS dependancy

Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_at_a2150: introduce struct a2150_dma_desc
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:50 +0000 (10:55 -0700)]
staging: comedi: ni_at_a2150: introduce struct a2150_dma_desc

For aesthetics, introduce a struct to hold the DMA descriptor data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_at_a2150: introduce a2150_free_dma()
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:49 +0000 (10:55 -0700)]
staging: comedi: ni_at_a2150: introduce a2150_free_dma()

For aesthetics, introduce a helper function to free the DMA channel and
buffer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_at_a2150: introduce a2150_alloc_irq_dma()
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:48 +0000 (10:55 -0700)]
staging: comedi: ni_at_a2150: introduce a2150_alloc_irq_dma()

This driver requires an IRQ and DMA in order to support async commands.

For aesthetics, introduce a helper function to request the IRQ and DMA
channels and allocate the DMA buffer. Since the async command support
is optional, make the helper function handle any request/allocation
errors and allow the driver to still attach without async command support.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_at_a2150: use comedi_bytes_per_sample()
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:47 +0000 (10:55 -0700)]
staging: comedi: ni_at_a2150: use comedi_bytes_per_sample()

For aesthetics, use the helper function to get the byte size of each sample
instead of using sizeof() the first buffer element.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_at_a2150: remove 'volatile' from private data variable
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:46 +0000 (10:55 -0700)]
staging: comedi: ni_at_a2150: remove 'volatile' from private data variable

As indicated by checkpatch.pl, "WARNING: Use of volatile is usually
wrong: ...", the 'count' member of the private data does not need to
be volatile.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das1800: introduce das1800_free_dma()
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:45 +0000 (10:55 -0700)]
staging: comedi: das1800: introduce das1800_free_dma()

For aesthetics, introduce a helper function to free the DMA channels and
allocated buffers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das1800: remove VIRT_TO_BUS dependancy
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:44 +0000 (10:55 -0700)]
staging: comedi: das1800: remove VIRT_TO_BUS dependancy

Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das1800: tidy up das1800_init_dma()
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:43 +0000 (10:55 -0700)]
staging: comedi: das1800: tidy up das1800_init_dma()

Refactor this function so that a for loop can be used to request and
set up the two DMA descriptors.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das1800: introduce struct das1800_dma_desc
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:42 +0000 (10:55 -0700)]
staging: comedi: das1800: introduce struct das1800_dma_desc

For aesthetics, introduce a struct to hold the DMA descriptor data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das1800: separate AI FIFO bounce buffer from DMA buffer
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:41 +0000 (10:55 -0700)]
staging: comedi: das1800: separate AI FIFO bounce buffer from DMA buffer

This driver can use DMA or the hardware FIFO to read analog input samples.
When DMA is enabled it's also possible for some async commands to cause
DMA to be disabled and the FIFO is used instead.

Currently the first DMA channels buffer is used for the bounce buffer
when using the FIFO. For aesthetics, add a new member to the private
data and use that for the FIFO bounce buffer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das1800: reduce indent level of das1800_init_dma()
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:40 +0000 (10:55 -0700)]
staging: comedi: das1800: reduce indent level of das1800_init_dma()

An IRQ and at least one DMA channel are required to use DMA with this driver.
Move the check to the caller to reduce the indent level of this function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: remove VIRT_TO_BUS dependancy
H Hartley Sweeten [Mon, 12 Jan 2015 17:55:39 +0000 (10:55 -0700)]
staging: comedi: adl_pci9118: remove VIRT_TO_BUS dependancy

This driver no longer uses virt_to_bus(). Remove the dependancy.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Remove check of ieee in rtl819x_BAProc.c
Vaishali Thakkar [Sat, 10 Jan 2015 10:35:32 +0000 (16:05 +0530)]
Staging: rtl8192u: Remove check of ieee in rtl819x_BAProc.c

This patch fixes following smatch warning:

drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:117
ieee80211_ADDBA() warn: variable dereferenced before check 'ieee' (see line 114)

As ieee can not be NULL at this point, all such checks are removed.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Fix duplicated conditional branch
Alexander Kuleshov [Sun, 4 Jan 2015 07:23:50 +0000 (13:23 +0600)]
staging: rtl8192e: Fix duplicated conditional branch

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: rtl8192u driver cleanup
Rene Kolarik [Mon, 12 Jan 2015 01:31:57 +0000 (02:31 +0100)]
drivers: staging: rtl8192u driver cleanup

Correct redundant initialization reported by sparse

Signed-off-by: Rene Kolarik <rene.kolarik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: remove spaces before commas
Max Perepelitsyn [Fri, 2 Jan 2015 08:08:08 +0000 (14:08 +0600)]
staging: rtl8712: remove spaces before commas

checkpatch.pl fix for
ERROR: space prohibited before that ',' (ctx:WxE)

Signed-off-by: Max Perepelitsyn <mperepelitsyn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: fixed a space coding style issue
Gangadhar Vukkesala [Sun, 21 Dec 2014 02:53:59 +0000 (08:23 +0530)]
staging: rtl8192e: fixed a space coding style issue

Fixed a space coding style issue in 3-dimensional array initialization
which was found when running checkpatch.pl script on rtl819x_HTProc.c.

Signed-off-by: Gangadhar Vukkesala <gangs.freelancer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rtllib_rx.c: Remove some unused functions
Rickard Strandqvist [Sun, 21 Dec 2014 17:53:37 +0000 (18:53 +0100)]
staging: rtl8192e: rtllib_rx.c: Remove some unused functions

Removes some functions that are not used anywhere:
update_ibss_network() rtllib_SignalStrengthTranslate()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rtl8192e: rtl_pm.c: Remove some unused functions
Rickard Strandqvist [Sat, 20 Dec 2014 12:49:58 +0000 (13:49 +0100)]
staging: rtl8192e: rtl8192e: rtl_pm.c: Remove some unused functions

Removes some functions that are not used anywhere:
rtl8192E_save_state() rtl8192E_enable_wake()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: core: rtw_mlme_ext.c: Remove unused function
Rickard Strandqvist [Sat, 20 Dec 2014 12:23:03 +0000 (13:23 +0100)]
staging: rtl8188eu: core: rtw_mlme_ext.c: Remove unused function

Remove the function NULL_hdl() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: rtl871x_mp_ioctl.c: Remove some unused functions
Rickard Strandqvist [Sat, 20 Dec 2014 12:17:46 +0000 (13:17 +0100)]
staging: rtl8712: rtl871x_mp_ioctl.c: Remove some unused functions

Removes some functions that are not used anywhere:
oid_rt_pro_h2c_get_rate_table_hdl() oid_rt_pro_h2c_set_rate_table_hdl()
oid_rt_pro_set_pwrstate_hdl() oid_rt_pro_qry_pwrstate_hdl()
oid_rt_pro_set_basic_rate_hdl() oid_rt_pro_set_power_tracking_hdl()
oid_rt_pro_set_data_rate_ex_hdl() oid_rt_pro_cfg_debug_message_hdl()
oid_rt_poll_rx_status_hdl() oid_rt_pro_set_rf_intfs_hdl()
oid_rt_wr_attrib_mem_hdl() oid_rt_rd_attrib_mem_hdl()
oid_rt_pro8711_pkt_loss_hdl() oid_rt_pro8711_wi_poll_hdl()
oid_rt_pro_write16_eeprom_hdl() oid_rt_pro_read16_eeprom_hdl()
oid_rt_pro_write_txcmd_hdl() oid_rt_pro_burst_write_register_hdl()
oid_rt_pro_burst_read_register_hdl() oid_rt_pro8711_join_bss_hdl()
oid_rt_pro_set_pkt_test_mode_hdl() oid_rt_pro_set_tx_agc_offset_hdl()
oid_rt_set_crystal_cap_hdl() oid_rt_pro_rw_efuse_pgpkt_hdl()
oid_rt_pro_rx_packet_type_hdl() oid_rt_pro_query_dr_variable_hdl()
oid_rt_pro_dele_sta_info_hdl() oid_rt_pro_add_sta_info_hdl()
oid_rt_pro_encryption_ctrl_hdl()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: removed an unnecessary else statement
Karthik Nayak [Thu, 18 Dec 2014 09:20:11 +0000 (14:50 +0530)]
Staging: rtl8192u: removed an unnecessary else statement

As per checkpatch warning, removed an unnecessary else statement
proceeding an if statement with a return.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rtl8192e: rtl_cam.c: Remove unused function
Rickard Strandqvist [Sun, 7 Dec 2014 22:28:37 +0000 (23:28 +0100)]
staging: rtl8192e: rtl8192e: rtl_cam.c: Remove unused function

Remove the function CAM_read_entry() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: os_dep: usb_ops_linux.c: Remove unused function
Rickard Strandqvist [Sun, 7 Dec 2014 21:59:07 +0000 (22:59 +0100)]
staging: rtl8188eu: os_dep: usb_ops_linux.c: Remove unused function

Remove the function usb_writeN() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: hal: rtl8188e_hal_init.c: Remove unused function
Rickard Strandqvist [Sun, 7 Dec 2014 18:16:15 +0000 (19:16 +0100)]
staging: rtl8188eu: hal: rtl8188e_hal_init.c: Remove unused function

Remove the function GetEEPROMSize8188E() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: hal: rtl8188e_cmd.c: Remove unused function
Rickard Strandqvist [Sun, 7 Dec 2014 17:33:06 +0000 (18:33 +0100)]
staging: rtl8188eu: hal: rtl8188e_cmd.c: Remove unused function

Remove the function rtl8188e_set_rssi_cmd() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u : fix space before , coding style issue in r8190_rtl8256.c
Mohammad Jamal [Tue, 16 Dec 2014 16:27:44 +0000 (21:57 +0530)]
Staging: rtl8192u : fix space before , coding style issue in r8190_rtl8256.c

This is a patch to r8190_rtl8256.c file that fixes space before , warning found by checkpatch.pl tool

Signed-off-by: Mohammad Jamal<md.jamalmohiuddin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rejoin split quoted strings
Jonathan Jin [Tue, 16 Dec 2014 03:28:23 +0000 (21:28 -0600)]
staging: rtl8192e: rejoin split quoted strings

Fix a checkpatch.pl warning regarding quoted string splits across lines.
While each join of these quoted strings results in a new checkpatch.pl
"lines over 80 characters" warning, the regained ability to grep for
these log strings in the codebase is, I would argue, well worth the
trade-off.

Signed-off-by: Jonathan Jin <jjin082693@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: Fixed a space coding style issue.
Gangadhar Vukkesala [Sat, 20 Dec 2014 15:59:47 +0000 (21:29 +0530)]
staging: rtl8188eu: Fixed a space coding style issue.

Fixed a space coding style issue which was found when running checkpatch.pl
script on rtw_ap.c.

Signed-off-by: Gangadhar Vukkesala <gangs.freelancer@gmail.com>
Reviewed-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: {core, hal, include}: Removed inline function
Abel Moyo [Thu, 4 Dec 2014 13:13:21 +0000 (14:13 +0100)]
Staging: rtl8188eu: {core, hal, include}: Removed inline function

Removed inline function get_my_bssid and open coded all its references

Signed-off-by: Abel Moyo <abelmoyo.ab@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: fix sparse warning
Alexey Tulia [Wed, 24 Dec 2014 06:15:09 +0000 (09:15 +0300)]
staging: rtl8723au: fix sparse warning

drivers/staging/rtl8723au/core/rtw_xmit.c:2375 warning: symbol
'rtw_ack_tx_done23a' was not declared. Should it be static?

Function 'rtw_ack_tx_done23a' seems to be unused in current staging
code.

Signed-off-by: Alexey Tulia <alexey.tulia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: hal: odm.c: Remove some unused functions
Rickard Strandqvist [Sat, 20 Dec 2014 16:44:10 +0000 (17:44 +0100)]
staging: rtl8723au: hal: odm.c: Remove some unused functions

Removes some functions that are not used anywhere:
odm_1R_CCA23a() odm_TXPowerTrackingCheckAP() odm_TXPowerTrackingCheckMP()
odm_RSSIMonitorCheck23aAP() odm_RSSIMonitorCheck23aMP() odm_RSSIMonitorInit()
odm_RefreshRateAdaptiveMask23aAPADSL23a() odm_RefreshRateAdaptiveMask23aMP23a()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: core: rtw_ap: checkpatch.pl fixes
Joe Borg [Tue, 16 Dec 2014 07:54:32 +0000 (02:54 -0500)]
Staging: rtl8723au: core: rtw_ap: checkpatch.pl fixes

Fixing styling errors found with checkpatch.pl. These include:
"(foo*)" should be "(foo *)"
space required after that ';'

...totalling 5 styling errors.

Signed-off-by: Joe Borg <joe@josephb.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix sparse invalid assignment warnings
Yannis Damigos [Sat, 20 Dec 2014 16:47:27 +0000 (18:47 +0200)]
staging: rtl8723au: Fix sparse invalid assignment warnings

This is a patch to the hal/rtl8723au_xmit.c file that fixes the
following warnings found by sparse tool:

drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:88:22: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:88:22:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:88:22:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:91:22: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:91:22:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:91:22:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:99:22: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:99:22:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:99:22:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:103:30: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:103:30:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:103:30:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:106:38: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:106:38:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:106:38:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:108:38: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:108:38:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:108:38:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:112:38: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:112:38:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:112:38:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:120:22: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:120:22:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:120:22:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:123:30: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:123:30:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:123:30:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:125:30: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:125:30:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:125:30:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:129:30: warning: invalid assignment: |=
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:129:30:    left side has type unsigned int
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:129:30:    right side has type restricted __le32
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:184:51: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:184:51:    expected unsigned int [usertype] *pdw
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:184:51:    got restricted __le32 *<noident>
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:185:51: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:185:51:    expected unsigned int [usertype] *pdw
drivers/staging/rtl8723au//hal/rtl8723au_xmit.c:185:51:    got restricted __le32 *<noident>

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: fixing "foo * bar" should be "foo *bar"
Asaf Vertz [Tue, 16 Dec 2014 13:57:58 +0000 (15:57 +0200)]
staging: rtl8723au: core: fixing "foo * bar" should be "foo *bar"

Fixed a coding style error, "foo * bar" should be "foo *bar"

Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix sparse warnings
Krzysztof Konopko [Mon, 15 Dec 2014 15:02:14 +0000 (16:02 +0100)]
staging: rtl8723au: Fix sparse warnings

Some struct fields in wifi.h are meant to be __le16 but were declared as
unsigned short.  This was reported by sparse:

  rtw_wlan_util.c:538:24: warning: cast to restricted __le16
  rtw_wlan_util.c:1544:29: warning: cast to restricted __le16
  rtw_wlan_util.c:1546:25: warning: cast to restricted __le16

This patch updates the types of the fields in `AC_param` and
`ADDBA_request` structs to be consistent with relevant structs in
include/linux/ieee80211.h.

Signed-off-by: Krzysztof Konopko <kris@konagma.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: os_dep: Fixed a coding style issue.
Dean Michael Ancajas [Mon, 8 Dec 2014 20:55:21 +0000 (13:55 -0700)]
Staging: rtl8723au: os_dep: Fixed a coding style issue.

Fixed a coding style issue for braces.

Signed-off-by: Dean Michael Ancajas <dbancajas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: hal: Removed a space before semicolon
Anjana Sasindran [Fri, 5 Dec 2014 15:47:02 +0000 (21:17 +0530)]
staging: rtl8723au: hal: Removed a space before semicolon

This patch fix the checkpatch.pl warning:

WARNING: space before semicolon prohibited

Signed-off-by: Anjana Sasindran <anjanasasindran123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: hal: Removed space before semicolon
Anjana Sasindran [Thu, 4 Dec 2014 13:50:30 +0000 (19:20 +0530)]
staging: rtl8723au: hal: Removed space before semicolon

This patch fix the checkpatch.pl warning:

WARNING: spaces prohibited before semicolon

Signed-off-by: Anjana Sasindran <anjanasasindran123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: hal: Added blank line after declaration
Anjana Sasindran [Thu, 4 Dec 2014 12:41:13 +0000 (18:11 +0530)]
staging: rtl8723au: hal: Added blank line after declaration

This patch fix the checkpatch.pl warning:

WARNING: Missing blank line after declaration

Signed-off-by: Anjana Sasindran <anjanasasindran123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: rtl8723au: Fix "'foo * bar' should be 'foo *bar'" errors
Greg Donald [Thu, 4 Dec 2014 02:19:59 +0000 (20:19 -0600)]
drivers: staging: rtl8723au: Fix "'foo * bar' should be 'foo *bar'" errors

Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Hal8723PwrSeq.h: Use BIT() define to match mask value
Jes Sorensen [Thu, 4 Dec 2014 21:15:54 +0000 (16:15 -0500)]
staging: rtl8723au: Hal8723PwrSeq.h: Use BIT() define to match mask value

This is a no-op change, but it improves consistency.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Hal8723PwrSeq.h: Remove SDIO specific entries
Jes Sorensen [Thu, 4 Dec 2014 21:15:53 +0000 (16:15 -0500)]
staging: rtl8723au: Hal8723PwrSeq.h: Remove SDIO specific entries

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Hal8723PwrSeq.h: Remove PCI specific entries from the power seque...
Jes Sorensen [Thu, 4 Dec 2014 21:15:52 +0000 (16:15 -0500)]
staging: rtl8723au: Hal8723PwrSeq.h: Remove PCI specific entries from the power sequence tables

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: HalPwrSeqCmdParsing23a(): Avoid unnecessary variable inits
Jes Sorensen [Thu, 4 Dec 2014 21:15:51 +0000 (16:15 -0500)]
staging: rtl8723au: HalPwrSeqCmdParsing23a(): Avoid unnecessary variable inits

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Hal8723APhyCfg.h: Remove more unused #defines
Jes Sorensen [Thu, 4 Dec 2014 21:15:50 +0000 (16:15 -0500)]
staging: rtl8723au: Hal8723APhyCfg.h: Remove more unused #defines

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: There is no 11N pseudo PHY here
Jes Sorensen [Thu, 4 Dec 2014 21:15:49 +0000 (16:15 -0500)]
staging: rtl8723au: There is no 11N pseudo PHY here

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Baseband is always configured through PHY regs
Jes Sorensen [Thu, 4 Dec 2014 21:15:48 +0000 (16:15 -0500)]
staging: rtl8723au: Baseband is always configured through PHY regs

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Hal8723APhyCfg.h: Remove some undefined structs and enums
Jes Sorensen [Thu, 4 Dec 2014 21:15:47 +0000 (16:15 -0500)]
staging: rtl8723au: Hal8723APhyCfg.h: Remove some undefined structs and enums

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Use enum for counter and avoid ugly typecast
Jes Sorensen [Thu, 4 Dec 2014 21:15:46 +0000 (16:15 -0500)]
staging: rtl8723au: Use enum for counter and avoid ugly typecast

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Use proper enum defines
Jes Sorensen [Thu, 4 Dec 2014 21:15:45 +0000 (16:15 -0500)]
staging: rtl8723au: Use proper enum defines

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Use correct register names to set parameters to reduce 80M spur
Jes Sorensen [Thu, 4 Dec 2014 21:15:44 +0000 (16:15 -0500)]
staging: rtl8723au: Use correct register names to set parameters to reduce 80M spur

Use the correct register names when setting parameters to reduce 80M
spur. In addition apply updated 80M spur reduction parameters.

Original patch supplied by Andrew Chang <andrew.chang@realtek.com>

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: usb_dvobj_init(): A NULL pointer check for usb_host_endpoints...
Jes Sorensen [Thu, 4 Dec 2014 21:15:43 +0000 (16:15 -0500)]
staging: rtl8723au: usb_dvobj_init(): A NULL pointer check for usb_host_endpoints makes no sense

struct usb_host_interface points to an array of
struct usb_host_endpoints - it makes no sense to do a NULL pointer
check for each pointer.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: hal: Removed spaces before semicolon
Anjana Sasindran [Wed, 3 Dec 2014 16:12:09 +0000 (21:42 +0530)]
staging: rtl8723au: hal: Removed spaces before semicolon

This patch fix the checkpatch.pl warning:

WARNING: space prohibited before semicolon

Signed-off-by: Anjana Sasindran <anjanasasindran123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8712: Fixes brace coding style in rtl871x_sta_mgt.c
Paul Hedman [Wed, 3 Dec 2014 02:34:13 +0000 (20:34 -0600)]
Staging: rtl8712: Fixes brace coding style in rtl871x_sta_mgt.c

This patch fixes a brace warning in rtl871x_sta_mgt.c found
by the checkpatch.pl tool.

Signed-off-by: Paul Hedman <paul@mybb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6656: Checkpatch fix: else after break or return
Emrys Bayliss [Mon, 12 Jan 2015 16:51:36 +0000 (03:51 +1100)]
Staging: vt6656: Checkpatch fix: else after break or return

This patch fixes the following checkpatch.pl error:
rxtx.c:588: WARNING: else is not generally useful after a break or return

Signed-off-by: Emrys Bayliss <emrys@paradise.net.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6656: Fixed typo in a variable name
Gustavo A. R. Silva [Sun, 11 Jan 2015 22:46:45 +0000 (16:46 -0600)]
Staging: vt6656: Fixed typo in a variable name

Fixed typo in a variable name in dpc.h file.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6656: Fixed typo in a macro name
Gustavo A. R. Silva [Sun, 11 Jan 2015 22:35:54 +0000 (16:35 -0600)]
Staging: vt6656: Fixed typo in a macro name

Fixed typo in a macro name in card.c and device.h files.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6655: Fixed a typo
Gustavo A. R. Silva [Sun, 11 Jan 2015 22:18:00 +0000 (16:18 -0600)]
Staging: vt6655: Fixed a typo

Fixed a typo in mac.c file.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: [BUG] Protect MACvSelectPage1 with lock.
Malcolm Priestley [Sun, 11 Jan 2015 10:26:12 +0000 (10:26 +0000)]
staging: vt6655: [BUG] Protect MACvSelectPage1 with lock.

The device must not flip to page 1 while in interrupt lock causing
loss of connection or dead lock.

Protect from changes to page by adding lock where user can
change the page in CARDvSetRSPINF, vnt_configure and set_channel

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6655: fix a space coding style issue
Piotr Kubus [Sat, 10 Jan 2015 14:35:45 +0000 (15:35 +0100)]
Staging: vt6655: fix a space coding style issue

Fixed a space coding style issue found by checkpatch.pl in rxtx.c.

Signed-off-by: Piotr Kubus <p.t.kubus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6655: baseband.c: fixed line over 80 characters
Sakshi Bansal [Thu, 8 Jan 2015 16:37:41 +0000 (22:07 +0530)]
Staging: vt6655: baseband.c: fixed line over 80 characters

Signed-off-by: Sakshi Bansal <sakshi.april5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Replace C99 comments in power.c and upc.h.
Nicholas Parkanyi [Tue, 30 Dec 2014 09:57:44 +0000 (04:57 -0500)]
staging: vt6655: Replace C99 comments in power.c and upc.h.

This patch fixes the following checkpatch.pl warnings:

ERROR: do not use C99 // comments
+//

ERROR: do not use C99 // comments
+//  For memory mapped IO

ERROR: do not use C99 // comments
+//

ERROR: do not use C99 // comments
+#endif // __UPC_H__

ERROR: do not use C99 // comments
+ // set period of power up before TBTT

ERROR: do not use C99 // comments
+ // set AID

ERROR: do not use C99 // comments
+ // set ATIM Window

ERROR: do not use C99 // comments
+ // Set AutoSleep

ERROR: do not use C99 // comments
+ // Set HWUTSF

ERROR: do not use C99 // comments
+ // clear always listen beacon

ERROR: do not use C99 // comments
+ // first time set listen next beacon

ERROR: do not use C99 // comments
+ // always listen beacon

ERROR: do not use C99 // comments
+ // enable power saving hw function

ERROR: do not use C99 // comments
+ // disable power saving hw function

ERROR: do not use C99 // comments
+ //clear AutoSleep

ERROR: do not use C99 // comments
+ //clear HWUTSF

ERROR: do not use C99 // comments
+ // set always listen beacon

Signed-off-by: Nicholas Parkanyi <n.parkanyi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: whitespace checkpatch warning fix.
Krzysztof Adamski [Wed, 10 Dec 2014 17:05:31 +0000 (18:05 +0100)]
staging: vt6656: whitespace checkpatch warning fix.

This fixes following checkpatch.pl error:
ERROR: space prohibited before that ',' (ctx:WxW)

Signed-off-by: Krzysztof Adamski <k@japko.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: remove unused function in mac.c
Fred Chou [Wed, 10 Dec 2014 05:50:16 +0000 (13:50 +0800)]
staging: vt6655: remove unused function in mac.c

Removed the unused function MACvGetShortRetryLimit, which also
fixed the following sparse warning:
drivers/staging/vt6655/mac.c:162:6: warning:
symbol 'MACvGetShortRetryLimit' was not declared. Should it be static?

Signed-off-by: Fred Chou <fred.chou.nd@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Use ether_addr_copy() on vnt_private members.
Krzysztof Adamski [Tue, 9 Dec 2014 11:01:38 +0000 (12:01 +0100)]
staging: vt6656: Use ether_addr_copy() on vnt_private members.

This patch fixes checkpatch.pl warning:
WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)

current_net_addr and permanent_net_addr members of vnt_private alignment
is changed to at last 16 bits so that ether_addr_copy can be safely used
on them.

buf->data is of type ieee80211_cts which is already properly aligned.

Signed-off-by: Krzysztof Adamski <k@japko.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Use ether_addr_copy() in vnt_fill_ieee80211_rts.
Krzysztof Adamski [Mon, 8 Dec 2014 11:13:41 +0000 (12:13 +0100)]
staging: vt6656: Use ether_addr_copy() in vnt_fill_ieee80211_rts.

Both struct ieee80211_rts and struct ieee80211_hdr defined in
linux/ieee80211.h are declared as __aligned(2) so it is safe to use
ether_addr_copy() instead of memcpy().

Signed-off-by: Krzysztof Adamski <k@japko.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Declare vnt_init() static
Sören Brinkmann [Fri, 5 Dec 2014 04:33:41 +0000 (20:33 -0800)]
staging: vt6655: Declare vnt_init() static

Fix sparse warning:
  drivers/staging/vt6655/device_main.c:1672:5: warning: symbol 'vnt_init' was not declared. Should it be static?

Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: Remove magic numbers in LCD commands
Mariusz Gorski [Fri, 5 Dec 2014 21:28:19 +0000 (22:28 +0100)]
staging: panel: Remove magic numbers in LCD commands

Get rid of magic numbers in LCD commands and replace them with defined
values, so that it's more obvious that the commands are doing.

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: Remove unused variable
Mariusz Gorski [Wed, 3 Dec 2014 18:53:47 +0000 (19:53 +0100)]
staging: panel: Remove unused variable

Remove lcd.left_shift because it is only written to at some places but
never read from.

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix checkpatch space prohibited before comma errors
Syed Amer Gilani [Sat, 27 Dec 2014 20:57:43 +0000 (21:57 +0100)]
staging: unisys: fix checkpatch space prohibited before comma errors

Fixes checkpatch Error:
ERROR: space prohibited before that ',' (ctx:WxW)

Signed-off-by: Syed Amer Gilani <syed.amer@gilani.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: uislib: uisutils.c: Fix a missing va_end
Rickard Strandqvist [Sat, 27 Dec 2014 22:04:14 +0000 (23:04 +0100)]
staging: unisys: uislib: uisutils.c: Fix a missing va_end

A missing va_end in connection with vsnprintf

Was found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: virtpci: virtpci.c: Removes unnecessary NULL check
Rickard Strandqvist [Sun, 14 Dec 2014 23:08:37 +0000 (00:08 +0100)]
staging: unisys: virtpci: virtpci.c: Removes unnecessary NULL check

It is impossible for dprivate to ever be NULL, no check required.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: remove leftover __DATE__
Rasmus Villemoes [Fri, 12 Dec 2014 10:51:27 +0000 (11:51 +0100)]
staging: unisys: remove leftover __DATE__

Commit 836bee9eee6d ("Staging: unisys: remove references to __DATE__
and __TIME__") removed most; this seems to be an accidental
leftover. VERSIONDATE is not used anywhere.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove VISORCHANNEL typedef
Bryan Thompson [Fri, 5 Dec 2014 22:09:25 +0000 (17:09 -0500)]
staging: unisys: Remove VISORCHANNEL typedef

Remove the VISORCHANNEL typedef and rename the base VISORCHANNEL_Tag
structure to visorchannel to follow consistent naming. The longer
struct visorchannel type required additional line wrapping to remain
less than 81 characters.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel: Describe spinlocks in VISORCHANNEL_Tag struct
Bryan Thompson [Fri, 5 Dec 2014 22:09:24 +0000 (17:09 -0500)]
staging: unisys: visorchannel: Describe spinlocks in VISORCHANNEL_Tag struct

Add comments indicating the requirements and use of the insert_lock and
remove_lock in the VISORCHANNEL_Tag structure.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel: Rename CamelCase variable nQueues
Bryan Thompson [Fri, 5 Dec 2014 22:09:23 +0000 (17:09 -0500)]
staging: unisys: visorchannel: Rename CamelCase variable nQueues

Rename the visorchannel_debug parameter nQueues to num_queues.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorchannel: Rename CamelCase variable channelBytes
Bryan Thompson [Fri, 5 Dec 2014 22:09:22 +0000 (17:09 -0500)]
staging: unisys: visorchannel: Rename CamelCase variable channelBytes

Rename channelBytes to channel_bytes in the series of visorchannel_create
functions provided by visorchannel.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: get rid of goto in visorchipset_ioctl()
Benjamin Romer [Fri, 5 Dec 2014 22:09:21 +0000 (17:09 -0500)]
staging: unisys: get rid of goto in visorchipset_ioctl()

Remove another completely unnecessary goto and just return the values
directly.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix CamelCase in visorchipset_mmap()
Benjamin Romer [Fri, 5 Dec 2014 22:09:20 +0000 (17:09 -0500)]
staging: unisys: fix CamelCase in visorchipset_mmap()

Fix CamelCase name:

physAddr => physaddr

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: get rid of goto in visorchipset_open()
Benjamin Romer [Fri, 5 Dec 2014 22:09:19 +0000 (17:09 -0500)]
staging: unisys: get rid of goto in visorchipset_open()

This goto uses CamelCase and was completely unnecessary.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: get rid of HAVE_UNLOCKED_IOCTL code
Benjamin Romer [Fri, 5 Dec 2014 22:09:18 +0000 (17:09 -0500)]
staging: unisys: get rid of HAVE_UNLOCKED_IOCTL code

We definitely have it, so there's no point in keeping the older stuff
around. Get rid of the #ifdefs and old code.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix CamelCase global variables in file.c
Benjamin Romer [Fri, 5 Dec 2014 22:09:17 +0000 (17:09 -0500)]
staging: unisys: fix CamelCase global variables in file.c

Fix CamelCase names:

Cdev => file_cdev
PControlVm_channel => file_controlvm_channel
MajorDev => majordev
Registered => registered

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: refactor visorchipset_file_init()
Benjamin Romer [Fri, 5 Dec 2014 22:09:16 +0000 (17:09 -0500)]
staging: unisys: refactor visorchipset_file_init()

Fix the declaration so it is a single line. Fix CamelCase parameter
names:

MajorDev => major_dev
pControlVm_channel => controlvm_channel

Remove the unnecessary gotos and just return directly in error cases.
Fix the last error condition so it returns the result of cdev_add()
instead of always zero.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: refactor req_handler_add()
Benjamin Romer [Fri, 5 Dec 2014 22:09:15 +0000 (17:09 -0500)]
staging: unisys: refactor req_handler_add()

Fix the CamelCase parameter names:

Server_Channel_Ok => server_channel_ok
Server_Channel_Init => server_channel_init
clientStr => clientstr
clientStrLen => clientstr_len

And remove the extra parenthesis in the list_add_tail() call at the end.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix CamelCase globals in uisutils.c
Benjamin Romer [Fri, 5 Dec 2014 22:09:14 +0000 (17:09 -0500)]
staging: unisys: fix CamelCase globals in uisutils.c

Rename CamelCase global variable names:

ReqHandlerInfo_list => req_handler_info_list
ReqHandlerInfo_list_lock => req_handler_info_list_lock

Update all references to use the new name.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: refactor uisctrl_unregister_req_handler_ex()
Benjamin Romer [Fri, 5 Dec 2014 22:09:13 +0000 (17:09 -0500)]
staging: unisys: refactor uisctrl_unregister_req_handler_ex()

Get rid of the unnecessary goto statement and just return directly.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: refactor uisctrl_register_req_handler_ex()
Benjamin Romer [Fri, 5 Dec 2014 22:09:12 +0000 (17:09 -0500)]
staging: unisys: refactor uisctrl_register_req_handler_ex()

Fix CamelCase local variable name:

pReqHandlerInfo => req_handler

Get rid of the useless goto and just return straight away on an error.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix brackets in uisctrl_register_req_handler_ex()
Benjamin Romer [Fri, 5 Dec 2014 22:09:11 +0000 (17:09 -0500)]
staging: unisys: fix brackets in uisctrl_register_req_handler_ex()

Add the missing brackets to the last if statement in this function.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix spacing in uisutils.c
Benjamin Romer [Fri, 5 Dec 2014 22:09:10 +0000 (17:09 -0500)]
staging: unisys: fix spacing in uisutils.c

Fix as many spacing problems as possible by indenting lines properly and
getting rid of spaces between typecasts and their targets.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix line spacing in uisutils.c
Benjamin Romer [Fri, 5 Dec 2014 22:09:09 +0000 (17:09 -0500)]
staging: unisys: fix line spacing in uisutils.c

Just remove the couple of extra blank lines.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix line spacing in uisthread.c
Benjamin Romer [Fri, 5 Dec 2014 22:09:08 +0000 (17:09 -0500)]
staging: unisys: fix line spacing in uisthread.c

Just remove the one extra blank line.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>