Joe Perches [Mon, 2 Mar 2015 03:58:57 +0000 (19:58 -0800)]
staging: lustre: Convert uses of "int rc = seq_printf(...)"
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.
See: commit
1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")
Convert these uses to:
seq_printf(seq, ...);
return 0;
Done via cocci script:
@@
struct seq_file *seq;
int i;
@@
- i = seq_printf(seq,
+ seq_printf(seq,
...);
...
- return i;
+ return 0;
@@
struct seq_file *seq;
int i;
@@
- i = 0;
- i += seq_printf(seq,
+ seq_printf(seq,
...);
...
- return i;
+ return 0;
With some additional reformatting and typing post conversion
to remove the now unnecessary "int i;" declaration.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tolga Ceylan [Sun, 15 Feb 2015 04:32:45 +0000 (20:32 -0800)]
Staging: iio: meter:
ade7854-i2c: code style improvements
Code reformatting based on checkpatch.pl with --strict:
Comparison to NULL rewritten as !indio_dev
Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tolga Ceylan [Sun, 15 Feb 2015 04:32:44 +0000 (20:32 -0800)]
Staging: iio: meter:
ade7854-i2c: code style improvements
Code reformatting based on checkpatch.pl with --strict:
Lines over 80 characters were fixed
Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tolga Ceylan [Sun, 15 Feb 2015 04:32:43 +0000 (20:32 -0800)]
Staging: iio: meter:
ade7854-i2c: code style improvements
Code reformatting based on checkpatch.pl with --strict:
Alignment should match open paranthesis cases corrected
Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 27 Feb 2015 15:07:37 +0000 (15:07 +0000)]
staging: comedi: adl_pci6208: support old PLX device ID
ADLINK's MS Windows drivers for the PCI-6208/6216 boards include the
following line in the DDInstall secion of the INF file:
%String6208%=DriverInstall6208.NT,PCI\VEN_10B5&DEV_9050&SUBSYS_62089999
That's for a PLX PCI 9050/9052 PCI interface chip with custom subvendor
and subdevice ID. The "%String6208%" macro expands to "ADLINK PCI-6208"
in the INF file.
Add a corresponding entry to this driver module's PCI device table.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 27 Feb 2015 15:07:36 +0000 (15:07 +0000)]
staging: comedi: adl_pci6208: remove multiple board type support
This driver module now only supports a single board type, so remove the
infrastructure for describing multiple board types. The comedi
"auto_attach" handler, `pci6208_auto_attach()` doesn't need to set the
comedi device's `board_name` or `board_ptr` members. The former is
automatically pointed to the comedi driver's `driver_name` by the core
comedi module, and the latter is not used anywhere else. The AO
subdevice's `n_chans` member can be set to 16 without looking it up in
the single element of `pci6208_boards[]`. There is no need to pass a
board index from the PCI device table to the "auto_attach" handler.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 27 Feb 2015 15:07:35 +0000 (15:07 +0000)]
staging: comedi: adl_pci6208: combine PCI-6208 and PCI-6216 support
This module's PCI device table has separate PCI device IDs for PCI-6208
and PCI-6216, but in reality, both boards and their cPCI and PCIe
variants seem to have the same PCI device ID: 0x6208. The PCI subdevice
ID doesn't seem to help either.
It shouldn't do any harm to claim 16 AO channels for all devices
supported by this driver. The original PCI-6216 is just a PCI-6208 with
a daughter board providing the extra DACs. The data is clocked out to
the DACs serially with no acknowledgment. I assume this would still
happen when the DACs for the upper 8 channels are missing. Therefore,
change the driver to support a single board type with 16 AO channels,
and remove the suspicious PCI device ID for the PCI-6216.
Evidence about lack of a separate PCI device ID for PCI-6216 follows....
1. Jesus Vasquez reports the following lspci output for a PCIe-6216 on
his Ubuntu 12.04 system:
lspci -n -vvv
07:00.0 1180: 144a:6208 (rev 02)
Subsystem: 144a:6208
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Region 0: Memory at
f6000000 (32-bit, non-prefetchable)
[size=128]
Region 1: I/O ports at c100 [size=128]
Region 2: I/O ports at c000 [size=256]
Kernel driver in use: adl_pci6208
Kernel modules: adl_pci6208
That system's "adl_pci6208" module only has the single PCI device ID for
the PCI-6208, but works for his PCIe-6216 except that it only supports 8
analog output channels instead of 16.
2. ADLINK's binary Linux module "pci6208.ko" (there is no separate
module for the PCI-6216) has a single alias:
alias: pci:v0000144Ad00006208sv*sd*bc*sc*i*
3. The MS Windows drivers include this set of hardware IDs for the
PCI-6208 series, with nothing more specific for the PCI-6216 (they are
all tied to the same name "ADLINK PCI-6208" and there is no mention of
PCI-6216):
PCI\VEN_10B5&DEV_9050&SUBSYS_62089999
PCI\VEN_144A&DEV_6208&SUBSYS_6208144A
PCI\VEN_144A&DEV_6208&SUBSYS_62089999
PCI\VEN_144A&DEV_6208&SUBSYS_C208144A
PCI\VEN_144A&DEV_6208&SUBSYS_C20855AA
PCI\VEN_144A&DEV_6208
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Thu, 26 Feb 2015 22:43:55 +0000 (15:43 -0700)]
staging: comedi: cb_pcimdas: add 8254 timer (pacer) support
The hardware has an 8254 timer/counter. Channe; 0 is available as a
generic counter/timer with the clock, gate, and output signals all
availabe on the main 37 pin connector. Channels 1 and 2 are used for
the pacer.
Add support for the 8254 timer.
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 [Wed, 25 Feb 2015 23:28:43 +0000 (16:28 -0700)]
staging: comedi: cb_pcimdas: add main connector digital input/output
Add subdevices for the 4 digital input and 4 digital output channels on
the main connector of the board.
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 [Wed, 25 Feb 2015 23:28:42 +0000 (16:28 -0700)]
staging: comedi: cb_pcimdas: tidy up cb_pcimdas_auto_attach()
For aesthetics, add some whitespace to the subdevice init.
Remove the unnecessary comments as well as the initialization of the
analog input subdevice 'len_chanlist'. That member is only used by
subdevices that support async commands.
For aesthetics, rename the analog input subdevice (*insn_read) 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>
H Hartley Sweeten [Wed, 25 Feb 2015 23:28:41 +0000 (16:28 -0700)]
staging: comedi: cb_pcimdas: provide analog output range table
The analog output range is not programmable. The DAC ranges are
jumper-settable on the board. For aesthetics, provide a range table
for the user with all possible ranges.
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 [Wed, 25 Feb 2015 23:28:40 +0000 (16:28 -0700)]
staging: comedi: cb_pcimdas: define the register map
Add defines for the registers and bits. Use the defines to remove the
"magic" numbers.
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 [Wed, 25 Feb 2015 23:28:39 +0000 (16:28 -0700)]
staging: comedi: cb_pcimdas: support analog input programmable ranges
The hardware uses a switch on the board to select if the analog inputs
are bipolar or uinipolar. The gain is programmable to allow the following
input ranges:
Gain Bipolar Unipolar
0 +/-10V 0 to 10V
1 +/-5V 0 to 5V
2 +/-2.5V 0 to 2.5V
3 +/-1.25V 0 to 1.25V
Add the necessary code to the driver to allow the user to select the
desired range.
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 [Wed, 25 Feb 2015 23:28:38 +0000 (16:28 -0700)]
staging: comedi: cb_pcimdas: fix analog input channel configuration
The hardware uses a switch on the board to set the number of analog
input channels to either 16 single-ended or 8 differential channels.
Currently the switch setting is checked for every (*insn_read) operation
to validate the channel number.
Check the switch setting during the driver attach and initialize the
subdevice accordingly. This allows the core to handle the validation.
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, 23 Feb 2015 21:58:03 +0000 (14:58 -0700)]
staging: comedi: 8253.h: remove unused header
All the comedi drivers have been converted to use the comedi_8254 module
to provide support for the 8254 timers. Remove this unused header.
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, 23 Feb 2015 21:58:02 +0000 (14:58 -0700)]
staging: comedi: ni_labpc_common: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
The hardware actually has two 8254 devices. Timer B0 is the master for timed
conversions, timer B1 sets the scan pacing, and tmer A0 sets the conversion
pacing.
For the conversion, dev->pacer is used for the "B" timers and a new private
data member, dev->counter, is used for the "A" timers. All the divisor values
are stored in the dev->pacer.
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, 24 Feb 2015 17:38:49 +0000 (10:38 -0700)]
staging: comedi: amplc_dio200_common: convert driver to use the comedi_8254 module
Convert this driver to use the comedi_8254 module to provide the 8254 timer support.
Add 'clock_src' and 'gate_src' members to the comedi_8254 data for convienence.
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, 23 Feb 2015 21:58:00 +0000 (14:58 -0700)]
staging: comedi: amplc_dio200_common: remove 'spinlock' from struct dio200_subdev_8254
Currently this driver uses a spinlock in the 8254 subdevice (*insn_read), (*insn_write),
and (*insn_config) functions. The comedi core checks if the subdevice is 'busy', in
parse_insn(), before any of the subdevice functions are attempted.
Remove the unnecessary spinlock.
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, 23 Feb 2015 21:57:59 +0000 (14:57 -0700)]
staging: comedi: amplc_dio200_common: remove unnecessary 'counter_number' checks
The 'counter_number' in these functions is the comedi channel number from the
chanspec. The comedi core validates the chanspec before calling the driver
functions. Remove the unnecessary checks.
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, 23 Feb 2015 21:57:58 +0000 (14:57 -0700)]
staging: comedi: amplc_dio200_common: remove 'which' from struct dio200_subdev_8254
This member is only used in the "set gate" and "set clock" helper functions. Remove
it and calculate the value when needed.
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, 23 Feb 2015 21:57:57 +0000 (14:57 -0700)]
staging: comedi: amplc_dio200_common: remove 'gat_sce_ofs' from struct dio200_subdev_8254
This member is only used one place in the driver. Remove it and calculate the
register offset when needed.
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, 23 Feb 2015 21:57:56 +0000 (14:57 -0700)]
staging: comedi: amplc_dio200_common: remove 'clk_sce_ofs' from struct dio200_subdev_8254
This member is only used one place in the driver. Remove it and calculate the
register offset when needed.
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, 23 Feb 2015 21:57:55 +0000 (14:57 -0700)]
staging: comedi: amplc_dio200_common: introduce DIO200_GAT_SEL() macro
Replace the DIO200_[XYZ]GAT_SEL defines with a macro that returns the
correct register offset.
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, 23 Feb 2015 21:57:54 +0000 (14:57 -0700)]
staging: comedi: amplc_dio200_common: introduce DIO200_CLK_SEL() macro
Replace the DIO200_[XYZ]CLK_SEL defines with a macro that returns the
correct register offset.
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, 23 Feb 2015 21:57:53 +0000 (14:57 -0700)]
staging: comedi: adl_pci9118: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
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, 23 Feb 2015 21:57:52 +0000 (14:57 -0700)]
staging: comedi: das16: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
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, 23 Feb 2015 21:57:51 +0000 (14:57 -0700)]
staging: comedi: cb_pcidas64: remove unnecessary include
The hardware supported by this driver does not have an 8254 timer. Remove the
unnecessary include of "8253.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 [Mon, 23 Feb 2015 21:57:50 +0000 (14:57 -0700)]
staging: comedi: me4000: convert driver to use the comedi_8254 module
Some of the hardware supported by this driver include an 8254 timer. For
aesthetics, convert it to use the comedi_8254 module to provide support for
the 8254 timer.
This also fixes the (*insn_read) and (*insn_write) to work like the comedi
API expects. Currently they only read or write a single value.
It also fixes the (*insn_config). Currently the driver is attempting to
handle the configuration instructions GPCT_RESET and GPCT_SET_OPERATION.
These are just arbitrary valuse and are not real comedi configuration_ids.
They actually coorespond to:
GPCT_RESET -> INSN_CONFIG_DIO_OUTPUT
GPCT_SET_OPERATION -> INSN_CONFIG_ANALOG_TRIG
The number of parameters for the instructions is validated by the comedi
core in check_insn_config_length(). GPCT_RESET happens to work (insn->n == 1)
but GPCT_SET_OPERATION would fail. The INSN_CONFIG_ANALOG_TRIG expects
insn->n == 5 but GPCT_SET_OPERATION in this driver expects insn->n == 2.
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, 23 Feb 2015 21:57:49 +0000 (14:57 -0700)]
staging: comedi: adv_pci_dio: convert driver to use the comedi_8254 module
Some of the hardware supported by this driver includes an 8254 timer. For
aesthetics, convert it to use the comedi_8254 module to provide support for
the 8254 timer.
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, 23 Feb 2015 21:57:48 +0000 (14:57 -0700)]
staging: comedi: adv_pci_dio: refactor 's8254' boardinfo
The boardinfo for the 8254 timer is overly complex. The 8254 timer always has
3 channels and the 'regs' and 'specflags' members of diosubd_data are not
used. The only necessary information is the base 'addr' offset to the 8254
registers.
Replace the 's8254' member with an unsigned long 'timer_regbase'. Use that
to determine if the board has an 8254 timer during the attach of the driver.
Save the 'timer_regbase' in the subdevice 'private' pointer to use in the
subdevice functions.
For aesthetics, absorb pci_dio_add_8254() into the driver attach 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>
H Hartley Sweeten [Mon, 23 Feb 2015 21:57:47 +0000 (14:57 -0700)]
staging: comedi: adv_pci_dio: simplify counter subdevice I/O
Only two of the boards supported by this driver have an 8254 counter/timer.
Both of these boards have a single 8254 device. Currently the counter
subdevice functions are coded to support multiple 8254 devices. This is
unnecessary and just complicates the code.
Simplfy the subdevice functions to work for a single 8254 counter/timer and
refactor the driver (*attach) accordingly.
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, 23 Feb 2015 21:57:46 +0000 (14:57 -0700)]
staging: comedi: das1800: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Tidy up the (*do_cmdtest) validation of the timer arguments.
Absorb the converted das1800_setup_counters() code into the (*do_cmd).
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, 23 Feb 2015 21:57:45 +0000 (14:57 -0700)]
staging: comedi: das6402: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Remove the unnecessary programming of timer 0. The private data 'count'
value is never set by the driver and the timer is reset to MODE0 when
the timers are initialized during the attach of the driver.
Remove the unnecessart convert_src check in the (*do_cmdtest). The only
valid convert_src is TRIG_TIMER.
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, 23 Feb 2015 21:57:44 +0000 (14:57 -0700)]
staging: comedi: ni_at_a2150: convert driver to use the comedi_8254 module
The hardware supported by this driver includes an 8254 timer. For aesthetics,
convert it to use the comedi_8254 module to provide support for the 8254 timer.
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, 23 Feb 2015 21:57:43 +0000 (14:57 -0700)]
staging: comedi: ni_at_ao: convert driver to use the comedi_8254 module
The hardware supported by this driver includes an 8254 timer. This timer is
not currently used, other than setting counters 1 and 2 to MODE4 to ensure
that the outputs are high.
For aesthetics, convert it to use the comedi_8254 module to provide support
for the 8254 timer. This will make it easier to add features later.
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, 23 Feb 2015 21:57:42 +0000 (14:57 -0700)]
staging: comedi: das08: convert driver to use the comedi_8254 module
Some of the hardware supported by this driver include an 8254 timer that is
exposed to the user as a comedi_subdevice. Convert it to use the comedi_8254
module to provide support for the 8254 timer.
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, 23 Feb 2015 21:57:41 +0000 (14:57 -0700)]
staging: comedi: amplc_pci230: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
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, 23 Feb 2015 21:57:40 +0000 (14:57 -0700)]
staging: comedi: adv_pci1710: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. It also provides a comedi_subdevice to allow the user
to use channel 0 of the 8254 timer. Currently the subdevice support does not
work correctly due to and (*insn_config) that does not follow the comedi API.
Convert it to use the comedi_8254 module to provide support for the 8254 timer
and proper support for the subdevice.
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, 23 Feb 2015 21:57:39 +0000 (14:57 -0700)]
staging: comedi: cb_das16_cs: convert driver to use the comedi_8254 module
The hardware supported by this drive has an 8254 timer. Currently this driver
does not use the timer functions.
For aesthetics, use the comedi_8254 module to provide support for the 8254
timer. This will ensure that the counters are all reset and make it easier
to add functionality later.
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, 23 Feb 2015 21:57:38 +0000 (14:57 -0700)]
staging: comedi: das16m1: convert driver to use the comedi_8254 module
This driver uses two 8254 timers. One to generate the analog input pacer clock and
one to count the number of samples. Convert it to use the comedi_8254 module to
provide support for the 8254 timers.
Use the comedi_device 'pacer' member for the 8254 timer used for analog input. This
data is freed automatically by the core during the detach of the driver.
Store the data for the 8254 timer used to count samples in the private data. This
data needs to be freed by the driver when it is detached.
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, 23 Feb 2015 21:57:37 +0000 (14:57 -0700)]
staging: comedi: das800: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
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, 23 Feb 2015 21:57:36 +0000 (14:57 -0700)]
staging: comedi: cb_pcidas: convert driver to use the comedi_8254 module
This driver uses two 8254 timers to generate the pacer clocks. One for analog
input acquisition and one for analog output data conversion. Convert it to use
the comedi_8254 module to provide support for the 8254 timers.
Use the comedi_device 'pacer' member for the 8254 timer used for analog input.
This data is freed automatically by the core during the detach of the driver.
Store the data for the 8254 timer used for analog output in the private data.
This data needs to be freed by the driver when it is detached.
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, 23 Feb 2015 21:57:35 +0000 (14:57 -0700)]
staging: comedi: amplc_pci224: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
output data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
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, 23 Feb 2015 21:57:34 +0000 (14:57 -0700)]
staging: comedi: adl_pci9111: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
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, 23 Feb 2015 21:57:33 +0000 (14:57 -0700)]
staging: comedi: pcl711: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
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, 23 Feb 2015 21:57:32 +0000 (14:57 -0700)]
staging: comedi: pcl818: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Note that the pacer does not have to be stopped when starting a new async
command in pcl818_ai_cmd() or when the card is initialy reset by pcl818_reset().
The counters are all reset when the driver is initially attached and the
counters used by the pacer are stopped when a command is canceled.
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, 23 Feb 2015 21:57:31 +0000 (14:57 -0700)]
staging: comedi: pcl816: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
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, 23 Feb 2015 21:57:30 +0000 (14:57 -0700)]
staging: comedi: pcl812: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Note that the pacer does not have to be stopped when starting a new async
command in pcl812_ai_cmd() or when the card is initialy reset by pcl812_reset().
The counters are all reset when the driver is initially attached and the
counters used by the pacer are stopped when a command is canceled.
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, 23 Feb 2015 21:57:29 +0000 (14:57 -0700)]
staging: comedi: add 'pacer' member to struct comedi_device
Add a new member to the comedi_device struct for a comedi_8254 'pacer'. This
provides a convient place to store the data allocated by the comedi_8254 module
for boards that use an 8254 device to create the data acquisition pacer clock.
Automatically free this pointer in comedi_device_detach_cleanup() so that the
drivers don't need to do it when then are detached.
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, 23 Feb 2015 21:57:28 +0000 (14:57 -0700)]
staging: comedi: comedi_8254: introduce module for 8254 timer support
A 8254 timer/counter is commonly used on data acquisition boards to provide
the internal pacer clock used to acquire analog input samples. Some boards
also to allow the timers to be used externally.
Currently the 8254 timers are supported by comedi using the 8253.h header
and a number of inline functions. This works for the internal pacer clock
but requires the drivers to implement subdevice code necessary to use the
timers externally.
Introduce a new module to support both the internal pacer clock and the
external counter subdevice. This will allow removing a bunch of duplicated
code in the drivers and standardizes the comedi 8254 timer support.
This implementation is based on the 8253.h inline functions and the various
subdevice functionality in the comedi 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 [Fri, 20 Feb 2015 19:52:28 +0000 (12:52 -0700)]
staging: comedi: rtd520: remove unnecessary interrupt disable
The read/write of the PLX_INTRCS_REG during the driver detach is not
necessary. The rtd_reset() function writes 0 to this register which
will disable all interrupts.
This also fixes a dereference after null check reported by coverity.
Reported-by: coverity (CID 751066)
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 [Fri, 20 Feb 2015 19:52:27 +0000 (12:52 -0700)]
staging: comedi: cb_pcidas64: fix possible integer overflow
The {min,max}_scan_divisor values could overflow due to the
unsigned int * insigned int calculation. Change the type of the
local variable 'convert_divisor' to unsigned long long to avoid
the possible overflow.
Reported-by: coverity (CID 200653)
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 [Fri, 20 Feb 2015 19:52:26 +0000 (12:52 -0700)]
staging: comedi: ni_labpc_common: fix logically dead code issue
The quick exit check of (mode == MODE_SINGLE_CHAN) results in coverity
reporting a logically dead code issue in the switch code in
labpc_ai_check_chanlist().
Remove the quick exit check and allow the function to handle the
MODE_SINGLE_CHAN normally (the for loop will only happen 1 time and
the function will return 0).
Reported-by: coverity (CID 1222108)
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>
Alberto Pires de Oliveira Neto [Mon, 2 Mar 2015 01:44:04 +0000 (22:44 -0300)]
staging: lustre: fld_request.c: Remove else after return.
This patch fixes checkpatch.pl warning.
WARNING: else is not generally useful after a break or return
Signed-off-by: Alberto Pires de Oliveira Neto <mrpenguin2005@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rasmus Villemoes [Fri, 20 Feb 2015 13:13:19 +0000 (14:13 +0100)]
staging: android: ion: fix some format strings
C99 says that a precision which is simply '.' with no following digits
or * should be interpreted as 0, which means that these format strings
actually mean 'print 16 spaces'. However, the kernel's printf
implementation treats this case as if the precision was omitted. Don't
rely on that quirk.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Adrien Descamps [Tue, 24 Feb 2015 23:59:25 +0000 (00:59 +0100)]
drivers: staging: lustre: Fix "space prohibited between function name and open parenthesis" errors
Fix checkpatch.ph errors "space prohibited between function name and
open parenthesis" in socklnd.h
Signed-off-by: Adrien Descamps <adrien.descamps@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Wed, 25 Feb 2015 13:20:36 +0000 (16:20 +0300)]
Staging: lustre: missing curly braces in ll_setattr_raw()
>From the indenting, it looks like curly braces were intended here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Edward Lipinsky [Sat, 21 Feb 2015 19:29:34 +0000 (11:29 -0800)]
staging: lustre: lnet: lnet: Remove unneeded braces in lib-eq.c
This patch fixes the checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Edward Lipinsky <ellipinsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quentin Lambert [Thu, 12 Feb 2015 14:56:07 +0000 (15:56 +0100)]
staging: lustre: llite: Remove unnecessary OOM message
This patch reduces the kernel size by removing error messages that duplicate
the normal OOM message.
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Geert Uytterhoeven [Thu, 12 Feb 2015 14:34:02 +0000 (15:34 +0100)]
staging: lustre: Move proc_*() functions inside #ifdef CONFIG_SYSCTL
If CONFIG_SYSCTL=n:
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:84: warning: ‘proc_set_timeout’ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:95: warning: ‘proc_memory_alloc’ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:119: warning: ‘proc_pages_alloc’ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:143: warning: ‘proc_mem_max’ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:167: warning: ‘proc_pages_max’ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:191: warning: ‘proc_max_dirty_pages_in_mb’ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:232: warning: ‘proc_alloc_fail_rate’ defined but not used
Make the existing #ifdef CONFIG_SYSCTL cover all sysctl-related
functions to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Le Tan [Wed, 11 Feb 2015 04:13:14 +0000 (12:13 +0800)]
staging: lustre: resolves sparse warnings using static declaration
This patch resolves sparse warnings about non-declared symbol in
staging/lustre/lustre/lov by adding static declaration.
These warnings are like this:
warning: symbol 'fiemap_calc_fm_end_offset' was not declared. Should it be static?
Signed-off-by: Le Tan <tamlok@live.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mohammad Jamal [Tue, 10 Feb 2015 17:18:58 +0000 (22:48 +0530)]
staging: lustre: lustre: lov: lov_dev: fix sparse warning of static declaration
This patch adds a static keyword to cl_lov_device_mutex_class variable
to suppress the warning of static declaration
Signed-off-by: Mohammad Jamal <md.jamalmohiuddin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arjun AK [Sun, 8 Feb 2015 10:29:10 +0000 (15:59 +0530)]
staging: lustre: Make the function 'llog_cat_process_cb' static
This patch defines the function 'llog_cat_process_cb' as static
Signed-off-by: Arjun AK <arjunak234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Asaf Vertz [Mon, 9 Feb 2015 10:00:50 +0000 (12:00 +0200)]
staging: lustre: use linux headers
WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
WARNING: Use #include <linux/statfs.h> instead of <asm/statfs.h>
WARNING: Use #include <linux/kgdb.h> instead of <asm/kgdb.h>
Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joe Perches [Sun, 22 Feb 2015 02:53:31 +0000 (18:53 -0800)]
staging: lustre: Convert remaining uses of "= seq_printf(...)"
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.
See: commit
1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")
Convert the remaining uses by hand.
Miscellanea:
o Convert fixed string output to seq_puts
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joe Perches [Sun, 22 Feb 2015 02:53:29 +0000 (18:53 -0800)]
staging: lustre: Convert seq_ hash functions to return void
These functions don't need to return anything.
No caller uses the return value.
Miscellanea:
Integrate the individual strings to reduce object size ~100 bytes.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joe Perches [Sun, 22 Feb 2015 02:53:28 +0000 (18:53 -0800)]
staging: lustre: Convert "return seq_printf(...)" uses
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.
See: commit
1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")
Convert these "return seq_printf(...)" uses to:
seq_printf(seq, ...);
return 0;
Done via cocci script:
@@
struct seq_file *seq;
@@
- return
\(seq_printf\|seq_puts\|seq_putc\)(seq,
...);
+ return 0;
With some additional reformatting and typing post conversion.
Miscellanea:
o convert an rc++ use to a bool
o use seq_puts with fixed strings where appropriate
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matteo Semenzato [Sun, 22 Feb 2015 08:50:00 +0000 (09:50 +0100)]
Staging: fbtft: fix space errors
This patch fixes the following errors:
ERROR: space required after that ','
ERROR: trailing whitespace
Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabio Estevam [Thu, 19 Feb 2015 12:12:12 +0000 (10:12 -0200)]
staging: fbtft: fbtft-io: Use '%zu' to print 'size_t' format
When building for ARM64 the following build warnings are seen:
drivers/staging/fbtft/fbtft-io.c: In function 'fbtft_write_spi_emulate_9':
drivers/staging/fbtft/fbtft-io.c:63:4: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=]
drivers/staging/fbtft/fbtft-io.c: In function 'fbtft_read_spi':
drivers/staging/fbtft/fbtft-io.c:110:5: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=]
Use '%zu' to print 'size_t' format.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabio Estevam [Thu, 19 Feb 2015 12:12:11 +0000 (10:12 -0200)]
staging: fbtft: fbtft-core: Use '%zu' to print 'size_t' format
When building for ARM64 the following build warning is seen:
drivers/staging/fbtft/fbtft-core.c:1004:4: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=]
Use '%zu' to print 'size_t' format.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Frederic Jacob [Sun, 8 Feb 2015 02:15:25 +0000 (21:15 -0500)]
Staging: fbtft: Fix Sparse warnings
This fixes the folowing sparse warnings:
fb_hx8340bn.c:111:6: warning: symbol 'set_addr_win' was not declared. Should it be static?
fbtft_device.c:32:19: warning: symbol 'spi_device' was not declared. Should it be static?
fbtft_device.c:33:24: warning: symbol 'p_device' was not declared. Should it be static?
Signed-off-by: Frederic Jacob <frederic.jacob.78@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hatice ERTÜRK [Sun, 1 Mar 2015 21:51:54 +0000 (23:51 +0200)]
Staging: rtl8192u: ieee80211: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c WARNING:
Missing a blank line after declarations
Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Navya Sri Nizamkari [Sun, 1 Mar 2015 19:10:18 +0000 (00:40 +0530)]
staging: Remove <linux/moduleparam.h> header.
This patch drops #include <linux/moduleparam.h> in all the staging
driver files that also include #include <linux/module.h> as
module.h includes moduleparam.h already.
The following semantic patch is used to make these changes:
@ includesmodule @
@@
@ depends on includesmodule @
@@
- #include <linux/moduleparam.h>
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Navya Sri Nizamkari [Sun, 1 Mar 2015 18:03:45 +0000 (23:33 +0530)]
staging: media: Remove redundant memset.
The memory area set by the call to memset is immediately
overwritten by the subsequent call to memcpy. Hence, remove that
redundant memset.
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Navya Sri Nizamkari [Sun, 1 Mar 2015 18:03:04 +0000 (23:33 +0530)]
staging: media: Remove memset.
The memory area set by the call to memset is immediately
overwritten by the subsequent call to memcpy. Hence, remove that
redundant memset.
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hatice ERTÜRK [Sun, 1 Mar 2015 17:19:23 +0000 (19:19 +0200)]
Staging: rtl8192u: ieee80211: Convert comment from C99 style to C89 style
This patch fixes the checkpatch.pl error:
ERROR: "Do not use C99 // comments"
Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hatice ERTÜRK [Sun, 1 Mar 2015 17:02:11 +0000 (19:02 +0200)]
Staging: rtl8192e: rtl8192e: fix space prohibited before that ','
This patch fixes the following checkpatch.pl error:
space prohibited before that ','
Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Sun, 1 Mar 2015 15:58:19 +0000 (21:28 +0530)]
Staging: rtl8192e: Remove unneeded brackets.
These were detected with this Coccinelle script:
@@
identifier f1, f2, f3;
constant c;
@@
f1 =
(
- (f2 << f3)
+ f2 << f3
|
- (f2 >> f3)
+ f2 >> f3
|
- (f2 << c)
+ f2 << c
|
- (f2 >> c)
+ f2 >> c
)
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Sat, 28 Feb 2015 18:47:53 +0000 (19:47 +0100)]
Staging: rtl8192e: Fix line over 80 characters
This patch fixes line to fit 80 characters.
Issue found by checkpatch.pl
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Sat, 28 Feb 2015 18:46:57 +0000 (19:46 +0100)]
Staging: rtl8192e: Use ether_addr_copy() instead of memcpy()
This patch replaces memcpy with ether_addr_copy.
Also pathole was used to make sure that arguments passed to ether_addr_copy
are aligned to u16.
First argument is iwe.u.ap_addr.sa_data i output of pahole is:
struct iw_event {
__u16 len; /* 0 2 */
__u16 cmd; /* 2 2 */
/* XXX 4 bytes hole, try to pack */
union iwreq_data u; /* 8 16 */
/* size: 24, cachelines: 1, members: 3 */
/* sum members: 20, holes: 1, sum holes: 4 */
/* last cacheline: 24 bytes */
};
and inside union iwreq_data u is sa_data:
struct sockaddr {
/* typedef sa_family_t -> __kernel_sa_family_t */ short unsigned int sa_family; /* 8 2 */
char sa_data[14]; /* 10 14 */
} ap_addr; /* 16 */
sa_data is a char array of size 14, and the number of bytes copied using
ether_addr_copy() is 6.
Second argument is network->bssid and output of pahole is:
struct rtllib_network {
u8 bssid[6]; /* 0 6 */
u8 channel; /* 6 1 */
u8 ssid[33]; /* 7 33 */
u8 ssid_len; /* 40 1 */
u8 hidden_ssid[33]; /* 41 33 */
/* --- cacheline 1 boundary (64 bytes) was 10 bytes ago --- */
u8 hidden_ssid_len; /* 74 1 */
/* XXX 1 byte hole, try to pack */
struct rtllib_qos_data qos_data; /* 76 48 */
bool bWithAironetIE; /* 124 1 */
bool bCkipSupported; /* 125 1 */
bool bCcxRmEnable; /* 126 1 */
/* XXX 1 byte hole, try to pack */
/* --- cacheline 2 boundary (128 bytes) --- */
u16 CcxRmState[2]; /* 128 4 */
bool bMBssidValid; /* 132 1 */
u8 MBssidMask; /* 133 1 */
u8 MBssid[6]; /* 134 6 */
bool bWithCcxVerNum; /* 140 1 */
u8 BssCcxVerNumber; /* 141 1 */
/* XXX 2 bytes hole, try to pack */
struct rtllib_rx_stats stats; /* 144 120 */
/* --- cacheline 4 boundary (256 bytes) was 8 bytes ago --- */
u16 capability; /* 264 2 */
u8 rates[12]; /* 266 12 */
u8 rates_len; /* 278 1 */
u8 rates_ex[16]; /* 279 16 */
u8 rates_ex_len; /* 295 1 */
long unsigned int last_scanned; /* 296 8 */
u8 mode; /* 304 1 */
/* XXX 3 bytes hole, try to pack */
u32 flags; /* 308 4 */
u32 last_associate; /* 312 4 */
u32 time_stamp[2]; /* 316 8 */
/* --- cacheline 5 boundary (320 bytes) was 4 bytes ago --- */
u16 beacon_interval; /* 324 2 */
u16 listen_interval; /* 326 2 */
u16 atim_window; /* 328 2 */
u8 erp_value; /* 330 1 */
u8 wpa_ie[64]; /* 331 64 */
/* XXX 5 bytes hole, try to pack */
/* --- cacheline 6 boundary (384 bytes) was 16 bytes ago --- */
size_t wpa_ie_len; /* 400 8 */
u8 rsn_ie[64]; /* 408 64 */
/* --- cacheline 7 boundary (448 bytes) was 24 bytes ago --- */
size_t rsn_ie_len; /* 472 8 */
u8 wzc_ie[256]; /* 480 256 */
/* --- cacheline 11 boundary (704 bytes) was 32 bytes ago --- */
size_t wzc_ie_len; /* 736 8 */
struct rtllib_tim_parameters tim; /* 744 2 */
u8 dtim_period; /* 746 1 */
u8 dtim_data; /* 747 1 */
/* XXX 4 bytes hole, try to pack */
u64 last_dtim_sta_time; /* 752 8 */
u8 wmm_info; /* 760 1 */
/* XXX 1 byte hole, try to pack */
struct rtllib_wmm_ac_param wmm_param[4]; /* 762 16 */
/* --- cacheline 12 boundary (768 bytes) was 10 bytes ago --- */
u8 Turbo_Enable; /* 778 1 */
/* XXX 1 byte hole, try to pack */
u16 CountryIeLen; /* 780 2 */
u8 CountryIeBuf[255]; /* 782 255 */
/* XXX 3 bytes hole, try to pack */
/* --- cacheline 16 boundary (1024 bytes) was 16 bytes ago --- */
struct bss_ht bssht; /* 1040 84 */
/* --- cacheline 17 boundary (1088 bytes) was 36 bytes ago --- */
bool broadcom_cap_exist; /* 1124 1 */
bool realtek_cap_exit; /* 1125 1 */
bool marvell_cap_exist; /* 1126 1 */
bool ralink_cap_exist; /* 1127 1 */
bool atheros_cap_exist; /* 1128 1 */
bool cisco_cap_exist; /* 1129 1 */
bool airgo_cap_exist; /* 1130 1 */
bool unknown_cap_exist; /* 1131 1 */
bool berp_info_valid; /* 1132 1 */
bool buseprotection; /* 1133 1 */
bool bIsNetgear854T; /* 1134 1 */
u8 SignalStrength; /* 1135 1 */
u8 RSSI; /* 1136 1 */
/* XXX 7 bytes hole, try to pack */
struct list_head list; /* 1144 16 */
/* --- cacheline 18 boundary (1152 bytes) was 8 bytes ago --- */
/* size: 1160, cachelines: 19, members: 61 */
/* sum members: 1132, holes: 10, sum holes: 28 */
/* last cacheline: 8 bytes */
};
network->bssid is char array of size 6.
Issue found by checkpatch.pl
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Sat, 28 Feb 2015 18:20:36 +0000 (19:20 +0100)]
Staging: rtl8192e: Replace printk with netdev_dbg, netdev_info, or netdev_warn
For network systems netdev_dbg, netdev_info or netdev_warn is preferred over
printk. Issue found by checkpatch.pl
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Sat, 28 Feb 2015 11:48:27 +0000 (12:48 +0100)]
Staging: rtl8192u: Replace printk() with netdev_dbg()
For dynamic debugging netdev_dbg (if there is a ponterto a device
net structure) is preferred over printk(), which is the raw way
to print something. Issue found by checkpatch.pl.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Sat, 28 Feb 2015 11:46:41 +0000 (12:46 +0100)]
Staging: rtl8192u: Fix line over 80 characters
This patch splits the line so that doesn't exceeds 80 character mark.
Issue found by checkpatch.pl
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Sat, 28 Feb 2015 11:45:53 +0000 (12:45 +0100)]
Staging: rtl8192u: Fix comments
This patch fixes comments to fit kernel coding style rules,
and also removes commented header file linux/wireless.h. Issue
found by checkpatch.pl.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Sat, 28 Feb 2015 02:43:54 +0000 (08:13 +0530)]
Staging: rtl8712: Use del_timer
Use timer API function del_timer instead of driver
specific function _cancel_timer_ex as it is a standard
way for deactivating a timer.
This is done using Coccinelle and semantic patch used for
this is as follows:
@@ expression x; @@
- _cancel_timer_ex (&x);
+ del_timer (&x);
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Fri, 27 Feb 2015 23:15:56 +0000 (00:15 +0100)]
Staging: rtl8192u: Remove TRUE and FALSE macros
Remove TRUE and FALSE boolean macros, since Linux kernel has already a
boolean type, bool, defined in linux/stddef.h
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Fri, 27 Feb 2015 23:14:34 +0000 (00:14 +0100)]
Staging: rtl8192u: Replace TRUE and FALSE macros
Replace all occurrences of TRUE and FALSE by true and false
respectively.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Fri, 27 Feb 2015 17:55:48 +0000 (23:25 +0530)]
Staging: rtl8712: Eliminate use of _set_timer
This patch introduces the use of API function mod_timer
instead of driver specific function _set_timer as it is
a more efficient and standard way to update the expire
field of an active timer. Also, definition of function
_set_timer is removed as it is no longer needed after
this change.
Here, these cases are handled using Coccinelle and
semantic patch used for this is as follows:
@@ expression x; expression y;@@
- _set_timer (&x, y);
+ mod_timer (&x, jiffies + msecs_to_jiffies (y));
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Navya Sri Nizamkari [Fri, 27 Feb 2015 15:58:29 +0000 (21:28 +0530)]
staging: gdm72xx: Condense two statements into one to improve code readability.
This patch removes a variable assignmnet to a value, used only
for returning that value. The following coccinelle script was
used to discover it:
@@
expression ret;
identifier f;
@@
-ret =
+return
f(...);
-return ret;
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Fri, 27 Feb 2015 13:11:02 +0000 (15:11 +0200)]
staging: dgap: remove unused variable
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Fri, 27 Feb 2015 13:10:30 +0000 (15:10 +0200)]
staging: fbtft: remove unused variable
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dilek Uzulmez [Sun, 1 Mar 2015 20:04:30 +0000 (22:04 +0200)]
Staging: lustre: Fix __packed is preferred over __attribute__((packed)) in libcfs_kernelcomm.h
Fix checkpatch.pl issues with __packed is preferred over __attribute__((packed)) in libcfs_kernelcomm.h
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dilek Uzulmez [Sun, 1 Mar 2015 18:21:52 +0000 (20:21 +0200)]
Staging: lustre: Remove space after function name
Fix checkpatch.pl issues with "space prohibited between function name
and open parenthesis" in lporc_echo.c
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Navya Sri Nizamkari [Sun, 1 Mar 2015 09:09:06 +0000 (14:39 +0530)]
staging: lustre: Remove space in function call.
This patch fixes the following checkpatch.pl warning:
WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Haneen Mohammed [Sun, 1 Mar 2015 00:34:11 +0000 (03:34 +0300)]
Staging: lustre: Fix externs should be avoided in .c
This patch moves extern declaration to ldlm_internal.h.
Remove prototype from ldlm_lockd.c and ldlm_lock.c.
Issue addressed by checkpatch.pl.
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hatice ERTÜRK [Sat, 28 Feb 2015 20:14:19 +0000 (22:14 +0200)]
Staging: lustre:lnet: klnds: socklnd: Remove space after the name of that function
Function names must be adjacent to the parenthesis opened after.That's
why remove space after the name of that function.
This Warning found with checkpatch.pl
Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Haneen Mohammed [Sat, 28 Feb 2015 19:33:47 +0000 (22:33 +0300)]
Staging: lustre: lustre: ldlm: Concatenate strings into single string
This patch concatenate two consecutive strings into one, addressing checkpatch.pl warning:
"Consecutive strings are generally better as a single string"
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Haneen Mohammed [Sat, 28 Feb 2015 19:20:14 +0000 (22:20 +0300)]
Staging: lustre: lustre: idlm: Move trailing statement to next line
This patch Fix both "trailing statement should be on next line"
and space before semicolon errors addressed by checkpatch.pl
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hatice ERTÜRK [Sat, 28 Feb 2015 18:15:10 +0000 (20:15 +0200)]
Staging: lustre: lnet: klnds: o2iblnd: Remove space after the name of that function
Function names must be adjacent to the parenthesis opened after.That's
why remove space after the name of that function.
This Warning found with checkpatch.pl
Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dilek Uzulmez [Sat, 28 Feb 2015 14:28:01 +0000 (16:28 +0200)]
Staging: lustre: __aligned(size) is preferred over __attribute__((aligned(size)))
This patch fixes the checkpatch.pl warning in the drivers/staging/lustre/include/linux/libcfs/libcfs_kernelcomm.h
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This page took 0.0482399999999999 seconds and 5 git commands to generate.