linux-2.6-microblaze.git
8 years agostaging: slicoss: cleaning up codestyle warnings
Grygorii Maistrenko [Mon, 26 Sep 2016 16:56:28 +0000 (19:56 +0300)]
staging: slicoss: cleaning up codestyle warnings

This removes checkpatch.pl warnings:

WARNING: Block comments should align the * on each line

Signed-off-by: Grygorii Maistrenko <grygoriimkd@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: most: aim-v4l2: constify v4l2_file_operations structures
Bhumika Goyal [Tue, 27 Sep 2016 09:17:12 +0000 (14:47 +0530)]
Staging: most: aim-v4l2: constify v4l2_file_operations structures

Check for v4l2_file_operations structures that are only stored in the
fops field of video_device structures. As this field is constant, so
v4l2_file_operations structures having this property can also be
declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct v4l2_file_operations i@p = {...};

@ok1@
identifier r1.i;
position p;
struct video_device x;
@@
x.fops=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct v4l2_file_operations i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct v4l2_file_operations i;

File size before:
   text    data     bss     dec     hex filename
   5608     160       4    5772    168c
drivers/staging/most/aim-v4l2/video.o

File size after:
   text    data     bss     dec     hex filename
   5696      96       4    5796    16a4
drivers/staging/most/aim-v4l2/video.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: most: aim-sound: constify snd_pcm_ops structures
Bhumika Goyal [Mon, 26 Sep 2016 17:39:03 +0000 (23:09 +0530)]
Staging: most: aim-sound: constify snd_pcm_ops structures

Check for snd_pcm_ops structures that are only passed as the third
argument to the function snd_pcm_set_ops. As this argument is
constant, so snd_pcm_ops structures having this property can also be
made constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct snd_pcm_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1,e2;
@@
snd_pcm_set_ops(e1,e2,&i@p)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct snd_pcm_ops i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct snd_pcm_ops i;

File size before:
   text    data     bss     dec     hex filename
   4963     192      16    5171    1433
drivers/staging/most/aim-sound/sound.o

File size after:
   text    data     bss     dec     hex filename
   5075      64      16    5155    1423
drivers/staging/most/aim-sound/sound.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: fix error return code in audio_probe_channel()
Wei Yongjun [Sun, 25 Sep 2016 15:41:11 +0000 (15:41 +0000)]
staging: most: fix error return code in audio_probe_channel()

Fix to return a negative error code from the audio_set_hw_params() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Convert visorchannel_signalinsert() return val
David Binder [Mon, 26 Sep 2016 15:03:49 +0000 (11:03 -0400)]
staging: unisys: visorbus: Convert visorchannel_signalinsert() return val

Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer. This commit converts the
visorbus API function, visorchannel_signalinsert(), to returning integer
values. All uses of this function are updated accordingly.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Convert visorchannel_signalremove() return val
David Binder [Mon, 26 Sep 2016 15:03:48 +0000 (11:03 -0400)]
staging: unisys: visorbus: Convert visorchannel_signalremove() return val

Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer. This commit converts the
visorbus API function, visorchannel_signalremove(), to returning integer
values. All uses of this function are updated accordingly.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: Change support functions to integer return vals
David Binder [Mon, 26 Sep 2016 15:03:47 +0000 (11:03 -0400)]
staging: unisys: visorbus: Change support functions to integer return vals

Per Documentation/CodingStyle, function names that convey an action or an
imperative command should return an integer value. This commit changes
several functions and a macro, internal to visorchannel.c, to follow this
paradigm. These changes will be necessary later on to change other
functions in this file, which are part of the visorbus API, to return
integer values in lieu of a boolean.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: make MODULE_DESCRIPTIONs consistent
Jon Frisch [Mon, 26 Sep 2016 15:03:46 +0000 (11:03 -0400)]
staging: unisys: make MODULE_DESCRIPTIONs consistent

This patch ensures that consistent verbiage is used in the
MODULE_DESCRIPTION text (reported by 'modinfo') for all of
the Unisys s-Par drivers.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: remove version.h
Jon Frisch [Mon, 26 Sep 2016 15:03:45 +0000 (11:03 -0400)]
staging: unisys: remove version.h

This patch removes version.h and the last version.h
include in visorchannel.c.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visornic: remove driver version from visornic_main.c
Jon Frisch [Mon, 26 Sep 2016 15:03:44 +0000 (11:03 -0400)]
staging: unisys: visornic: remove driver version from visornic_main.c

This patch removes the driver version from visornic_main.c

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorinput: remove driver version from visorinput.c
Jon Frisch [Mon, 26 Sep 2016 15:03:43 +0000 (11:03 -0400)]
staging: unisys: visorinput: remove driver version from visorinput.c

This patch removes the driver version and the version.h include
from visorinput.c

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove driver version from visorchipset.c
Jon Frisch [Mon, 26 Sep 2016 15:03:42 +0000 (11:03 -0400)]
staging: unisys: visorbus: remove driver version from visorchipset.c

This patch removes the driver version and the version.h include
from visorchipset.c

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: remove driver version from struct visor_driver
Jon Frisch [Mon, 26 Sep 2016 15:03:41 +0000 (11:03 -0400)]
staging: unisys: remove driver version from struct visor_driver

This patch removes the all instances of the driver version from
struct visor_driver. This includes removing version, vertag
(a human readable version string of the driver version) and
version_attr from struct visor_driver. This resulted in removing the
bus attributes and driver attributes which only contained the driver
version. The utsname function is used to replace the driver version
with the kernel version in bus_device_info_init().

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: Use __packed over __attribute__((packed))
Matt Kilgore [Tue, 27 Sep 2016 06:05:44 +0000 (02:05 -0400)]
staging: ks7010: Use __packed over __attribute__((packed))

This replaces uses of __attribute__((packed)) with __packed, which is
recommended to be used over the direct __attribute__.  This patch then
includes <linux/compiler.h> as necessary to use __packed.

Signed-off-by: Matthew Kilgore <mattkilgore12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: Fix warnings on printk() usage
Sabitha George [Mon, 26 Sep 2016 17:10:16 +0000 (22:40 +0530)]
staging: ks7010: Fix warnings on printk() usage

This patch fixes the following warnings on ks7010_sdio.c
1. printk() should include KERN_ facility level
2. Prefer [subsystem eg: netdev]_err([subsystem]dev, ...
then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: ks_wlan_net: Use netdev_info instead of printk
Georgiana Rodica Chelu [Mon, 26 Sep 2016 11:07:52 +0000 (14:07 +0300)]
staging: ks7010: ks_wlan_net: Use netdev_info instead of printk

Pass the net_device structure to print_hif_event function
in order to use netdev_info instead of printk.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: ks_wlan_net: Use netdev_ instead of printk
Georgiana Rodica Chelu [Mon, 26 Sep 2016 08:15:56 +0000 (11:15 +0300)]
staging: ks7010: ks_wlan_net: Use netdev_ instead of printk

The checkpatch.pl script found the following warning:

WARNING: printk() should include KERN_ facility level

After adding the KERN_ facility level to printk(), the script showed
another warning:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then
dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

The warning is similar for KERN_ERR and KERN_DEBUG. In conclusion,
use netdev_info(), netdev_err() or netdev_dbg() when there is
a netdev device.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: iio: light: constify attribute_group structures
Bhumika Goyal [Mon, 26 Sep 2016 05:01:39 +0000 (10:31 +0530)]
Staging: iio: light: constify attribute_group structures

Check for attribute_group structures that are only stored in the
attrs filed of iio_info structure. As the attrs field of iio_info
structures is constant, so these attribute_group structures can also be
declared constant.
Done using coccinelle

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before: drivers/staging/iio/light/tsl2583.o
   text    data     bss     dec     hex filename
   6529    1052       0    7581    1d9d
drivers/staging/iio/light/tsl2583.o

File size after: drivers/staging/iio/light/tsl2583.o
   text    data     bss     dec     hex filename
   6593     988       0    7581    1d9d
drivers/staging/iio/light/tsl2583.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: iio: adc: constify attribute_group structures
Bhumika Goyal [Mon, 26 Sep 2016 05:01:38 +0000 (10:31 +0530)]
Staging: iio: adc: constify attribute_group structures

Check for attribute_group structures that are only stored in the
attrs filed of iio_info structure. As the attrs field of iio_info
structures is constant, so these attribute_group structures can also be
declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before: drivers/staging/iio/adc/ad7280a.o
   text    data     bss     dec     hex filename
   6487     584     776    7847    1ea7
drivers/staging/iio/adc/ad7280a.o

File size after: drivers/staging/iio/adc/ad7280a.o
   text    data     bss     dec     hex filename
   6551     544     776    7871    1ebf
drivers/staging/iio/adc/ad7280a.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix sparse warning: symbol was not declared. Should it be static?
Matias Mucciolo [Mon, 26 Sep 2016 16:13:03 +0000 (13:13 -0300)]
staging: wilc1000: fix sparse warning: symbol was not declared. Should it be static?

- Fixed a sparse warning:
  wilc_debugfs.c:32:10: warning: symbol 'WILC_DEBUG_LEVEL' was not declared. Should it be static?

Signed-off-by: Matias Mucciolo <mmucciolo@suteba.org.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wilc1000: constify cfg80211_ops structures
Bhumika Goyal [Mon, 26 Sep 2016 14:33:06 +0000 (20:03 +0530)]
Staging: wilc1000: constify cfg80211_ops structures

Check for cfg80211_ops structures that are only passed as the first
argument to the function wiphy_new. As this argument is constant, so
cfg80211_ops structures having this property can also be declared
constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct cfg80211_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1;
@@
wiphy_new(&i@p,e1)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct cfg80211_ops i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct cfg80211_ops i;

File size before:
   text    data     bss     dec     hex filename
  17468    2417   14912   34797    87ed
drivers/staging/wilc1000/wilc_wfi_cfgoperations.o

File size after:
   text    data     bss     dec     hex filename
  18204    1681   14912   34797    87ed
drivers/staging/wilc1000/wilc_wfi_cfgoperations.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: add missing LMV_MAGIC_V1 case
wang di [Mon, 26 Sep 2016 14:50:50 +0000 (10:50 -0400)]
staging: lustre: llite: add missing LMV_MAGIC_V1 case

The port to upstream dropped handling the LMV_MAGIC_V1
case for ll_dir_getstripe. This adds it back.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-on: http://review.whamcloud.com/7228
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agogreybus: manifest: style fix missing space before '('
Quentin Lambert [Tue, 27 Sep 2016 09:42:08 +0000 (11:42 +0200)]
greybus: manifest: style fix missing space before '('

Checkpatch printed a style ERROR concerning a missing space before '('.
This patch fixes this issue.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus/timesync: avoid divide by zero on X86 Qemu
Bryan O'Donoghue [Mon, 26 Sep 2016 17:01:23 +0000 (18:01 +0100)]
staging: greybus/timesync: avoid divide by zero on X86 Qemu

A system configured without CONFIG_CPUFREQ will return 0 for cpufreq_get().
greybus-timesync can subsequently then do a divide-by-zero as result. This
patch fixes by checking for a zero return value from cpufreq_get() and
setting to a default value of 19.2MHz.

Reported-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers/staging/greybus: gpio.c - Fixed a checkpatch generated warning
Chase Metzger [Sun, 25 Sep 2016 20:35:47 +0000 (13:35 -0700)]
drivers/staging/greybus: gpio.c - Fixed a checkpatch generated warning

Removed braces for single line if statement.

Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agogreybus: audio: fix uninitialized variable errors found by cppcheck
Vaibhav Agarwal [Sat, 24 Sep 2016 17:36:26 +0000 (23:06 +0530)]
greybus: audio: fix uninitialized variable errors found by cppcheck

Currently, if info is null, the dev_err message is dereferencing an
uninitialized module pointer.  Instead, it should use codec->dev pointer
in dev_err call and better align with other err msg in this function.

Also, ret variable might be used uninitialized in a specific case.
Avoid using it this way.

Found using static analysis with cppcheck:
Checking drivers/staging/greybus/audio_topology.c...
[drivers/staging/greybus/audio_topology.c:175]: (error) Uninitialized
variable: module
[drivers/staging/greybus/audio_topology.c:495]: (error) Uninitialized
variable: ret

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192e: fixed block comments should align the * on each line
Darryl T. Agostinelli [Mon, 26 Sep 2016 12:08:14 +0000 (07:08 -0500)]
staging: rtl8192e: fixed block comments should align the * on each line

shifted over comment block one space

Signed-off-by: Darryl T. Agostinelli <dagostinelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8172: usb_intf.c: Fixed block comment coding style
Gonçalo Salazar [Mon, 26 Sep 2016 19:42:58 +0000 (20:42 +0100)]
staging: rtl8172: usb_intf.c: Fixed block comment coding style

Fixed a block comment indentation in the rtl8712 usb_intf.c file.

Signed-off-by: Gonçalo Salazar <glbsalazar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: fix block comments style errors
Sergio Paracuellos [Sun, 25 Sep 2016 13:35:08 +0000 (15:35 +0200)]
staging: wlan-ng: fix block comments style errors

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: Block comments should align the * on each line

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211item_unk4096_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:35:07 +0000 (15:35 +0200)]
staging: wlan-ng: avoid new typedef: p80211item_unk4096_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211item_unk4096_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211item_unk1024_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:35:06 +0000 (15:35 +0200)]
staging: wlan-ng: avoid new typedef: p80211item_unk1024_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211item_unk1024_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211item_unk392_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:35:05 +0000 (15:35 +0200)]
staging: wlan-ng: avoid new typedef: p80211item_unk392_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211item_unk392_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211item_pstr255_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:35:04 +0000 (15:35 +0200)]
staging: wlan-ng: avoid new typedef: p80211item_pstr255_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211item_pstr255_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211item_pstr32_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:35:03 +0000 (15:35 +0200)]
staging: wlan-ng: avoid new typedef: p80211item_pstr32_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211item_pstr32_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211item_pstr14_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:35:02 +0000 (15:35 +0200)]
staging: wlan-ng: avoid new typedef: p80211item_pstr14_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211item_pstr14_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211item_pstr6_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:35:01 +0000 (15:35 +0200)]
staging: wlan-ng: avoid new typedef: p80211item_pstr6_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211item_pstr6_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211item_uint32_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:35:00 +0000 (15:35 +0200)]
staging: wlan-ng: avoid new typedef: p80211item_uint32_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211item_uint32_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211itemd_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:34:59 +0000 (15:34 +0200)]
staging: wlan-ng: avoid new typedef: p80211itemd_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211itemd_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211item_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:34:58 +0000 (15:34 +0200)]
staging: wlan-ng: avoid new typedef: p80211item_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211item_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211macarray_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:34:57 +0000 (15:34 +0200)]
staging: wlan-ng: avoid new typedef: p80211macarray_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211macarray_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211pstr32_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:34:56 +0000 (15:34 +0200)]
staging: wlan-ng: avoid new typedef: p80211pstr32_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211pstr32_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211pstr14_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:34:55 +0000 (15:34 +0200)]
staging: wlan-ng: avoid new typedef: p80211pstr14_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211pstr14_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211pstr6_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:34:54 +0000 (15:34 +0200)]
staging: wlan-ng: avoid new typedef: p80211pstr6_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211pstr6_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211pstr255_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:34:53 +0000 (15:34 +0200)]
staging: wlan-ng: avoid new typedef: p80211pstr255_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211pstr255_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211pstrd_t
Sergio Paracuellos [Sun, 25 Sep 2016 13:34:52 +0000 (15:34 +0200)]
staging: wlan-ng: avoid new typedef: p80211pstrd_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211pstrd_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: Fix comment alignment
Fernando Apesteguia [Sun, 25 Sep 2016 17:20:31 +0000 (19:20 +0200)]
staging: dgnc: Fix comment alignment

As reported by checkpatch.

Signed-off-by: Fernando Apesteguia <fernando.apesteguia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: ldlm: Fix extern variable declaration
Imre Deak [Sat, 24 Sep 2016 01:11:37 +0000 (04:11 +0300)]
staging: lustre: ldlm: Fix extern variable declaration

Move the extern declaration to a header file common to all users of the
variable. This fixes the following sparse warning:
symbol 'ldlm_cancel_unused_locks_before_replay' was not declared.
Should it be static?

Signed-off-by: Imre Deak <imre.deak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: core: rtw_security: Remove return statement from void function
Georgiana Rodica Chelu [Sat, 24 Sep 2016 20:35:53 +0000 (23:35 +0300)]
staging: rtl8188eu: core: rtw_security: Remove return statement from void function

Remove the return statement from the end of a void function
to clean up the code.

Issue found by checkpatch.pl script.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: core: rtw_mlme: Remove return statement from void function
Georgiana Rodica Chelu [Sat, 24 Sep 2016 20:35:20 +0000 (23:35 +0300)]
staging: rtl8188eu: core: rtw_mlme: Remove return statement from void function

Remove the return statement from the end of a void function
to clean up the code.

Issue found by checkpatch.pl script.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: fix style warnings in xd.c
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:14 +0000 (16:12 +0200)]
staging: rts5208: fix style warnings in xd.c

This patch fixes the following checkpatch.pl warning in xd.c:
WARNING: else is not generally useful after a break or return

It also makes code more uniform with the new changes

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: fix style warnings in sd.c
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:13 +0000 (16:12 +0200)]
staging: rts5208: fix style warnings in sd.c

This patch fixes the following checkpatch.pl warning in sd.c:
WARNING: else is not generally useful after a break or return

It also makes code more uniform with the new changes

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: fix line style warnings in spi.c
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:12 +0000 (16:12 +0200)]
staging: rts5208: fix line style warnings in spi.c

 This patch fixes the following checkpatch.pl warning in spi.c:
 WARNING: line over 80 characters

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: remove not used typedef in rtsx_sys.h
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:11 +0000 (16:12 +0200)]
staging: rts5208: remove not used typedef in rtsx_sys.h

This patch fixes the following checkpatch.pl warning in rtsx_sys.h:
WARNING: do not add new typedefs

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: fix comment blocks style in rtsx.h
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:10 +0000 (16:12 +0200)]
staging: rts5208: fix comment blocks style in rtsx.h

This patch fixes the following checkpatch.pl warning in rtsx.h:
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: fix comment blocks style in rtsx_chip.h
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:09 +0000 (16:12 +0200)]
staging: rts5208: fix comment blocks style in rtsx_chip.h

This patch fixes the following checkpatch.pl warning in rtsx_chip.h:
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: avoid symbolic permissions in rtsx.c
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:08 +0000 (16:12 +0200)]
staging: rts5208: avoid symbolic permissions in rtsx.c

This patch fixes the following checkpatch.pl warning in rtsx.c:
WARNING: Symbolic permissions are not preferred.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rts5208: avoid new typedef in rtsx.h: rtsx_dev_t
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:07 +0000 (16:12 +0200)]
staging: rts5208: avoid new typedef in rtsx.h: rtsx_dev_t

This patch fixes the following checkpatch.pl warning in rtsx.h:
WARNING: do not add new typedefs

It also remove DELAY_PARA_T because code is not using it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211pstr_t
Sergio Paracuellos [Fri, 23 Sep 2016 13:45:20 +0000 (15:45 +0200)]
staging: wlan-ng: avoid new typedef: p80211pstr_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211pstr_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211enum_t
Sergio Paracuellos [Fri, 23 Sep 2016 13:45:19 +0000 (15:45 +0200)]
staging: wlan-ng: avoid new typedef: p80211enum_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211enum_t.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: avoid new typedef: p80211enumpair_t
Sergio Paracuellos [Fri, 23 Sep 2016 13:45:17 +0000 (15:45 +0200)]
staging: wlan-ng: avoid new typedef: p80211enumpair_t

This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211enumpair_t.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ion: Align cases with switch
Christopher Pezley [Sat, 24 Sep 2016 16:51:58 +0000 (18:51 +0200)]
staging: ion: Align cases with switch

The preferred indentation for cases and switches has the cases at
the same level as the switch.

Signed-off-by: Christopher H. Pezley <chris@pezley.net>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ion: Fix a coding style issue
Antti Keränen [Fri, 23 Sep 2016 18:03:05 +0000 (21:03 +0300)]
staging: ion: Fix a coding style issue

This patch fixes the alignment of an allocation flag block comment
and moves the comments before each #define.

Signed-off-by: Antti Keränen <detegr@gmail.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: ks_wlan_net: Remove return statement from void function
Georgiana Rodica Chelu [Sat, 24 Sep 2016 19:49:02 +0000 (22:49 +0300)]
staging: ks7010: ks_wlan_net: Remove return statement from void function

Remove the return statement from the end of a void function
to clean up the code.

Issue found by checkpatch.pl script.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value
Georgiana Rodica Chelu [Fri, 23 Sep 2016 19:45:25 +0000 (22:45 +0300)]
staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value

Remove unneeded code in order to make clear
that the function returns 0(success) in all cases.

Done using returnvar.cocci script.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: ks7010: remove unused function in ks_wlan_net.c
Baoyou Xie [Fri, 23 Sep 2016 13:21:33 +0000 (21:21 +0800)]
Staging: ks7010: remove unused function in ks_wlan_net.c

We get 1 warning when building kernel with W=1:
drivers/staging/ks7010/ks_wlan_net.c:3520:5: warning: no previous prototype for 'ks_wlan_reset' [-Wmissing-prototypes]

In fact, these functions are unused in
ks_wlan_net.c, but should be removed.

So this patch removes the unused function.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: remove unused functions in r8192U_core.c
Baoyou Xie [Fri, 23 Sep 2016 13:35:22 +0000 (21:35 +0800)]
staging: rtl8192u: remove unused functions in r8192U_core.c

We get 2 warnings when building kernel with W=1:
drivers/staging/rtl8192u/r8192U_core.c:925:12: warning: no previous declaration for 'ieeerate2rtlrate' [-Wmissing-declarations]
drivers/staging/rtl8192u/r8192U_core.c:958:12: warning: no previous declaration for 'rtl8192_rate2rate' [-Wmissing-declarations]
drivers/staging/rtl8192u/r8192U_core.c:1322:11: warning: no previous declaration for 'rtl8192_IsWirelessBMode' [-Wmissing-declarations]

In fact, these functions are unused in
r8192U_core.c, but should be removed.

So this patch removes the unused functions.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: ieee80211: ieee80211_softmac: mark symbols static where possible
Baoyou Xie [Fri, 23 Sep 2016 13:31:18 +0000 (21:31 +0800)]
staging: rtl8192u: ieee80211: ieee80211_softmac: mark symbols static where possible

We get 5 warnings when building kernel with W=1:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:287:13: warning: no previous declaration for 'softmac_ps_mgmt_xmit' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:323:24: warning: no previous declaration for 'ieee80211_probe_req' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:643:24: warning: no previous declaration for 'ieee80211_authentication_req' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:981:24: warning: no previous declaration for 'ieee80211_association_req' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3094:24: warning: no previous declaration for 'ieee80211_disassociate_skb' [-Wmissing-declarations]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: android: ion: mark symbols static where possible
Baoyou Xie [Fri, 23 Sep 2016 13:13:35 +0000 (21:13 +0800)]
staging: android: ion: mark symbols static where possible

We get 4 warnings when building kernel with W=1:
drivers/staging/android/ion/ion_carveout_heap.c:36:17: warning: no previous prototype for 'ion_carveout_allocate' [-Wmissing-prototypes]
drivers/staging/android/ion/ion_carveout_heap.c:50:6: warning: no previous prototype for 'ion_carveout_free' [-Wmissing-prototypes]
drivers/staging/android/ion/ion_of.c:28:5: warning: no previous prototype for 'ion_parse_dt_heap_common' [-Wmissing-prototypes]
drivers/staging/android/ion/ion_of.c:54:5: warning: no previous prototype for 'ion_setup_heap_common' [-Wmissing-prototypes]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: aim-cdev: make syscall write accept buffers of arbitrary size
Christian Gromm [Fri, 23 Sep 2016 13:20:02 +0000 (15:20 +0200)]
staging: most: aim-cdev: make syscall write accept buffers of arbitrary size

This patch allows to call the write() function for synchronous and
isochronous channels with buffers of any size. The AIM simply waits for
data to fill up the MOST buffer object according to the network interface
controller specification for streaming channels, before it submits the
buffer to the HDM.

The new behavior is backward compatible to the old applications, since
all known applications needed to fill the buffer completely anyway.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: Use setup_timer function
sayli karnik [Thu, 22 Sep 2016 16:39:06 +0000 (22:09 +0530)]
staging: greybus: Use setup_timer function

This patch uses setup_timer function instead of initializing timer with the
function and data fields.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: remove unnecessary spaces before casts
Jannik Becher [Thu, 22 Sep 2016 23:02:10 +0000 (01:02 +0200)]
staging: wlan-ng: remove unnecessary spaces before casts

Fixed a coding style issue by removing unnecessary spaces before casts.

Signed-off-by: Jannik Becher <Becher.Jannik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: add blank line after variable declarations
Johan Svensson [Thu, 22 Sep 2016 18:11:21 +0000 (20:11 +0200)]
staging: ks7010: add blank line after variable declarations

Fixes warnings found by checkpatch
Missing a blank line after declarations

Signed-off-by: Johan Svensson <johan.svensson692@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: r8188eu: remove RFType member of odm_dm_struct structure
Ivan Safonov [Thu, 22 Sep 2016 14:59:22 +0000 (21:59 +0700)]
staging: r8188eu: remove RFType member of odm_dm_struct structure

rf_type is always equal to ODM_1T1R.
So, only RF PATH A exists for r8188eu device...

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: r8188eu: remove rf_type member of hal_data_8188e structure
Ivan Safonov [Thu, 22 Sep 2016 14:58:43 +0000 (21:58 +0700)]
staging: r8188eu: remove rf_type member of hal_data_8188e structure

rf_type is always equal to RF_1T1R.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: hal: rtl8188e_cmd: Use ether_addr_copy() instead of memcpy()
Georgiana Rodica Chelu [Fri, 23 Sep 2016 06:14:27 +0000 (09:14 +0300)]
staging: rtl8188eu: hal: rtl8188e_cmd: Use ether_addr_copy() instead of memcpy()

The checkpatch.pl found the warning:
WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)

Checked if the the Ethernet addresses are __aligned(2) by using pahole
tool. The type of pwlanhdr is struct ieee80211_hdr and pahole shows that
addr1, addr2, and addr3 are aligned to u16.

struct ieee80211_hdr {
        __le16                     frame_control;        /*     0     2 */
        __le16                     duration_id;          /*     2     2 */
        u8                         addr1[6];             /*     4     6 */
        u8                         addr2[6];             /*    10     6 */
        u8                         addr3[6];             /*    16     6 */
        __le16                     seq_ctrl;             /*    22     2 */
        u8                         addr4[6];             /*    24     6 */

        /* size: 30, cachelines: 1, members: 7 */
        /* last cacheline: 30 bytes */
};

Both eeprompriv from struct adapter and MacAddress from struct
wlan_bssid_ex have the offset multiple of sizeof(u16).

Also, the array bc_addr and the pointers: StaAddr, mac, and bssid,
start from an even offset.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: removed uneeded return variables
Juliana Rodrigues [Fri, 23 Sep 2016 03:21:55 +0000 (00:21 -0300)]
staging: lustre: llite: removed uneeded return variables

Removed variables used only for return purposes and replaced them for
the return value itself. Found using Coccinelle's semantic patch:

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: removed blank lines
Juliana Rodrigues [Thu, 22 Sep 2016 21:09:28 +0000 (18:09 -0300)]
staging: wlan-ng: removed blank lines

Removed an unecessary blank line after open brace, fixing a checkpatch
issue.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: arche-apb-ctrl: declare struct of_device_id as const
Eva Rachel Retuya [Thu, 22 Sep 2016 15:33:33 +0000 (23:33 +0800)]
staging: greybus: arche-apb-ctrl: declare struct of_device_id as const

Declare the 'arche_apb_ctrl_of_match' array as const. This array is only stored
in the .of_match_table field of a device_driver structure, which is declared as
const. This addresses the checkpatch warning:

WARNING: struct of_device_id should be normally const

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: arche-platform: declare struct of_device_id as const
Eva Rachel Retuya [Thu, 22 Sep 2016 15:33:34 +0000 (23:33 +0800)]
staging: greybus: arche-platform: declare struct of_device_id as const

Declare the arrays 'arche_platform_of_match' and 'arche_combined_id' as const.

'arche_platform_of_match' is only stored in the .of_match_table field of a
device_driver structure, which is declared as const.

'arche_combined_id' is passed to MODULE_DEVICE_TABLE. This macro does not
modify the array and therefore the array can be declared as const. Checkpatch
pointed out both issues.

WARNING: struct of_device_id should be normally const

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: speakup: kobjects: Add space around the operator.
Sandhya Bankar [Thu, 22 Sep 2016 09:57:30 +0000 (15:27 +0530)]
Staging: speakup: kobjects: Add space around the operator.

This issue was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: speakup: varhandlers: Add space around the operator.
Sandhya Bankar [Thu, 22 Sep 2016 09:53:55 +0000 (15:23 +0530)]
Staging: speakup: varhandlers: Add space around the operator.

This patch was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: Move NULL test closer to assignment
Rehas Sachdeva [Wed, 21 Sep 2016 18:36:51 +0000 (00:06 +0530)]
staging: slicoss: Move NULL test closer to assignment

Move the test to check if a variable is NULL, to right after it is being
assigned, rather than some statements later.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: Remove unnecessary variable used to store return value
sayli karnik [Wed, 21 Sep 2016 18:17:55 +0000 (23:47 +0530)]
staging: ks7010: Remove unnecessary variable used to store return value

This patch removes an unnecessary variable used to store return values
in order to reduce memory usage.
Done using coccinelle:
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
return
- ret
+ C
;

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon-usb: Remove unnecessary assignment
Rehas Sachdeva [Wed, 21 Sep 2016 18:08:00 +0000 (23:38 +0530)]
staging: octeon-usb: Remove unnecessary assignment

Remove 'x=a;' from a consecutive double assignment of the form 'x=a; x=b;'.
Issue detected by the semantic patch found here:
https://github.com/coccinelle/coccinellery/blob/master/write2/write2.cocci

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging:rtl8188eu: Fix multiple blank lines
Yannis Damigos [Wed, 21 Sep 2016 17:24:54 +0000 (20:24 +0300)]
Staging:rtl8188eu: Fix multiple blank lines

This patch fixes multiple black lines issue found by checkpatch.pl

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: Remove unnecessary parentheses
Rehas Sachdeva [Tue, 20 Sep 2016 13:11:18 +0000 (18:41 +0530)]
staging: sm750fb: Remove unnecessary parentheses

Remove unnecessary parentheses from right side of an assignment. Issue
detected by the following Coccinelle semantic patch:

@r@
identifier x;
expression e1, e2;
@@

- x = (e1 << e2);
+ x = e1 << e2;

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: Use BIT(x) macro
Rehas Sachdeva [Tue, 20 Sep 2016 12:06:29 +0000 (17:36 +0530)]
staging: sm750fb: Use BIT(x) macro

Replaces left shift operation (1 << d) by BIT(x) macro.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: xgifb: Remove unused variable and if statement
Rehas Sachdeva [Tue, 20 Sep 2016 14:10:14 +0000 (19:40 +0530)]
staging: xgifb: Remove unused variable and if statement

Setting the variable 'refresh_rate = 60;' has no use to the rest of the
function. Hence the if statement setting it and the variable itself can be
removed. This was detected using the following Coccinelle semantic patch:

@@
type T;
identifier i;
constant C;
@@
(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: speakup: Remove unnecessary parentheses
Katie Dunne [Wed, 21 Sep 2016 22:13:20 +0000 (15:13 -0700)]
staging: speakup: Remove unnecessary parentheses

Issue found by checkpatch.

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: add maintainer for uart and log protocol drivers
David Lin [Thu, 22 Sep 2016 01:57:23 +0000 (18:57 -0700)]
staging: greybus: add maintainer for uart and log protocol drivers

Add myself as greybus uart and log protocol driver maintainer.

Signed-off-by: David Lin <dtwlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: uart.c: fix alignment to match open parenthesis
Chaehyun Lim [Thu, 22 Sep 2016 01:56:44 +0000 (10:56 +0900)]
staging: greybus: uart.c: fix alignment to match open parenthesis

Fixes checkpatch.pl warning:
CHECK: Alignment should match open parenthesis

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: uart.c: change 'unsigned' to 'unsigned int'
Chaehyun Lim [Thu, 22 Sep 2016 01:56:43 +0000 (10:56 +0900)]
staging: greybus: uart.c: change 'unsigned' to 'unsigned int'

Fixes checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: audio_codec.c: code indent should use tabs where possible
Richard Groux [Wed, 21 Sep 2016 17:05:31 +0000 (19:05 +0200)]
staging: greybus: audio_codec.c: code indent should use tabs where possible

Minor error spotted by checkpatch.pl in greybus
code indent should use tabs where possible

Signed-off-by: Richard Groux <rgroux@sauron-mordor.net>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: audio_codec.c: space required before the open brace
Richard Groux [Wed, 21 Sep 2016 17:05:29 +0000 (19:05 +0200)]
staging: greybus: audio_codec.c: space required before the open brace

Minor error spotted by checkpatch.pl in greybus
space required before the open brace '{'

Signed-off-by: Richard Groux <rgroux@sauron-mordor.net>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: arche-platform: compress return logic into one line
Eva Rachel Retuya [Wed, 21 Sep 2016 05:07:04 +0000 (13:07 +0800)]
staging: greybus: arche-platform: compress return logic into one line

Modify return statement to use the value being returned directly instead of
assigning it first to 'ret' and returning this variable. Coccinelle semantic
patch used:

@@
expression e;
local idexpression ret;
@@

-ret =
+return
e;
-return ret;

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: audio: delete unnecessary parentheses
Eva Rachel Retuya [Wed, 21 Sep 2016 05:03:24 +0000 (13:03 +0800)]
staging: greybus: audio: delete unnecessary parentheses

Eliminate unneeded parentheses around the right hand side of an assignment.
Coccinelle semantic patch used:

@@
expression e1, e2;
identifier v;
@@

(
 v = (e1 == e2)
|
 v = (e1 != e2)
|
 v = (e1 <= e2)
|
 v = (e1 >= e2)
|
 v =
- (
e1
- )
)

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: greybus: camera: simplify NULL test
Eva Rachel Retuya [Wed, 21 Sep 2016 04:59:29 +0000 (12:59 +0800)]
staging: greybus: camera: simplify NULL test

Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency.
Coccinelle semantic patch used:

@@
identifier func;
expression x;
statement Z;
@@

x = func(...);

if (
(
+ !
x
- == NULL
|
+ !
- NULL ==
x
)
   ) Z

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: replace MOST_CH_ISOC_AVP with MOST_CH_ISOC
Andrey Shvetsov [Wed, 21 Sep 2016 12:49:10 +0000 (14:49 +0200)]
staging: most: replace MOST_CH_ISOC_AVP with MOST_CH_ISOC

This patch replaces the enum value MOST_CH_ISOC_AVP with the more
appropriate MOST_CH_ISOC.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: clean up configuration strings
Christian Gromm [Wed, 21 Sep 2016 12:49:09 +0000 (14:49 +0200)]
staging: most: clean up configuration strings

This patch adds the strings 'rx', 'tx' and 'isoc' to the list of accepted
identifiers when setting up a channel configuration. To keep consistency it
removes the prefix "dir_" from strings returned by the attributes
set_direction and available_directions and it removes the suffix "_avp"
from the string "isoc_avp" returned by the attributes set_datatype and
available_datatypes.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: core: remove trailing zero from text property
Andrey Shvetsov [Wed, 21 Sep 2016 12:49:08 +0000 (14:49 +0200)]
staging: most: core: remove trailing zero from text property

This patch removes trailing zeros from the strings returned by the
attributes available_datatypes and available_directions.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>