Commit Graph

549595 Commits

Author SHA1 Message Date
Ian Abbott
3834234f99 staging: comedi: check command started by file being polled
Currently, the "poll" file operation checks if an asynchronous "read"
(or "write" command is active on the "read" (or "write" subdevice, but
does not consider whether the command was started from the file object
being polled.  Since that is the only file object able to read (or
write) data, take it into consideration.

With this change, if no read (or write) command is running on the
subdevice, or it is started by a different file object, the file object
is marked as readable (or writeable) regardless, but the read (or write)
file operation will return an error.

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>
2015-10-13 10:28:40 -07:00
Ian Abbott
ecf04ed34d staging: comedi: don't allocate buffer space when polling for write
When handling the "poll" file operation and checking for `POLLOUT`,
don't allocate space from the buffer for writing, just check that space
is available for writing.  That check is done after checking that an
asynchronous "write" command is running on the subdevice.  Allocating
the buffer space before checking a "write" command is running can cause
problems if the subdevice supports commands in either direction and
currently has an active "read" command.

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>
2015-10-13 10:28:40 -07:00
Ian Abbott
432fbde739 staging: comedi: add new comedi_buf_write_n_available()
Add a new function `comedi_buf_write_n_available()` to return the amount
of buffer space available for writing, including space already allocated
by `comedi_buf_write_alloc()` plus any unallocated space available.
This is currently just for internal use by the comedi core, so is not
exported.

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>
2015-10-13 10:28:40 -07:00
Ian Abbott
274ec5ee54 staging: comedi: rename comedi_buf_write_n_available
Rename the local function `comedi_buf_write_n_available()` to
`comedi_buf_write_n_unalloc()`.  It is the amount of unallocated space
available in the buffer that is available to be allocated for writing
and does not include the space that has already been allocated for
writing.  This is unlike the exported function
`comedi_buf_read_n_available()` which includes the space available to be
allocated for reading plus the space already allocated for reading.  The
new name breaks the unintentional naming symmetry (and also clears the
way for the old name to be reused for a new function).

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>
2015-10-13 10:28:40 -07:00
Ian Abbott
322146d5d4 staging: comedi: don't poll_wait on same subdevice twice
Comedi subdevices that support asynchronous acquisition commands have a
wait queue head used for blocking reads or writes and for the poll file
operation.  The comedi device may have several subdevices that support
"read" and/or "write" commands, but each open file object has at most
one "read" subdevice and one "write" subdevice.  It's possible (though
rare) for those to be the same subdevice if the subdevice supports
commands in either direction.  In that case, the "poll" file operation
doesn't really need to do a `poll_wait()` on the same subdevice twice.
Although harmless, it wastes a poll table entry.  Check for that, and
avoid it.

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>
2015-10-13 10:28:40 -07:00
H Hartley Sweeten
944fd0c92a staging: comedi: cb_das16_cs: rename private data member 'status[12]'
For aesthetics, rename these private data members to match the registers
they are associated with.

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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
e9d8e8d4c4 staging: comedi: cb_das16_cs: mode analog output comment
For aesthetics, move this comment to follow the format of the other
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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
b93c2862b9 staging: comedi: cb_das16_cs: the DAC16/16-AO only has 4 digital I/O
The PC-CARD DAS16/16-AO board only has 4 digital I/O channels. The other
boards supported by this driver have 8. Add the boardinfo to correctly
initialize 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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
c34f202ba3 staging: comedi: cb_das16_cs: hookup 8254 counter subdevice
The hardware has an 8254 counter/timer to provide a pacer clock using
counters 1 and 2. Counter 0 is available to the user.

Hook up the subdevice support to allow the user to use counter 0.

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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
090b82a3a7 staging: comedi: cb_das16_cs: tidy up analog input subdevice init
This driver currently code not support async commands. Remove the
SDF_CMD_READ subdev_flag and len_chanlist initialization from the
subdevice init.

For aesthetics, rename the (*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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
1dbe3884bb staging: comedi: cb_das16_cs: refactor 'n_ao_chans' boardinfo
Only one of the boards supported by this driver has analog outputs.
For aesthetics, change the 'n_ao_chans' member of the boardinfo into
a bit-field flag 'has_ao'.

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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
6f2e618c3b staging: comedi: cb_das16_cs: define the misc1 and misc2 register bits
Define the bits in these registers and use them to remove the "magic"
values in the driver.

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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
95ea3e760e staging: comedi: cb_das16_cs: fix ai mux register programming
The ai mux register is used program the hi/lo channels in a scan.
According to the user manual, the hi and lo channels should be
the same  to sample one channel.

Introduce some macros to set the appropriate bits in the ai mux
register and fix the ai (*insn_read).

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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
2845efb967 staging: comedi: cb_das16_cs: rename register map defines
For aesthetics, add _REG to all the register map offsets and convert
the values to hex.

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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
6ae49e2732 staging: comedi: cb_das16_cs: tidy up multi-line comments
Reformat the multi-line comments in the kernel CodingStyle.

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>
2015-10-13 10:26:19 -07:00
H Hartley Sweeten
9f4d30ddfa staging: comedi: aio_aio12_8: tidy up digital I/O subdevice init
For aesthetics, move and reword the comment to follow the format of
the other subdevices.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
CC: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
fbea1876dc staging: comedi: aio_aio12_8: rename 'aio_ao12_8' boardinfo
This board name is incorrect. The proper name is 104-AO12-4.

Change the boardinfo name to 'aio_aio12_4' to follow the format of
the other boardtypes.

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>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
6db70e3934 staging: comedi: aio_aio12_8: refactor boardininfo
This driver supports three board types with these differences:
  104-AIO12-8 - eight 12-bit analog in, four 12-bit analog out
  104-AI12-8  - eight 12-bit analog in
  104-AO12-4  - four 12-bit analog out

Convert the boardinfo 'ai_nchan' and 'ao_nchan' into bit-field
flags 'has_ai' and 'has_ao' so save a bit of space.

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>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
ee4c7709fb staging: comedi: aio_aio12_8: fix ai (*insn_read)
According to the user manual, analog input bipolar data is 2's
complement and unipolar is straight binry. Use the core helpers
to munge the data appropriately.

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>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
1198f6b09f staging: comedi: aio_aio12_8: analog outputs are single-ended
The analog outputs are all single-ended. Remove the SDF_DIFF
subdev_flag from the subdevice initialization.

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>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
c5fcb7cabc staging: comedi: aio_aio12_8: move comedi_lrange definition
For aesthetics, move the comedi_lrange definition used in this driver
to the follow the norm in comedi drivers and rename the variable.

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>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
ffe4a31739 staging: comedi: aio_aio12_8: hookup 8254 counter/timer
This board has an industry-standard 8254 chip with the gate, clock,
and output pins for each counter available on the connector.

Hookup the 8254 counter as a comedi subdevice.

Provice an (*insn_config) for the user to query the clock source
for each channel.

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>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
180480ed41 staging: comedi: aio_aio12_8: update MODULE_DESCRIPTION
Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver".

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>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
471c5d6ccf staging: comedi: aio_aio12_8: tidy up multi-line comments
Reformat the multi-line comments in the kernel CodingStyle.

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>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
4dc4f28207 staging: comedi: aio_aio12_8: prefer using the BIT macro
As suggested by checkpatch.pl, use the BIT macro to define the
register bits.

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>
2015-10-13 10:26:06 -07:00
H Hartley Sweeten
fff5b04fdf staging: comedi: adv_pci1710: rename private data member 'ai_et_MuxVal'
Rename thie CamelCase member of the private data. Add a comment in
the interrupt handler to clarify why the channel interval is updated
again.

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>
2015-10-13 10:24:41 -07:00
H Hartley Sweeten
3c9b773395 staging: comedi: adv_pci1710: tidy up PCI1720_* register defines
The PCI-1720 board is supported by this driver but uses a different
register map. For aesthetics, rename the defines to match the
PCI171X_* format.

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>
2015-10-13 10:24:41 -07:00
H Hartley Sweeten
39363d061d staging: comedi: adv_pci1710: tidy up remaining PCI171x_* registers
Rename these CamelCase defines.

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>
2015-10-13 10:24:41 -07:00
H Hartley Sweeten
9fcce6e2d2 staging: comedi: adv_pci1710: tidy up control register and bits
Rename the CamelCase and use the BIT macro to define the bits.
Also, rename the associated CamelCase members of the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:24:41 -07:00
H Hartley Sweeten
d67e50feb6 staging: comedi: adv_pci1710: tidy up status register and bits
Rename the CamelCase and use the BIT macro to define the bits.

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>
2015-10-13 10:24:41 -07:00
H Hartley Sweeten
a828533040 staging: comedi: adv_pci1710: tidy up multi-line comments
Reformat the multi-line comments in the kernel CodingStyle. And
refactor them to follow the normal format for 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>
2015-10-13 10:24:41 -07:00
H Hartley Sweeten
64a4e72eab staging: comedi: adl_pci9111: fix alignment issue
Use a local variable for the 'devpriv->ai_bounce_buffer' to shorten
the lines in pci9111_handle_fifo_half_full() and gix the checkpath.pl
issue about:

CHECK: Alignment should match open parenthesis

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>
2015-10-13 10:23:58 -07:00
H Hartley Sweeten
0756f8d778 staging: comedi: adl_pci9111: rename CamelCase parameters
Rename the CamelCase parameters of plx9050_interrupt_control().

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>
2015-10-13 10:23:58 -07:00
H Hartley Sweeten
262a07acc6 staging: comedi: adl_pci9111: tidy up multi-line comments
Reformat the multi-line comments in the kernel CodingStyle.

Remove the unnecessary CHANGELOG information, git provided this
better.

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>
2015-10-13 10:23:58 -07:00
H Hartley Sweeten
68e412987c staging: comedi: adl_pci9111: define a macro for the ai range bits
For aesthetics, define a macro to set the analog input range bits.

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>
2015-10-13 10:23:58 -07:00
H Hartley Sweeten
f8d863cbba staging: comedi: adl_pci9111: prefer using the BIT macro
As suggested by checkpatch.pl, use the BIT macro to define the
register bits.

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>
2015-10-13 10:23:58 -07:00
Mike Rapoport
c9f6bb961d staging: lustre: add a blank line after function/struct/union/enum declarations
Fixes checkpatch.pl CHECK:LINE_SPACING: Please use a blank line after
function/struct/union/enum declarations

The patch is generated using checkpatch.pl --fix-inplace:

for f in $(find drivers/staging/lustre/ -type f) ; do
    ./scripts/checkpatch.pl --types "LINE_SPACING" --fix-inplace -f $f
done

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:21:10 -07:00
Mike Rapoport
106495c41f staging: lustre: remove multiple blank lines
Fixes checkpatch.pl CHECK:LINE_SPACING: Please don't use multiple blank
lines.

The patch is generated using checkpatch.pl --fix-inplace:

for f in $(find drivers/staging/lustre/ -type f) ; do
    ./scripts/checkpatch.pl --types "LINE_SPACING" --test-only=multiple \
    --fix-inplace  -f $f
done

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:21:10 -07:00
Mike Rapoport
50ffcb7edc staging: lustre: add missing blank line after declarations
Fixes checkpatch.pl WARNING:LINE_SPACING: Missing a blank line after
declarations.
The patch is generated using checkpatch.pl --fix-inplace:

for f in $(find drivers/staging/lustre/ -type f) ; do
    ./scripts/checkpatch.pl --types "LINE_SPACING" --test-only=Missing \
    --fix-inplace -f $f
done

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:21:10 -07:00
Ksenija Stanojevic
3fd624b37d Staging: rtl8723au: Use snprintf instead rsprintf
Macro rsprintf is useless, remove it and use existing function
snprintf instead.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:16:23 -07:00
Ksenija Stanojevic
9faa310f2b Staging: comedi: dt9812: Use mutex instead of semaphore
Replace binary semaphore with mutex. Mutex also gives better performance
than semaphore.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:15:26 -07:00
Shraddha Barke
c29722158c Staging: lustre: lov: Remove unused #include header file
Remove lclient.h header since it is not used.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:15:11 -07:00
Shraddha Barke
246ed517eb Staging: most: Remove exceptional & on function name
In this file, function names are otherwise used as pointers without &.

A simplified version of the Coccinelle semantic patch that makes this
change is as follows:

// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:11:03 -07:00
Shraddha Barke
3a1d9489e9 Staging: iio: Remove exceptional & on function name
In this file, function names are otherwise used as pointers without &.

A simplified version of the Coccinelle semantic patch that makes this
change is as follows:

// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:11:03 -07:00
Shraddha Barke
30cc9bd64c Staging: comedi: Remove exceptional & on function name
n this file, function names are otherwise used as pointers without &.

A simplified version of the Coccinelle semantic patch that makes this
change is as follows:

// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:11:03 -07:00
Amitoj Kaur Chawla
634ffdd9ef staging: lustre: llite: Remove useless cast on void pointer
The semantic patch used to find this is:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:09:15 -07:00
Amitoj Kaur Chawla
3e127cbb06 staging: lustre: llite: Remove useless cast on void pointer
The semantic patch used to find this is:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:09:15 -07:00
Shivani Bhardwaj
7ee8291a26 Staging: wilc1000: wilc_wlan: Remove unnecessary cast
Remove cast which is not required.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@

* T x = (T)e;

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:07:06 -07:00
Shivani Bhardwaj
6bd7e56686 Staging: wilc1000: wilc_wfi_cfgoperations: Remove unused code
Remove the declaration, initialization and statement having a
variable that is not used anywhere in the code.
Semantic patch used:

@@
type T;
identifier i;
constant C;
position p != e.p;
@@

- T i@p;
  <+... when != i
- i = C;
  ...+>

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:07:06 -07:00
Leo Kim
3bffac68bf staging: wilc1000: rename u32Length of struct rcvd_net_info
This patch renames u32Length of struct rcvd_net_info to len to
avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:01:53 -07:00