]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/log
mirror_ubuntu-artful-kernel.git
9 years agostaging: comedi: cb_pcidas: tidy up PCI BAR4 register defines
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:34 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: tidy up PCI BAR4 register defines

Convert the inline function DAC_DATA_REG() into a simple macro.

Rename the defines for the PCI BAR4 register offsets so they have
namespace associated with the driver and convert the offsets 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>
9 years agostaging: comedi: cb_pcidas: rename private data 'ao_registers'
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:33 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: rename private data 'ao_registers'

This member of the private data holds the PCI BAR4 resource starting
address. For aesthetics, rename this member to 'pcibar4'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: rename private data 'adc_fifo'
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:32 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: rename private data 'adc_fifo'

This member of the private data holds the PCI BAR2 resource starting
address. For aesthetics, rename this member to 'pcibar2'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: rename private data 'control_status'
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:31 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: rename private data 'control_status'

This member of the private data holds the PCI BAR1 resource starting
address. For aesthetics, rename this member to 'pcibar1'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: refactor 'ranges' boardinfo
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:30 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: refactor 'ranges' boardinfo

All the boards, except the 'pci-das1001', use the normal analog input
range table 'cb_pcidas_ranges'. Convert the 'ranges' boardinfo into
a bit-field flag 'use_alt_range' to save a bit of space.

For aesthetics, reword the comments in the boardinfo for the bit-field
members so they align.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: all boards have 16 analog input channels
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:29 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: all boards have 16 analog input channels

All the boards supported by this driver have 16 analog input channels.
Remove this unnecessary information from 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>
9 years agostaging: comedi: cb_pcidas: refactor analog output boardinfo
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:28 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: refactor analog output boardinfo

Only some of the boards supported by this driver have analog outputs
but they always have 2 channels. Refactor the 'ao_nchan' member of
the boardinfo into a bit-field flag 'has_ao' to save a bit of space.
Also, convert the 'has_ao_fifo' member into a bit-field flag.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: refactor 'ai_bits' boardinfo
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:27 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: refactor 'ai_bits' boardinfo

The boards supported by this driver either have 16-bit or 12-bit
analog input/output resolution. For aesthetics, replace the 'ai_bits'
member of the boardinfo with a bit-field flag 'is_16bit'. Also,
change the types of the other bit-field flags to unsigned int.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: remove NUM_CHANNELS_* defines
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:26 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: remove NUM_CHANNELS_* defines

These defines don't add any additional clarity to the driver. Just
remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: tidy up multi-line comments
H Hartley Sweeten [Wed, 14 Oct 2015 00:47:25 +0000 (17:47 -0700)]
staging: comedi: cb_pcidas: 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>
9 years agostaging: netlogic: xlr_net.h: fixed coding style warnings
Sakshi Bansal [Thu, 15 Oct 2015 14:35:03 +0000 (20:05 +0530)]
staging: netlogic: xlr_net.h: fixed coding style warnings

Fixed block comments usage of * on subsequent lines

Signed-off-by: Sakshi Bansal <sakshi.april5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rts5208: use dmam_alloc_coherent
Ronit Halder [Fri, 16 Oct 2015 08:50:20 +0000 (14:20 +0530)]
Staging: rts5208: use dmam_alloc_coherent

This patch replaces dma_alloc_coherent with the corresponding
managed interface.

Signed-off-by: Ronit Halder <ronit.crj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: fix line-over-80-characters violations
Christian Gromm [Thu, 15 Oct 2015 11:29:00 +0000 (13:29 +0200)]
staging: most: fix line-over-80-characters violations

This patch prevents code from crossing the 80 character margin.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: change parameter description
Christian Gromm [Thu, 15 Oct 2015 11:28:59 +0000 (13:28 +0200)]
staging: most: change parameter description

This patch changes the description of a function parameter for a better
understanding.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: replace memcpy by ether_addr_copy
Christian Gromm [Thu, 15 Oct 2015 11:28:58 +0000 (13:28 +0200)]
staging: most: replace memcpy by ether_addr_copy

This patch replaces memcpy() by the preferred function ether_addr_copy().

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: fix misplaced constants in comparisons
Christian Gromm [Thu, 15 Oct 2015 11:28:57 +0000 (13:28 +0200)]
staging: most: fix misplaced constants in comparisons

This patch removes and fixes constants being misplaced in comparisons.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: make hdm-usb follow the coding style
Christian Gromm [Thu, 15 Oct 2015 11:28:56 +0000 (13:28 +0200)]
staging: most: make hdm-usb follow the coding style

This patch fixes a couple of issues of the hdm-usb module found by
checkpatch.pl.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: fix checkpatch issues of hdm i2c
Christian Gromm [Thu, 15 Oct 2015 11:28:55 +0000 (13:28 +0200)]
staging: most: fix checkpatch issues of hdm i2c

This patch fixes the issues of HDM module i2c found by checkpatch.pl

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: remove constants from comparisons
Christian Gromm [Thu, 15 Oct 2015 11:28:54 +0000 (13:28 +0200)]
staging: most: remove constants from comparisons

This patch removes constants from comparisons and fixes checkpatch warnings
about constants being put in the wrong place inside a comparison.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: most: correct coding style breaches
Christian Gromm [Thu, 15 Oct 2015 11:28:51 +0000 (13:28 +0200)]
staging: most: correct coding style breaches

This patch fixes line-over-80-characters violation and removes the
splitting of quoted strings.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: cdev: Remove useless check
Shivani Bhardwaj [Thu, 15 Oct 2015 10:42:01 +0000 (16:12 +0530)]
Staging: most: cdev: Remove useless check

The variable mbo is already NULL tested so, check on it should be
removed.
Semantic patch used:

@@ expression E;
statement S; @@
if(E==NULL) {... return ...;}
- if(E)
  S

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: fix style issue in aim-cdev/cdev.c
Gavin Thomas Claugus [Tue, 13 Oct 2015 21:44:40 +0000 (17:44 -0400)]
Staging: most: fix style issue in aim-cdev/cdev.c

Fix 80+ character line in cdev.c to stop checkpatch from whining.

Signed-off-by: Gavin Thomas Claugus <gclaugus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: olpc_dcon: Remove NULL comparison
Aybuke Ozdemir [Fri, 16 Oct 2015 18:51:45 +0000 (21:51 +0300)]
Staging: olpc_dcon: Remove NULL comparison

Problem found using checkpatch.pl
CHECK: Comparison to NULL could be written "(!)dcon_device"

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: olpc_dcon: Use preferred kernel type
Aybuke Ozdemir [Fri, 16 Oct 2015 18:51:44 +0000 (21:51 +0300)]
Staging: olpc_dcon: Use preferred kernel type

This patch "uint16_t" type instead of "u16" type was used.
checkpatch.pl issue.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: olpc_dcon: Remove multiple blank lines
Aybuke Ozdemir [Fri, 16 Oct 2015 18:51:43 +0000 (21:51 +0300)]
Staging: olpc_dcon: Remove multiple blank lines

Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: replace NULL and zero comparison tests with ! operator
Alison Schofield [Fri, 16 Oct 2015 18:46:29 +0000 (11:46 -0700)]
staging: r8723au: replace NULL and zero comparison tests with ! operator

Replace explicit NULL comparison and zero comparison test with ! operator
to simplify code.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: dgap: Remove unnecessary test expression
Shivani Bhardwaj [Fri, 16 Oct 2015 16:39:57 +0000 (22:09 +0530)]
Staging: dgap: Remove unnecessary test expression

struct bd is already NULL tested so, any further NULL checks should be
removed.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: gdx724x: gdm_mux: Remove explicit cast
Shivani Bhardwaj [Fri, 16 Oct 2015 15:26:22 +0000 (20:56 +0530)]
Staging: gdx724x: gdm_mux: Remove explicit cast

Compiler can typecast variables implicitly so, explicit type cast is not
required and should be removed.
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>
9 years agostaging: media: lirc: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:10:08 +0000 (13:40 +0530)]
staging: media: lirc: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: davinci_vpfe: Remove useless intialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:11:30 +0000 (13:41 +0530)]
staging: media: davinci_vpfe: Remove useless intialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: Prefer using BIT Macro
Amitoj Kaur Chawla [Fri, 16 Oct 2015 16:41:36 +0000 (22:11 +0530)]
staging: panel: Prefer using BIT Macro

Replace bit shifting on 1 with the BIT(x) Macro

The semantic patch used to find this is:
@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: skein: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:14:20 +0000 (13:44 +0530)]
staging: skein: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Prefer using BIT Macro
Amitoj Kaur Chawla [Fri, 16 Oct 2015 16:43:29 +0000 (22:13 +0530)]
staging: vt6655: Prefer using BIT Macro

Replace bit shifting on 1 with the BIT(x) Macro

The semantic patch used to find this is:
@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Prefer using BIT Macro
Amitoj Kaur Chawla [Fri, 16 Oct 2015 16:42:35 +0000 (22:12 +0530)]
staging: vt6656: Prefer using BIT Macro

Replace bit shifting on 1 with the BIT(x) Macro

The semantic patch used to find this is:
@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Remove boolean comparisons
Luis de Bethencourt [Thu, 15 Oct 2015 12:31:11 +0000 (13:31 +0100)]
staging: vt6655: Remove boolean comparisons

Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:17:00 +0000 (13:47 +0530)]
staging: vt6656: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:15:39 +0000 (13:45 +0530)]
staging: vt6655: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rdma: amso1100: Prefer using BIT Macro
Amitoj Kaur Chawla [Fri, 16 Oct 2015 16:40:25 +0000 (22:10 +0530)]
staging: rdma: amso1100: Prefer using BIT Macro

Replace bit shifting on 1 with the BIT(x) Macro

The semantic patch used to find this is:
@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rdma: hfi1: Prefer using BIT Macro
Amitoj Kaur Chawla [Fri, 16 Oct 2015 16:39:08 +0000 (22:09 +0530)]
staging: rdma: hfi1: Prefer using BIT Macro

Replace bit shifting on 1 with the BIT(x) Macro

The semantic patch used to find this is:
@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rdma: hfi1: delete unneeded tabs in conditional statement block
Alison Schofield [Fri, 16 Oct 2015 16:06:52 +0000 (09:06 -0700)]
staging: rdma: hfi1: delete unneeded tabs in conditional statement block

Delete unneeded tabs to indent statement block correctly at (8, 16).
checkpatch.pl:
WARNING: suspect code indent for conditional statements (8, 24)

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rdma: mad: Remove explicit cast
Shivani Bhardwaj [Thu, 15 Oct 2015 09:44:41 +0000 (15:14 +0530)]
Staging: rdma: mad: Remove explicit cast

Explicit type casting is not required as compiler can type cast
variables implicitly. Therefore, it should be removed.
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>
9 years agostaging: rdma: ipath: ipath_eeprom: Remove useless intialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:20:56 +0000 (13:50 +0530)]
staging: rdma: ipath: ipath_eeprom: Remove useless intialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rdma: ipath: ipath_init_chip: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:22:08 +0000 (13:52 +0530)]
staging: rdma: ipath: ipath_init_chip: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rdma: hfi1: diag: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:23:23 +0000 (13:53 +0530)]
staging: rdma: hfi1: diag: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rdma: hfi1: sysfs: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:24:35 +0000 (13:54 +0530)]
staging: rdma: hfi1: sysfs: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove useless intialisation
Amitoj Kaur Chawla [Wed, 14 Oct 2015 21:52:22 +0000 (03:22 +0530)]
staging: unisys: Remove useless intialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorinput: no need to track open count
Tim Sell [Wed, 14 Oct 2015 13:45:10 +0000 (09:45 -0400)]
staging: unisys: visorinput: no need to track open count

evdev_open_device() and evdev_close_device() (in evdev.c) already track
the open count under lock, and will only call visorinput_open() on the
first open and visorinput_close() on the last close.  So this patch
removes the unnessary logic from visorinput, and the now-unused counter
from the struct.

Signed-off-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorinput: fix comment format
Tim Sell [Fri, 16 Oct 2015 14:06:47 +0000 (10:06 -0400)]
staging: unisys: visorinput: fix comment format

Fix the multi-line comment formatting in visorinput.c.

Signed-off-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: visorinput: address checkpatch alignment issues
Tim Sell [Fri, 16 Oct 2015 14:06:46 +0000 (10:06 -0400)]
staging: unisys: visorinput: address checkpatch alignment issues

Fix the alignment of function parameters to the parenthesis above.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: speakup: varhandlers: Remove useless intialisation
Amitoj Kaur Chawla [Wed, 14 Oct 2015 20:58:36 +0000 (02:28 +0530)]
staging: speakup: varhandlers: Remove useless intialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: speakup: speakup_audptr: Remove useless intialisation
Amitoj Kaur Chawla [Wed, 14 Oct 2015 21:53:35 +0000 (03:23 +0530)]
staging: speakup: speakup_audptr: Remove useless intialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: speakup: Fix multi-line comment style
Cristina Moraru [Wed, 14 Oct 2015 20:28:29 +0000 (23:28 +0300)]
staging: speakup: Fix multi-line comment style

Thus using the preferred style for multi-line coments as
mentioned in Documentation/CodingStyle.

It also silences 'Block comments use * on subsequent lines'
and 'Block comments use a trailing */ on a separate line'
checkpatch.pl warnings.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: fbtft: fb_ssd1331: Remove unnecessary cast
Shivani Bhardwaj [Fri, 16 Oct 2015 16:19:20 +0000 (21:49 +0530)]
Staging: fbtft: fb_ssd1331: Remove unnecessary cast

Compiler can typecast variables implicitly so, explicit type cast is not
required and should be removed.
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>
9 years agoStaging: fbtft: fb_ra8875: Remove useless cast
Shivani Bhardwaj [Fri, 16 Oct 2015 16:19:01 +0000 (21:49 +0530)]
Staging: fbtft: fb_ra8875: Remove useless cast

Remove explicit type conversion as it 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>
9 years agoStaging: fbtft: fb_agm1264k-fl: Remove unnecessary cast
Shivani Bhardwaj [Fri, 16 Oct 2015 16:08:34 +0000 (21:38 +0530)]
Staging: fbtft: fb_agm1264k-fl: Remove unnecessary cast

Remove explicit typecast from variables as compiler can typecast
implicitly.
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>
9 years agostaging: fbtft: Fix multi-line comment style
Cristina Moraru [Wed, 14 Oct 2015 20:27:12 +0000 (23:27 +0300)]
staging: fbtft: Fix multi-line comment style

Thus use the preferred style for multi-line coments as
mentioned in Documentation/CodingStyle.

It also silences 'Block comments use * on subsequent lines'
checkpatch.pl warnings.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: dgnc_driver: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:26:52 +0000 (13:56 +0530)]
staging: dgnc: dgnc_driver: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: dgnc_tty: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:25:45 +0000 (13:55 +0530)]
staging: dgnc: dgnc_tty: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: Fix lines over 80 characters
Cristina Moraru [Wed, 14 Oct 2015 20:26:15 +0000 (23:26 +0300)]
staging: dgnc: Fix lines over 80 characters

Fix 'line over 80 characters' checkpatch.pl
warnings

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: Remove useless initialization
Amitoj Kaur Chawla [Wed, 14 Oct 2015 20:12:11 +0000 (01:42 +0530)]
staging: wlan-ng: Remove useless initialization

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: most: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:19 +0000 (00:58 +0530)]
Staging: most: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: gdm724x: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:20 +0000 (00:58 +0530)]
Staging: gdm724x: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

Semantic patch:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: unisys: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:23 +0000 (00:58 +0530)]
Staging: unisys: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: slicoss: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:24 +0000 (00:58 +0530)]
Staging: slicoss: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: gdm72xx: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:25 +0000 (00:58 +0530)]
Staging: gdm72xx: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: comedi: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:26 +0000 (00:58 +0530)]
Staging: comedi: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rdma: amso1100: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:27 +0000 (00:58 +0530)]
Staging: rdma: amso1100: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rdma: hfi1: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:29 +0000 (00:58 +0530)]
Staging: rdma: hfi1: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: media: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:30 +0000 (00:58 +0530)]
Staging: media: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: rtw_ieee80211: Remove unnecessary cast
Shivani Bhardwaj [Wed, 14 Oct 2015 18:32:14 +0000 (00:02 +0530)]
Staging: rtl8188eu: rtw_ieee80211: Remove unnecessary cast

Explicit type conversion is not required and should be removed.
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>
9 years agoStaging: rtl8188eu: rf_cfg: Remove useless cast
Shivani Bhardwaj [Wed, 14 Oct 2015 18:51:11 +0000 (00:21 +0530)]
Staging: rtl8188eu: rf_cfg: Remove useless cast

Type conversion of variables can be done by compiler implicitly so,
explicit conversions should be removed.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@

* T x = (T)e;

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/dgnc: fix info leak in ioctl
Salva Peiró [Wed, 14 Oct 2015 15:48:02 +0000 (17:48 +0200)]
staging/dgnc: fix info leak in ioctl

The dgnc_mgmt_ioctl() code fails to initialize the 16 _reserved bytes of
struct digi_dinfo after the ->dinfo_nboards member. Add an explicit
memset(0) before filling the structure to avoid the info leak.

Signed-off-by: Salva Peiró <speirofr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iio: tsl2x7x_core: Remove unrequired parentheses from DIV_ROUND_UP
Shivani Bhardwaj [Fri, 16 Oct 2015 15:20:10 +0000 (20:50 +0530)]
Staging: iio: tsl2x7x_core: Remove unrequired parentheses from DIV_ROUND_UP

Remove parentheses surrounding the first argument of the macro
DIV_ROUND_UP as they are not required.
Semantic patch used:

@@
expression e1,e2;
@@
DIV_ROUND_UP(
- (
  e1
- )
  ,e2)

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iio: ad7192: Remove unnecessary NULL test
Shivani Bhardwaj [Fri, 16 Oct 2015 13:42:06 +0000 (19:12 +0530)]
Staging: iio: ad7192: Remove unnecessary NULL test

The variable pdata is already NULL tested before so, any further tests
should be removed.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iio: cdc: Remove unused macros
Shraddha Barke [Fri, 16 Oct 2015 05:20:56 +0000 (10:50 +0530)]
Staging: iio: cdc: Remove unused macros

Remove the macros since they are not used anywhere throughout the
kernel.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adc: remove the use of CamelCase
Ioana Ciornei [Wed, 14 Oct 2015 18:14:19 +0000 (21:14 +0300)]
staging: iio: adc: remove the use of CamelCase

Remove the use of CamelCase to follow the kernel naming conventions

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adc: remove multiple blank lines
Ioana Ciornei [Wed, 14 Oct 2015 18:14:18 +0000 (21:14 +0300)]
staging: iio: adc: remove multiple blank lines

Remove multiple blank lines since there is no practical reason
to have it

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adc: add blank line after declarations
Ioana Ciornei [Wed, 14 Oct 2015 18:14:17 +0000 (21:14 +0300)]
staging: iio: adc: add blank line after declarations

Insert a blank line after declarations

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adc: add spaces around binary operators
Ioana Ciornei [Wed, 14 Oct 2015 18:14:16 +0000 (21:14 +0300)]
staging: iio: adc: add spaces around binary operators

Add spaces around binary operators like -, +, * etc
in order to improve readability

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adc: remove space after cast
Ioana Ciornei [Wed, 14 Oct 2015 18:14:15 +0000 (21:14 +0300)]
staging: iio: adc: remove space after cast

Remove the space after an explicit cast because there is no
point in having it

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adc: remove explicit comparison to NULL
Ioana Ciornei [Wed, 14 Oct 2015 18:14:14 +0000 (21:14 +0300)]
staging: iio: adc: remove explicit comparison to NULL

Use !condition instead off condition == NULL when comparing with NULL

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adc: properly indent to match open paranthesis
Ioana Ciornei [Wed, 14 Oct 2015 18:14:13 +0000 (21:14 +0300)]
staging: iio: adc: properly indent to match open paranthesis

Indent parameters and arguments passed to function calls to match
open paranthesis

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adc: use kernel types u32 and u64
Ioana Ciornei [Wed, 14 Oct 2015 18:14:12 +0000 (21:14 +0300)]
staging: iio: adc: use kernel types u32 and u64

Convert uint32_t to u32 and uint64_t to u64 in order to
follow the kernel best practice

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: cdc: simplify return flow
Ioana Ciornei [Wed, 14 Oct 2015 19:34:27 +0000 (22:34 +0300)]
staging: iio: cdc: simplify return flow

Simplify return flow ad7150_write_event_params in order to reduce code length.
Since i2c_smbus_write_word_data only returns a negative value or 0 the change is safe.

This patch fixes the following coccicheck warning:

drivers/staging/iio/cdc/ad7150.c:182:2-5: WARNING: end returns can be simpified if negative or 0 value

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192e: rtllib_softmac: Remove useless cast
Shivani Bhardwaj [Wed, 14 Oct 2015 18:16:05 +0000 (23:46 +0530)]
Staging: rtl8192e: rtllib_softmac: Remove useless cast

Explicit type conversion is not required to remove it.
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>
9 years agoStaging: lustre: lproc_ptlrpc: Replace simple_strtol with simple_stroul
Shivani Bhardwaj [Thu, 15 Oct 2015 20:47:20 +0000 (02:17 +0530)]
Staging: lustre: lproc_ptlrpc: Replace simple_strtol with simple_stroul

The variable inst is a __u32 type and hence the function used should be
simple_strtoul.
Semantic patch used:

@@
typedef __u32;
__u32 e;
@@
e =
- simple_strtol
+ simple_strtoul
  (...)

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: lproc_osc: Change the variable to be checked
Shivani Bhardwaj [Thu, 15 Oct 2015 20:06:31 +0000 (01:36 +0530)]
Staging: lustre: lproc_osc: Change the variable to be checked

The variable rc is supposed to hold the value returned by function
kstrtoul which can either be 0, -EINVAL (-22) or -ERANGE (-34).
Therefore, the check must be performed on rc instead of val for error
values. Also, rc can never be greater than 0.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: obd_support.h: Remove unused OBD_SLAB_FREE_RTN0
Shraddha Barke [Thu, 15 Oct 2015 19:30:10 +0000 (01:00 +0530)]
Staging: lustre: obd_support.h: Remove unused OBD_SLAB_FREE_RTN0

Remove macro OBD_SLAB_FREE_RTN0 since it is defined but not used

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: mdc_locks: Remove extra test expression
Shivani Bhardwaj [Thu, 15 Oct 2015 14:16:06 +0000 (19:46 +0530)]
Staging: lustre: mdc_locks: Remove extra test expression

struct it is already NULL tested before so, it should be removed from
the if test expression.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: llite_lib: Remove unnecessary NULL check
Shivani Bhardwaj [Thu, 15 Oct 2015 12:54:05 +0000 (18:24 +0530)]
Staging: lustre: llite_lib: Remove unnecessary NULL check

Variable op_data is already tested for NULL value and therefore any
further checks should be removed.
Semantic patch used:

@@ expression E;@@
if(E==NULL) {... return ...;}
- if(E){
  ...
- }

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: obd_class.h: Remove unused macro OBD_CHECK_MD_OP
Shraddha Barke [Thu, 15 Oct 2015 08:20:19 +0000 (13:50 +0530)]
Staging: lustre: obd_class.h: Remove unused macro OBD_CHECK_MD_OP

Remove macro OBD_CHECK_MD_OP since it is defined but not used

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ptlrpc: Remove useless initialisation
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:12:53 +0000 (13:42 +0530)]
staging: lustre: ptlrpc: Remove useless initialisation

Remove intialisation of a variable that is immediately reassigned.

The semantic patch used to find this is:

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: obdclass: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:21 +0000 (00:58 +0530)]
Staging: lustre: obdclass: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

Semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: lnet: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:22 +0000 (00:58 +0530)]
Staging: lustre: lnet: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: ptlrpc: Remove unnecessary cast on void pointer
Shraddha Barke [Wed, 14 Oct 2015 19:28:28 +0000 (00:58 +0530)]
Staging: lustre: ptlrpc: Remove unnecessary cast on void pointer

void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

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

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

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: osc: Remove useless cast on void pointer
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:50:03 +0000 (00:20 +0530)]
staging: lustre: osc: 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>
9 years agostaging: lustre: mgc: Remove useless cast on void pointer
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:48:33 +0000 (00:18 +0530)]
staging: lustre: mgc: 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>
9 years agostaging: lustre: ptlrpc: sec_gc: Remove useless cast on void pointer
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:47:08 +0000 (00:17 +0530)]
staging: lustre: ptlrpc: sec_gc: 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>
9 years agostaging: lustre: ptlrpc: pinger: Remove useless cast on void pointer
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:45:23 +0000 (00:15 +0530)]
staging: lustre: ptlrpc: pinger: 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>
9 years agostaging: lustre: ptlrpc: service: Remove useless cast on void pointer
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:43:30 +0000 (00:13 +0530)]
staging: lustre: ptlrpc: service: 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>