H Hartley Sweeten [Tue, 14 Oct 2014 17:44:45 +0000 (10:44 -0700)]
staging: comedi: addi_apci_3120: simplify analog output boardinfo
There are two boards supported by this driver. One with eight 14-bit analog
outputs and the other without analog outputs.
Add a bit field flag, 'has_ao', to the boardinfo and remove the 'i_NbrAoChannel'
and 'i_AoMaxdata' members. Use the new flag to determine if the analog output
subdevice needs to be initialized and open code the n_chan and maxdata.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:44 +0000 (10:44 -0700)]
staging: comedi: addi_apci_3120: remove boardinfo 'i_AiChannelList'
All boardinfo entries have this member set as '16'. This is also the Analog
Input 'n_chan'. For aesthetics, initialize the Analog Input 'len_chanlist'
with s->n_chan and remove the boardinfo member.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:43 +0000 (10:44 -0700)]
staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrAiChannel'
All boardinfo entries have this member set as '16'. This will initialize
the Analog Input 'n_chan' and cause the 'i_NbrAiChannelDiff' member to
never get used. Remove both members and initialize the Analog Input 'n_chan'
with 16 directly.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:42 +0000 (10:44 -0700)]
staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrDiChannel'
All boardinfo entries have this member set as '4'. Remove the member and
initialize the Digial Input 'n_chan' with 4 directly.
Also, remove the initialization of 'len_chanlist'. This member is only
used with subdevices that support async commands.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:41 +0000 (10:44 -0700)]
staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrDoChannel'
All boardinfo entries have this member set as '4'. Remove the member and
initialize the Digial Output 'n_chan' with 4 directly.
Also, remove the initialization of 'len_chanlist'. This member is only
used with subdevices that support async commands.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:40 +0000 (10:44 -0700)]
staging: comedi: addi_apci_3120: remove boardinfo 'i_DoMaxdata'
The maxdata for a Digital Output subdevice is always '1'. Remove this
incorrect boardinfo.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:39 +0000 (10:44 -0700)]
staging: comedi: addi_common.h: remove unused members from addi_private
Remove all the unused members from the addi_private definition.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:38 +0000 (10:44 -0700)]
staging: comedi: addi_common.h: remove boardinfo definition
The addi_board definition is not only used by the addi_apci_3120 driver.
Introduce a private definition in that driver and remove the global definition
from addi_common.h.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:37 +0000 (10:44 -0700)]
staging: comedi: hwdrv_apci3120: remove need for boardinfo access
The apci3120_ai_insn_config() function is broken in this driver. It does
not follow the comedi API and will fail to work correctly.
For now just remove the need for the boardinfo access to allow additional
cleanup. The 'i_NbrAiChannel' is actually the subdevice 'n_chan' use that
instead and remove the boardinfo access.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:36 +0000 (10:44 -0700)]
staging: comedi: addi_eeprom: remove source file
This source file is no longer included by any of the addi-data drivers.
Remove it.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:35 +0000 (10:44 -0700)]
staging: comedi: addi_apci_035: remove boardinfo
The hardware has an eeprom but the boardinfo properly defines the subdevice
support so reading the eeprom and setting the 's_EeParameters' use is not
necessary. Since the boardinfo only has one entry its not really necessary.
Also, providing a subdevice the read the eeprom is not really interesting.
Remove the eeprom support code along with the boardinfo and initialize the
subdevices directly.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:34 +0000 (10:44 -0700)]
staging: comedi: addi_apci_1500: remove boardinfo
The hardware does not have an eeprom so the 's_EeParameters' use is not
necessary. Remove it.
Since the boardinfo only has one entry its not really necessary. Remove
it and initialize the subdevices directly.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:33 +0000 (10:44 -0700)]
staging: comedi: addi_common.h: remove boardinfo member 'i_PCIEeprom'
This member of the boardinfo is not used by any of the drivers. Remove it.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:32 +0000 (10:44 -0700)]
staging: comedi: addi_apci_035: board has eeprom
As indicated in the boardinfo, the hardware has an eeprom. Simplify
the board attach code and remove the boardinfo.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:31 +0000 (10:44 -0700)]
staging: comedi: addi_apci_1500: remove eeprom support
As indicated in the boardinfo, the hardware does not have an eeprom. Remove
the subdevice and support code for it.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:30 +0000 (10:44 -0700)]
staging: comedi: addi_common.h: remove boardinfo 'i_IorangeBase1'
This member of the boardinfo is used as a flag to determine what PCI BAR
to use for the main 'iobase' used by the driver.
Remove the boardinfo member and refactor the (*auto_attach) of the drivers
to use the correct PCI BAR.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:29 +0000 (10:44 -0700)]
staging: comedi: addi_common.h: rename boardinfo 'pc_DriverName'
Rename this CamelCase member of the boardinfo.
The comedi_device 'board_name' is set to this member during the (*auto_attach)
of the addi-data that still use this boardinfo drivers. For aesthetics, use
the dev->board_name instead of the boardinfo in the drivers.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:28 +0000 (10:44 -0700)]
staging: comedi: addi_apci_1500: remove unused subdevices
Only allocate space for the subdevicess used by the driver. Remove all
the COMEDI_SUBD_UNUSED subdevices.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:27 +0000 (10:44 -0700)]
staging: comedi: addi_apci_1500: remove unnecessary subdevice initialization
The subdevices that don't initialize any of the callbacks don't really
exist. Remove the unnecessary initialzation and just set the type to
COMEDI_SUBD_UNUSED.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:26 +0000 (10:44 -0700)]
staging: comedi: addi_apci_035: remove unused subdevices
Only allocate space for the subdevicess used by the driver. Remove all
the COMEDI_SUBD_UNUSED subdevices.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:25 +0000 (10:44 -0700)]
staging: comedi: addi_apci_035: remove unnecessary subdevice initialization
The subdevices that don't initialize any of the callbacks don't really
exist. Remove the unnecessary initialzation and just set the type to
COMEDI_SUBD_UNUSED.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:24 +0000 (10:44 -0700)]
staging: comedi: addi_common.h: remove subdevice callbacks from struct addi_board
None of the drivers that still include this header use the subdevice callbacks.
Remove all of them to reduce the bloat.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:23 +0000 (10:44 -0700)]
staging: comedi: addi_apci_1500: remove subdevice callbacks from boardinfo
This driver only has one boardinfo entry so the subdevice callbacks are
always the same. Remvoe the callbacks from the boardinfo and use them
directly when initializing the subdevices.
Remove all the subdevice callback initialization that would be set to
NULL.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:22 +0000 (10:44 -0700)]
staging: comedi: addi_apci_035: remove subdevice callbacks from boardinfo
This driver only has one boardinfo entry so the subdevice callbacks are
always the same. Remvoe the callbacks from the boardinfo and use them
directly when initializing the subdevices.
Remove all the subdevice callback initialization that would be set to
NULL.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:21 +0000 (10:44 -0700)]
staging: comedi: addi_common.c: remove included source file
The addi_apci_035 and addi_apci_1500 are the only drivers left that
include this source file. Copy the i_ADDIDATA_InsnReadEeprom() function
from that file to those drivers and remove the addi_common.c file.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:20 +0000 (10:44 -0700)]
staging: comedi: addi_common.c: remove v_ADDI_Interrupt()
The addi_apci_035 and addi_apci_1500 are the only drivers left that use
this function in addi_common.c. The function simply calls the 'interrupt'
function that is in the boardinfo of the driver. Both drivers use the
same 'interrupt' function for all boardnfo entries.
Remove the i_ADDI_Reset() function as well as the 'interrupt' boardinfo
and use the 'interrupt' function directly when doing the request_irq().
In addition, the addi_apci_3120 driver has a private v_ADDI_Interrupt()
function that is doing the same thing. Remove that one as well.
Fix the return type of 'interrupt' functions in the drivers and add the
return vaules.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:19 +0000 (10:44 -0700)]
staging: comedi: addi_common.c: remove addi_auto_attach()
The addi_apci_035 and addi_apci_1500 are the only drivers left that use
this function in addi_common.c. The addi_common code adds a lot of bloat
to the drivers.
Copy the addi_auto_attach() code to the (*auto_attach) functions of the
drivers and remove the function. This will help with removing the bloat.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:18 +0000 (10:44 -0700)]
staging: comedi: addi_common.c: remove i_ADDI_Reset()
The addi_apci_035 and addi_apci_1500 are the only drivers left that use
this function in addi_common.c. The function simply calls the 'reset'
function that is in the boardinfo of the driver. Both drivers use the
same 'reset' function for all boardnfo entries.
Remove the i_ADDI_Reset() function as well as the 'reset' boardinfo and
just call the 'reset' function directly.
The i_ADDI_Reset() is called by addi_auto_attach() in addi_common.c after
a sucessful attach. Modify the (*auto_attach) in the drivers to call the
'reset' function directly and remove it from addi_auto_attach().
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:44:17 +0000 (10:44 -0700)]
staging: comedi: addi_common.c: remove i_ADDI_Detach()
The addi_apci_035 and addi_apci_1500 are the only drivers left that use
this function in addi_common.c. Remove the function an add a private
comedi_driver (*detach) function to those drivers.
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>
H Hartley Sweeten [Tue, 14 Oct 2014 17:11:26 +0000 (10:11 -0700)]
staging: comedi: addi_apci_3200: remove driver
This driver has some serious bitrot. In addition, it's not in the Kconfig
or Makefile so it can't even be built.
Just remove it. It would be easier to rewrite the driver than fix it.
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>
H Hartley Sweeten [Mon, 13 Oct 2014 16:56:08 +0000 (09:56 -0700)]
staging: comedi: comedidev.h: clarify async->event error/cancel detection
Introduce COMEDI_CB_ERROR_MASK and COMEDI_CB_CANCEL_MASK to clarify the
async->events that indicate errors and cancel an async command.
Use the new defines to tidy up and clarify the code.
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>
H Hartley Sweeten [Mon, 13 Oct 2014 16:56:07 +0000 (09:56 -0700)]
staging: comedi: comedidev.h: don't expose COMEDI_CB_* defines to userspace
The COMEDI_CB_* defines are the comedi_async "events" that the drivers set
to let the core detect the state of running async commands. These "events"
are only relevant to the kernel modules and should not be exposed to
userspace in the comedi.h user API header.
Move the defines to comedidev.h to avoid exposing them. For aesthetics,
convert the defines to bit shifts to better indicate that they are bitmask
values. Cleanup the documentation.
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>
Rickard Strandqvist [Sun, 12 Oct 2014 12:23:24 +0000 (14:23 +0200)]
staging: comedi: drivers: comedi_bond.c: Changed from using strncat to strlcat
Changed from using strncat to strlcat to simplify the code
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bernd Porr [Fri, 10 Oct 2014 19:35:11 +0000 (20:35 +0100)]
staging: comedi: usbduxfast: updated address details
Updated the range of years, e-mail and added driver desription as
usually done in comedi.
Signed-off-by: Bernd Porr <mail@berndporr.me.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 13 Oct 2014 12:41:22 +0000 (13:41 +0100)]
staging: comedi: cb_pcimdas: add support for PCIe-DAS1602/16
The Measurement Computing PCIe-DAS1602/16 is a PCI-Express version of
the PCIM-DAS1602/16, but has a different PCI device ID. Add support
for this device and update the driver description, Kconfig description
and MODULE_DESCRIPTION.
Thanks to Christoph Langbein for supplying the PCI device ID.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bernd Porr [Fri, 10 Oct 2014 19:34:04 +0000 (20:34 +0100)]
staging: comedi: usbdux: updated contact details / comments
I've updated my contact details and removed obsolete comments.
Signed-off-by: Bernd Porr <mail@berndporr.me.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 13 Oct 2014 12:41:21 +0000 (13:41 +0100)]
staging: comedi: cb_pcimdas: update driver comment
The Comedi driver comment mentions a couple of manual configuration
options, but manual configuration via the COMEDI_DEVCONFIG ioctl and
comedi "attach" handler is no longer supported by this driver. Update
the comment appropriately.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bernd Porr [Fri, 10 Oct 2014 19:32:42 +0000 (20:32 +0100)]
staging: comedi: usbduxsigma: updated contact details and status
I've updated my contact details of the driver. I've also tested it
thoroughly and it works perfectly. I've changed the status to stable.
Signed-off-by: Bernd Porr <mail@berndporr.me.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 13 Oct 2014 12:41:20 +0000 (13:41 +0100)]
staging: comedi: cb_pcimdas: use preferred block comment style
Use the preferred block comment style for the copyright and Comedi
driver description header comments.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
anuvazhayil [Tue, 28 Oct 2014 21:04:56 +0000 (02:34 +0530)]
Staging: media: dm365_isif: Add blank line after variable declarations
WARNING: Missing a blank line after declarations
Signed-off-by: anuvazhayil <anuv.1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
anuvazhayil [Tue, 28 Oct 2014 21:43:54 +0000 (03:13 +0530)]
Staging: lustre: libcfs_cpu: Fix ERROR: do not initialise globals to 0 or NULL
Fixed the ERROR: do not initialise globals to 0 or NULL
Signed-off-by: anuvazhayil <anuv.1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
anuvazhayil [Tue, 28 Oct 2014 22:13:26 +0000 (03:43 +0530)]
Staging: rtl8723au: rtw_cmd: Fix space prohibited between function name and open parenthesis
Fixed the checkpatch.pl WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: anuvazhayil <anuv.1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Sun, 26 Oct 2014 17:35:20 +0000 (19:35 +0200)]
staging: media: lirc: lirc_bt829.c: replace dprintk by dev_dbg
This patch removes the custom printk macro dprintk and replaces all
the calls made to it by dev_dbg.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Sun, 26 Oct 2014 17:39:27 +0000 (19:39 +0200)]
staging: media: lirc: lirc_imon.c: replace printk by dev_dbg
This patch replaces the calls to printk by dev_dbg.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Sun, 26 Oct 2014 17:46:00 +0000 (19:46 +0200)]
staging: media: lirc: lirc_sir.c: use pr_debug and dev_dbg instead of dprintk
This patch removes the custom printk macro dprintk and replaces most of
the calls made to it by dev_dbg. pr_debug was used when the calling
function did not provide the appropiate device variable.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Sun, 26 Oct 2014 17:59:43 +0000 (19:59 +0200)]
staging: media: lirc: lirc_zilog.c: replace custom print macros with dev_* and pr_*
This patch removes the custom printk macros dprintk, zilog_notify,
zilog_error, and zilog_info. All the calls to these macros were
replaced by dev_dbg, dev_notice, dev_err, and dev_info respectively
whenever possible. There were cases in which pr_debug, pr_notice,
pr_err and pr_info were used. It was when the calling function did
not provide an appropiate dev variable.
Applying this patch will trigger the out of memory checkpatch warning
for two lines. It will be fixed in a separate patch.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ebru Akagunduz [Tue, 28 Oct 2014 08:46:35 +0000 (10:46 +0200)]
staging: ft1000: Remove curly braces for single statement blocks
This patch removes curly braces for single statement
blocks using following coccinelle script:
@@
expression e1;
@@
- if (e1) {
+ if (e1)
return ...;
- }
Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Surya Seetharaman [Mon, 27 Oct 2014 14:28:20 +0000 (19:58 +0530)]
Staging: comedi: nio_tiocmd: fixed a brace coding style issue.
Removed unnecessary braces using checkpatch.pl tool
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tapasweni Pathak [Sun, 26 Oct 2014 15:08:32 +0000 (20:38 +0530)]
staging: dgap: Use unsigned for loop index
The following semantic patch is used to do this
@r exists@ // find anything that might decrement the variable
identifier i;
expression E;
position p;
@@
int i@p;
...
(
&i
|
i--
|
--i
|
i-=E
|
i+=E
)
@x disable decl_init@
identifier r.i;
expression E;
position p1 != r.p;
@@
(
volatile int i = 0;
|
volatile int i;
|
+ unsigned
int i@p1 = 0;
|
+ unsigned
int i@p1;
)
<... when != i = E
(
i = 0
|
i = 1
)
...>
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Sun, 26 Oct 2014 21:55:22 +0000 (23:55 +0200)]
staging: ozwpan: Fix incorrect type in assignments
This patch fixes following sparse warnings:
drivers/staging/ozwpan/ozhcd.c:1917:35: warning: incorrect type in
assignment (different base types)
drivers/staging/ozwpan/ozhcd.c:1917:35: expected restricted __le16
[usertype] wHubCharacteristics
drivers/staging/ozwpan/ozhcd.c:1917:35: got unsigned short [unsigned]
[usertype] <noident>
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tapasweni Pathak [Sun, 26 Oct 2014 13:50:16 +0000 (19:20 +0530)]
staging: android: Replace timeval with timespec64
'timeval' is used to print timestamps in seconds and millisecond.
32-bit systems using 'struct timeval' will break in the year 2038,
So we have to replace that code with more appropriate types.
This patch changes the android driver to use timespec64.
Since this is a staging driver and the output is only used for a
debugfs file, it is fine to slightly change the output and
use nanoseconds instead. ktime_to_timespec64, is used which will return
seconds and nanoseconds.
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Sat, 25 Oct 2014 21:47:57 +0000 (23:47 +0200)]
staging: dgnc: dgnc_kcompat.h: remove unused macro
This patch removes the macro PARM_INT after removing all the variables
that depended on it.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Sat, 25 Oct 2014 21:46:03 +0000 (23:46 +0200)]
staging: dgnc: remove debug symbols
This patch removes all of the debug symbols and the variable dgnc_debug
since they are not used anywhere in the code.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Sat, 25 Oct 2014 21:43:33 +0000 (23:43 +0200)]
staging: dgnc: remove unused variable named rawreadok
This patch removes the variable rawreadok since it is only intialized
but not used in any of the driver functions.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Sat, 25 Oct 2014 21:40:15 +0000 (23:40 +0200)]
staging: dgnc: dgnc_driver: remove all occurences of trcbuf_size
This patch removes the variable trcbuf_size given there is no real
use for it anymore. All of the debug variables in this driver is
basically dead code.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Sat, 25 Oct 2014 21:33:06 +0000 (23:33 +0200)]
staging: dgnc: dgnc_kcompat.h: remove unused macros
This patch removes the macros PARM_STR and PARM_ULONG given that they
are not used anywhere in the driver files.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 21:53:38 +0000 (23:53 +0200)]
staging: vt6655: iwctl.c: Comments fixes
Replace C99 "//" comments by "/* */", remove comments about
adding code, remove commented code (one left there for
debugging of the function)
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 21:23:04 +0000 (23:23 +0200)]
staging: vt6655: iocmd.h: Replace C99 // comments by /* */
Replace C99 "//" comments by "/* */"
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 21:21:20 +0000 (23:21 +0200)]
staging: vt6655: iowpa.h: Replace C99 // comments by /* */
Replace C99 "//" comments by "/* */"
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 21:19:40 +0000 (23:19 +0200)]
staging: vt6655: ioctl.h: Replace C99 // comment by /* */
Replace C99 "//" comment by "/* */"
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 21:18:03 +0000 (23:18 +0200)]
staging: vt6655: IEEE11h.h: Replace C99 // comment by /* */
Replace C99 "//" comment by "/* */"
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 21:12:46 +0000 (23:12 +0200)]
staging: vt6655: channel.c: Comments fixes
Replace C99 "//" comments by "/* */", remove not needed
comments about adding code
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 21:10:43 +0000 (23:10 +0200)]
staging: vt6655: bssdb.h: Replace C99 // comments by /* */
Replace C99 "//" comments by "/* */"
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 21:08:50 +0000 (23:08 +0200)]
staging: vt6655: desc.h: Comments fixes
Replace C99 "//" comments by "/* */", remove blank
commented lines
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 21:06:56 +0000 (23:06 +0200)]
staging: vt6655: dpc.c: Comment fixes
Replace C99 "//" comments by "/* */", remove not
needed comments about adding code
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 20:44:25 +0000 (22:44 +0200)]
staging: vt6655: dpc.h: Replace C99 // comment by /* */
Replace C99 "//" comment by "/* */"
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 20:34:38 +0000 (22:34 +0200)]
staging: vt6655: card.c: Comments fixes
Replace C99 "//" comments by "/* */", remove not needed
comments (year of adding code, commented code)
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Veronika Kabatova [Sat, 25 Oct 2014 20:26:56 +0000 (22:26 +0200)]
staging: vt6655: device.h: Comments fixes
Replace C99 "//" comments by "/* */", remove not
needed comments (year of adding code, commented code)
Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Surya Seetharaman [Mon, 27 Oct 2014 14:26:06 +0000 (19:56 +0530)]
Staging: rts5028: rtsx_transport.c: fixed a brace coding style issue.
Removed unwanted braces using checkpatch.pl tool.
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tina Johnson [Sat, 25 Oct 2014 17:43:42 +0000 (23:13 +0530)]
Staging: rts5208: Removed unnecessary parentheses
Unnecessary parentheses around the right hand side of an assignment
is removed using the following semantic patch:
@@
identifier x,f;
constant C;
@@
(
-x = (f / C );
+x = f / C ;
|
-x = (f % C );
+x = f % C ;
)
Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tina Johnson [Sat, 25 Oct 2014 17:43:41 +0000 (23:13 +0530)]
Staging: slicoss: Removed unnecessary parentheses
Unnecessary parentheses around the right hand side of an assignment
is removed using the following semantic patch:
@@
identifier x,f;
constant C;
@@
(
-x = (f / C );
+x = f / C ;
|
-x = (f % C );
+x = f % C ;
)
Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tina Johnson [Sat, 25 Oct 2014 17:43:40 +0000 (23:13 +0530)]
Staging: ft1000: ft1000-usb: Removed unnecessary parentheses
Unnecessary parentheses around the right hand side of an assignment
is removed using the following semantic patch:
@@
identifier x,f;
constant C;
@@
(
-x = (f / C );
+x = f / C ;
|
-x = (f % C );
+x = f % C ;
)
Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tina Johnson [Sat, 25 Oct 2014 17:43:39 +0000 (23:13 +0530)]
Staging: iio: light: Removed unnecessary parentheses
Unnecessary parentheses around the right hand side of an assignment
is removed using the following semantic patch:
@@
identifier x,f;
constant C;
@@
(
-x = (f / C );
+x = f / C ;
|
-x = (f % C );
+x = f % C ;
)
Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Mon, 27 Oct 2014 12:26:33 +0000 (17:56 +0530)]
Staging: rtl8192u: Annotate association types with proper endianness
This patch fixes following sparse warning at number of places in
file rtl819x_BAProc.c.
Warning: incorrect type in assignment (different base types)
expected unsigned short [unsigned] [usertype] tmp
got restricted __le16 [usertype] <noident>
Here, code before this change is correct. But this change silents
sparse warnings and will not harm code too.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiayi Ye [Sat, 25 Oct 2014 12:06:59 +0000 (20:06 +0800)]
staging: rtl8192u: delete successive assignments to the same location
Successive assignments to the same location is meaningless and can be
deleted. The Coccinelle semantic patch was used to find cases.
@@
expression e1,e2,e3;
@@
(
(<+...e1++...+>)=e2;
|
(<+...e1--...+>)=e2;
|
(<+...++e1...+>)=e2;
|
(<+...--e1...+>)=e2;
|
e1=e2;
e1 = <+...e1...+>;
|
*e1=e2;
*e1=e3;
)
Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiayi Ye [Sat, 25 Oct 2014 12:05:43 +0000 (20:05 +0800)]
staging: rtl8192e: delete successive assignments to the same location
Successive assignments to the same location is meaningless and can be
deleted. The Coccinelle semantic patch was used to find cases.
@@
expression e1,e2,e3;
@@
(
(<+...e1++...+>)=e2;
|
(<+...e1--...+>)=e2;
|
(<+...++e1...+>)=e2;
|
(<+...--e1...+>)=e2;
|
e1=e2;
e1 = <+...e1...+>;
|
*e1=e2;
*e1=e3;
)
Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Surya Seetharaman [Mon, 27 Oct 2014 16:52:07 +0000 (22:22 +0530)]
Staging: lustre: Place a space after a semi colon.
Removes the following errors generated using checkpatch.pl tool:
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h:247: ERROR: space required after that ';' (ctx:VxV)
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h:269: ERROR: space required after that ';' (ctx:VxV)
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiayi Ye [Sat, 25 Oct 2014 12:04:17 +0000 (20:04 +0800)]
staging: dgnc: delete successive assignments to the same location
Successive assignments to the same location is meaningless and can be
deleted. The Coccinelle semantic patch was used to find cases.
@@
expression e1,e2,e3;
@@
(
(<+...e1++...+>)=e2;
|
(<+...e1--...+>)=e2;
|
(<+...++e1...+>)=e2;
|
(<+...--e1...+>)=e2;
|
e1=e2;
e1 = <+...e1...+>;
|
*e1=e2;
*e1=e3;
)
Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ebru Akagunduz [Sat, 25 Oct 2014 10:16:42 +0000 (13:16 +0300)]
staging: wlan-ng: Fix incorrect type in assignments
fc variable type was u16 and it has an assignment
from cpu_to_le16() so its type changed as __le16.
This bug found by sparse.
Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tapasweni Pathak [Sat, 25 Oct 2014 05:16:02 +0000 (10:46 +0530)]
staging: unisys: visorchannel: Improved cleanup code
kfree on NULL pointer is a no-op.
This patch used the following semantic patch to find an instance where NULL
check is present before kfree
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>
Code is made more simpler by breaking up of sequence of kmallocs and adding
some more exit labels.
Removed unnecessary initialization of buf and fmtbuf to NULL as they are local
variables.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tapasweni Pathak [Sun, 26 Oct 2014 16:05:04 +0000 (21:35 +0530)]
staging: rtl8188eu: core: Remove redundant memset before memcpy
The region set by the call to memset, immediately overwritten by the
subsequent call to memcpy makes the memset redundant.
This patch removes the redundant memset before memcpy using the
following coccinelle script:
@@
expression e1,e2,e3,e4;
@@
- memset(e1,e2,e3);
memcpy(e1,e4,e3);
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tina Ruchandani [Sat, 25 Oct 2014 23:35:49 +0000 (16:35 -0700)]
Staging: lustre: llite: Simplify error handling
This patch fixes the following checkpatch error:
ERROR: do not use assignment in if condition
2172: FILE: drivers/staging/lustre/lustre/llite/llite_lib.c:2172:
if (!inode || !(sbi = ll_i2sbi(inode))) {
Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Suggested-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tina Ruchandani [Sat, 25 Oct 2014 21:45:55 +0000 (14:45 -0700)]
Staging: lustre: lnet: Make functions static
This patch makes the following functions static
as they are only used in their respective files.
These functions were detected by sparse.
- lib-md.c : lnet_md_validate
- lib-move.c : lnet_ni_*
lnet_setpayloadbuffer
lnet_peer_alive_locked
lnet_msg2bufpool
lnet_post_routed_recv_locked
lnet_configure / lnet_unconfigure
lnet_ioctl
init_lnet
fini_lnet
Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiayi Ye [Sat, 25 Oct 2014 03:40:32 +0000 (11:40 +0800)]
staging: lustre: lnet: klnds: o2iblnd: fix null dereference on failed path in o2iblnd.c
If net is null and failed path is executed, dereference null may happen.
This patch fixes it. The following Coccinelle semantic patch was used.
@@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@
* if (E == NULL)
{
... when != if (E == NULL) S1 else S2
when != E = E1
* E->f
... when any
return ...;
}
else S3
Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roberta Dobrescu [Sun, 26 Oct 2014 21:30:10 +0000 (23:30 +0200)]
staging: rtl8723au: Remove duplicated argument to ||
This patch removes duplicated argument to ||, fixing the
following warning detected using coccinelle tool:
duplicated argument to && or ||.
Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roberta Dobrescu [Sun, 26 Oct 2014 21:30:09 +0000 (23:30 +0200)]
staging: rtl8723au: core: Remove uneeded return variable
This patch removes uneeded return variables, using only
'return _SUCCESS' instead.
It fixes the following warning detected by coccinelle:
Unneeded variable.
It was done using the following semantic patch:
@@
identifier ret;
type T;
expression e;
@@
-T ret = e;
... when != ret
when strict
-return ret;
+return e;
Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roberta Dobrescu [Sun, 26 Oct 2014 21:30:08 +0000 (23:30 +0200)]
staging: rtl8723au: os_dep: Remove uneeded return variable
This patch removes uneeded return variables, using only
'return _SUCCESS' instead.
It fixes the following warning detected by coccinelle:
Unneeded variable.
It was done using the following semantic patch:
@@
identifier ret;
type T;
expression e;
@@
-T ret = e;
... when != ret
when strict
-return ret;
+return e;
Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roberta Dobrescu [Sun, 26 Oct 2014 21:30:07 +0000 (23:30 +0200)]
staging: rtl8723au: hal: Remove uneeded return variable
This patch removes uneeded return variables, just using
'return _SUCCESS' or 'return HCI_STATUS_SUCCESS' instead.
This fixes the following warning detected using coccinelle:
Unneeded variable.
It was done using the following semantic patch:
@@
identifier ret;
type T;
expression e;
@@
-T ret = e;
... when != ret
when strict
-return ret;
+return e;
Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roberta Dobrescu [Sun, 26 Oct 2014 21:30:06 +0000 (23:30 +0200)]
staging: rtl8723au: Remove uneeded semicolon
This patch fixes the following warning detected using coccinelle:
Unneeded semicolon.
Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Roberta Dobrescu [Sun, 26 Oct 2014 21:30:05 +0000 (23:30 +0200)]
staging: rtl8723au: Do not use comparisons on bool tests
This patch removes unnecessary comparisons to bool.
It fixes the following warning detected using coccinelle tool:
WARNING: Comparison to bool.
Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tina Ruchandani [Sat, 25 Oct 2014 23:56:01 +0000 (16:56 -0700)]
Staging: rtl8723au: core: Add braces around macro
This patch fixes the following checkpatch warning:
ERROR: Macros with complex values should be enclosed
in parentheses
1535: FILE: drivers/staging/rtl8723au/core/rtw_mlme.c:1535:
Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiayi Ye [Sat, 25 Oct 2014 12:07:52 +0000 (20:07 +0800)]
staging: rtl8723au: delete successive assignments to the same location
Successive assignments to the same location is meaningless and can be
deleted. The Coccinelle semantic patch was used to find cases.
@@
expression e1,e2,e3;
@@
(
(<+...e1++...+>)=e2;
|
(<+...e1--...+>)=e2;
|
(<+...++e1...+>)=e2;
|
(<+...--e1...+>)=e2;
|
e1=e2;
e1 = <+...e1...+>;
|
*e1=e2;
*e1=e3;
)
Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Sat, 25 Oct 2014 06:26:29 +0000 (11:56 +0530)]
Staging: rtl8723au: Use USB API functions
This patch replaces driver specific functions(RT_usb_endpoint_is_bulk_in,
RT_usb_endpoint_is_bulk_out, RT_usb_endpoint_is_int_in) with USB API
functions(usb_endpoint_is_bulk_in, usb_endpoint_is_bulk_out,
usb_endpoint_is_int_in).
Also, this patch removes these three RT functions as they are no longer
needed after replacement.
This patch also have one line over 80 characters as limiting it to 80
characters does not make code look good.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Thu, 23 Oct 2014 18:31:10 +0000 (14:31 -0400)]
staging: unisys: refactor struct struct ultra_vbus_channel_protocol
Rename the struct to spar_vbus_channel_protocol. Fix CamelCase member names:
ChannelHeader => channel_header
HdrInfo => hdr_info
ChpInfo => chp_info
BusInfo => bus_info
DevInfo => dev_info
Update all references to use the changed names.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Thu, 23 Oct 2014 18:31:09 +0000 (14:31 -0400)]
staging: unisys: refactor ULTRA_VBUS_HEADERINFO
Remove the typedef and rename to struct spar_vbus_headerinfo. Fix CamelCase
member names:
structBytes => struct_bytes
deviceInfoStructBytes => device_info_struct_bytes
devInfoCount => dev_info_count
chpInfoByteOffset => chp_info_offset
busInfoByteOffset => bus_info_offset
devInfoByteOffset => dev_info_offset
Update all references to changed names.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Thu, 23 Oct 2014 18:31:08 +0000 (14:31 -0400)]
staging: unisys: refactor ULTRA_VBUS_CHANNEL_OK_SERVER
Fix the name to SPAR_VBUS_CHANNEL_OK_SERVER and fix the CamelCase parameter:
actualBytes => actual_bytes
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Thu, 23 Oct 2014 18:31:07 +0000 (14:31 -0400)]
staging: unisys: fix parameters for SPAR_VBUS_CHANNEL_OK_CLIENT macro
Remove the unused logCtx parameter and fix the CamelCase name:
pChannel => ch
Update calls to the macro to remove the unused second parameter.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Thu, 23 Oct 2014 18:31:06 +0000 (14:31 -0400)]
staging: unisys: clean up UltraVbusChannelProtocol
Fix the CamelCase name:
UltraVbusChannelProtocolGuid => spar_vbus_channel_protocol_uuid
Update related macro names to match. Update references to changed names. Fix
indentation in macros where names changed.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Thu, 23 Oct 2014 18:31:05 +0000 (14:31 -0400)]
staging: unisys: remove unused code from iochannel.h
The following macros and functions are unused, and should be deleted:
NUMSIGNALS
IO_CHANNEL_SIZE
QSLOTSFROMBYTES
QSIZEFROMBYTES
SignalQInit
INIT_CLIENTSTRING
ULTRA_IO_CHANNEL_SERVER_READY
ULTRA_IO_CHANNEL_SERVER_NOTREADY
ULTRA_VHBA_init_channel
ULTRA_VHBA_set_max
ULTRA_VNIC_init_channel
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Thu, 23 Oct 2014 18:31:04 +0000 (14:31 -0400)]
staging: unisys: refactor ULTRA_IO_CHANNEL_PROTOCOL
Remove the typedef from ULTRA_IO_CHANNEL_PROTOCOL and use the name struct
spar_io_channel_protocol instead. Fix CamelCase member names:
ChannelHeader => channel_header
cmdQ => cmd_q
rspQ => rsp_q
zoneGuid => zone_uuid
ClientString => client_string
Update all references to changed names.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>