Greg Kroah-Hartman [Tue, 7 Mar 2017 12:21:24 +0000 (13:21 +0100)]
staging: atomisp: fix include Makefile mess
Using LINUXINCLUDE is a very old hack, and doesn't play well with
building objects in a different directory than the kernel source is in.
So fix up the include file references to be relative to make it obvious
we are pulling in local include files, which need to get fixed up.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
simran singhal [Sat, 4 Mar 2017 17:41:00 +0000 (23:11 +0530)]
staging: greybus: Replace "is is" with "is"
This patch replace "is is " with "is". The replacement couldn't be
automated because sometimes the first "is" was meant to be another
word.
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jonathan Bowie [Wed, 1 Mar 2017 10:46:30 +0000 (02:46 -0800)]
staging: greybus: loop_backtest: fixed consistent spacing style issue
Fixed incosistent spacing around arithmetic operator.
Signed-off-by: Jonathan Bowie <eudjtb@gmail.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Wed, 1 Mar 2017 12:36:30 +0000 (18:06 +0530)]
staging: dgnc: replace usleep_range with udelay
udelay is impelmented using a busy-wait loop and consumes CPU cycles
while usleep_range is implemented using interrupts.cls_flush_uart_write()
is called after a channel lock is acquired i.e. an atomic context.
Hence delay in this method should use udelay instead of usleep_range.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Sun, 5 Mar 2017 09:51:44 +0000 (15:21 +0530)]
staging: dgnc: Constify ktermios structure
The ktermios structure is a local default termios struct. All ports
are initially created with this termios. Since, the structure is
never modified, it can be declared as const.
Coccinelle Script:
@r disable optional_qualifier@
identifier s,i;
position p;
@@
static struct ktermios i@p = { ... };
@ok1@
identifier r.i;
expression e;
position p;
@@
e = i@p
@bad@
position p != {r.p,ok1.p};
identifier r.i;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ktermios i = { ... };
File Size before:
text data bss dec hex filename
25469 2048 256 27773 6c7d drivers/staging/dgnc/dgnc_tty.o
File Size after:
text data bss dec hex filename
25636 2016 256 27908 6d04 drivers/staging/dgnc/dgnc_tty.o
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 4 Mar 2017 15:57:40 +0000 (21:27 +0530)]
staging: wilc1000: Logical continuations should be on the previous line
This patch fixes the checkpatch issue:
CHECK: Logical continuations should be on the previous line.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 4 Mar 2017 15:57:39 +0000 (21:27 +0530)]
staging: wilc1000: function prototype argument should have identifier name
function prototype argument should have an identifier name as reported
by checkpatch.pl.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 4 Mar 2017 15:57:38 +0000 (21:27 +0530)]
staging: wilc1000: Alignment should match open parenthesis
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis".
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Fri, 3 Mar 2017 18:20:53 +0000 (23:50 +0530)]
staging: bcm2835-audio: use min_t() macro instead of min()
use min_t() macro in place of min() to replace the two typecasts of min.
Change suggested by checkpatch script.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Fri, 3 Mar 2017 18:17:51 +0000 (23:47 +0530)]
staging: bcm2835-audio: match alignment with open parenthesis
Fix the following checkpatch warning issued on bcm2835-vchiq.c:
CHECK: Alignment should match open parenthesis
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Fri, 3 Mar 2017 18:17:32 +0000 (23:47 +0530)]
staging: bcm2835-audio: fix typo in word
fix typo in word receives
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Fri, 3 Mar 2017 18:17:16 +0000 (23:47 +0530)]
staging: bcm2835-audio: use braces on all arms of statement
Add braces on all arms of the if-else statements in bcm2835-vchiq.c to
comply with kernel coding style.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Fri, 3 Mar 2017 18:16:53 +0000 (23:46 +0530)]
staging: bcm2835-audio: remove spaces after cast
Remove instances of unnecessary blank space after cast in bcm2835-vchiq.c
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Thu, 2 Mar 2017 18:58:16 +0000 (00:28 +0530)]
staging: bcm2835-audio: replace printk(KERN_ERR...) with dev_err(...)
Use dev_err(... in place of printk(KERN_ERR ...
Problem found by checkpatch
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Thu, 2 Mar 2017 18:57:11 +0000 (00:27 +0530)]
staging: bcm2835-audio: remove extra blank line
Fix the warning: Blank lines aren't necessary after an open brace
'{' issued by checkpatch on bcm2835-ctl.c
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Thu, 2 Mar 2017 18:56:41 +0000 (00:26 +0530)]
staging: bcm2835-audio: use kernel preferred block commenting style
Fix block comment formatting to suppress the following warning thrown by
checkpatch: Block comments use a trailing */ on a separate line
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Thu, 2 Mar 2017 18:55:56 +0000 (00:25 +0530)]
staging: bcm2835-audio: move logical continuation to the same line
Keep logical continuations on the same line to improve code readability
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Thu, 2 Mar 2017 18:54:58 +0000 (00:24 +0530)]
staging: bcm2835-audio: remove space after cast
Remove instances of unnecessary blank space after cast in bcm2835-ctl.c
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Thu, 2 Mar 2017 03:10:49 +0000 (19:10 -0800)]
staging: bcm2835-camera: select BCM2835_VCHIQ rather then depending on it.
Change the camera's dependency on BCM2835_VCHIQ to a select
since camera support is typically more important to people
then base VCHIQ(which they may not even know what it's for).
Also, with a dependency the camera support would not be
visiable until VCHIQ is selected first, and that may
not be what most people would expect.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Thu, 2 Mar 2017 03:10:48 +0000 (19:10 -0800)]
staging: bcm2835-audio: select BCM2835_VCHIQ rather then depending on it.
Change the audio's dependency on BCM2835_VCHIQ to a select
since audio support is typically more important to people
then base VCHIQ(which they may not even know what it's for).
Also, with a dependency the audio support would not be
visiable until VCHIQ is selected first, and that may
not be what most people would expect.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Thu, 2 Mar 2017 03:10:47 +0000 (19:10 -0800)]
staging: vc04_services: Create new BCM_VIDEOCORE setting for VideoCore services.
Create a new memuconfig for Broadcom VideoCore services
since VideoCore is a general term used by Broadcom for a
large family of products that includes more then the BCM2835.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Wed, 1 Mar 2017 18:24:01 +0000 (23:54 +0530)]
staging: bcm2835-camera: prefer allocating memory using sizeof(*ptr) instead of sizeof(struct type name)
Using sizeof(*ptr) instead of sizeof(struct type name) is more robust to
errors.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Narcisa Ana Maria Vasile [Wed, 1 Mar 2017 17:27:10 +0000 (19:27 +0200)]
staging: bcm2835-camera: Replace 'uint32_t' with kernel type u32
This patch fixes the checkpatch.pl issue:
CHECK: Prefer kernel type 'u32' over 'uint32_t'
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Narcisa Ana Maria Vasile [Wed, 1 Mar 2017 16:59:29 +0000 (18:59 +0200)]
staging: bcm2835-camera: Add spaces around '<<'
This patch fixes the checkpatch.pl issue:
CHECK: spaces preferred around that '<<' (ctx:VxV)
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Narcisa Ana Maria Vasile [Wed, 1 Mar 2017 16:59:16 +0000 (18:59 +0200)]
staging: bcm2835-camera: Remove unnecessary blank lines
This patch fixes the checkpatch.pl issue:
CHECK: Please don't use multiple blank lines
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Narcisa Ana Maria Vasile [Wed, 1 Mar 2017 15:37:27 +0000 (17:37 +0200)]
staging: vc04_services: bcm2835-camera: Remove unnecessary variable
Instead of storing the result, make the function return directly
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 6 Mar 2017 11:48:30 +0000 (11:48 +0000)]
atomisp: fix __udiv warning
Certain combinations of compiler and compiler options product an imx.o that
calls compiler helpers for a u64 divide. Use the do_div() call instead.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 6 Mar 2017 12:17:21 +0000 (13:17 +0100)]
Merge tag 'iio-for-4.12a' of git://git./linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First set of IIO new device support, features and cleanup for the 4.12 cycle.
Quite a bit of outreachy activity here with a driver from a current intern
and a number of cleanup patches as part of the next round.
Getting a pull request in early this cycle as it's looking like another large
cycle for IIO.
New device support
* adxl345
- initial device support. Note, once complete support is done the intent
is to superceded the driver in input/misc.
- bindings.
- conversion from i2c direct calls to regmap and driver split.
- spi support.
* chromeos light and proximity.
- new driver.
* devantech srf04 ultrasonic ranger
- new driver with device tree bindings.
* hid temperature
- new driver for environemntal temperature support from hid devices.
* max30102 oximeter
- new driver with device tree bindings.
* st lsm6dsx
- refactor and addition of device support for lsm6dsl and lsm6ds3h.
Staging graduation
* isl29028 including copyright notice update to reflect Brian's work.
* lpc32xx_adc.
* spear adc. It's not perfect and there are some datasheet disagreements, but
it works and is good enough to graduate.
New features
* documentation
- abi docs for in_proximity_sampling_frequency_available.
- generalise counting direction ABI docs as a second driver is going to
use them.
* hid-sensor-prox
- Add support for HID_USAGE_SENSOR_HUMAN_PRESENCE if used on a particular
device.
* isl29028
- runtime pm.
* meson-saradc
- switch from polling to interrupt mode and improved read_raw_sample function
to avoid unnecessary loop.
* tmp007
- interrupt and threshold event support.
Cleanups and minor fixes
* ad2s1210
- permissions to octal.
* ad7192
- permissions to octal.
- use BIT macro.
* ad9832
- merge header definitions into source file.
* ad9834
- merge header definitions into source file.
* ade7753
- merge header definitions into source file.
- cleanup include ordering.
* ade7854
- simplify return logic.
* adis16201
- merge header definitions into source file.
- rename _core.c to .c as there is nothing else.
* adis16203
- merge header definitions into source file.
- rename _core.c to .c as there is nothing else.
* adis16209
- merge header definitions into source file.
- rename _core.c to .c as there is nothing else.
* adis16240
- permissions to octal.
- merge header definitions into source file.
- rename _core.c to .c as there is nothing else.
* adt7136
- permissions to octal.
* cio-dac
- set missing parent device.
* documentation
- update version numbers on sysfs ABI for counter bits that didn't quite.
make 4.9.
* isl29028
- mdelay to msleep.
- incorrrect sleep time when taking first proximity reading.
* lmp91000
- set missing parent device.
* lpc32xx
- Consistent prefixes for defines.
- rename local state structure to _state.
* max30100
- set missing parent device.
* max30102
- set missing parent device.
* maxim-thermocouple
- set missing parent device.
* meter driver header
- permissions to octal.
* pulsedlight-lidar-lite-v2
- set missing parent device.
* quad-8
- set missing parent device.
* st104
- set missing parent device.
Other
* Mailmap
- update Matt Ranostay's email address to the Konsolko one.
Alan Cox [Mon, 6 Mar 2017 11:21:04 +0000 (11:21 +0000)]
atomisp2: unify some ifdef cases caused by format changes
The two drivers were originally merged by tools, and the tools didn't always
spot white space only changes. Fix a few of them found by zero-day and clean
up some more by hand.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sat, 4 Mar 2017 17:24:09 +0000 (22:54 +0530)]
staging: media: atomisp: Replace NULL comparison.
Replaced x == NULL with !x, by using the following coccinelle script:
@disable is_null@
expression e;
@@
-e==NULL
+!e
This patch fixes the checkpatch issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sat, 4 Mar 2017 17:22:07 +0000 (22:52 +0530)]
staging: media: atomisp: Fixed typo.
Correct the spelling of initialize. This patch fixes the checkpatch
issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sat, 4 Mar 2017 17:20:07 +0000 (22:50 +0530)]
staging: media: atomisp: Use unsigned int instead of unsigned.
Usage of unsigned int is preferred over unsigned and this patch fixes the
checkpatch issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sat, 4 Mar 2017 17:19:29 +0000 (22:49 +0530)]
staging: media: atomisp: Removes the FSF mailing address.
This patch fixes the checkpatch issue by removing the Free Software
Foundation's mailing address from the sample GPL notice. Because the FSF
has changed address in the past, and may change again. Linux already
includes a copy of the GPL.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sat, 4 Mar 2017 17:15:35 +0000 (22:45 +0530)]
staging: media: atomisp: Fix block comments warning.
Used kernel preferred block commenting style, to fix the following
checkpatch issue:
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sat, 4 Mar 2017 17:12:00 +0000 (22:42 +0530)]
staging: media: atomisp: Replace 'uint32_t' with kernel type u32.
Replaced 'uint32_t' with kernel type u32, to fix the checkpatch issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sat, 4 Mar 2017 17:11:58 +0000 (22:41 +0530)]
staging: media: atomisp: Added spaces around arithmetic and bitwise operators.
Added spaces around arithmetic operators (/, *, +) and bitwise operators
(<<, >>), to fix the checkpatch issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sat, 4 Mar 2017 17:04:13 +0000 (22:34 +0530)]
staging: media: atomisp: Fix line over 80 characters.
Line over 80 characters are split to fix the following checkpatch issue:
WARNING: line over 80 characters
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Sat, 4 Mar 2017 17:04:02 +0000 (22:34 +0530)]
staging: media: atomisp: Removed unnecessary parentheses.
Removed parentheses on the right hand side of assignment, as they are
not required. The following coccinelle script is used to fix this issue:
@@
binary operator op = {<<,>>,+,/};
local idexpression id;
expression e1, e2;
@@
id =
-(
e1 op e2
-)
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:17:49 +0000 (22:17 +0000)]
staging/atomisp: fix semicolon.cocci warnings
drivers/staging/media/atomisp/pci/atomisp2/./atomisp_v4l2.c:465:2-3: Unneeded semicolon
drivers/staging/media/atomisp/pci/atomisp2/./atomisp_v4l2.c:511:2-3: Unneeded semicolon
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:17:36 +0000 (22:17 +0000)]
staging/atomisp: fix returnvar.cocci warnings
drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.c:161:5-8: Unneeded variable: "ret". Return "0" on line 163
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:17:18 +0000 (22:17 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/i2c/imx/../ov8858.c:2199:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:17:06 +0000 (22:17 +0000)]
staging/atomisp: fix returnvar.cocci warnings
drivers/staging/media/atomisp/pci/atomisp2/./atomisp_ioctl.c:560:5-8: Unneeded variable: "ret". Return "0" on line 577
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:16:55 +0000 (22:16 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/platform/clock/vlv2_plat_clock.c:248:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:16:43 +0000 (22:16 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/i2c/ov2722.c:1352:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:16:32 +0000 (22:16 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2066:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:16:18 +0000 (22:16 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/i2c/lm3554.c:986:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:16:07 +0000 (22:16 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/i2c/mt9m114.c:1946:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:15:56 +0000 (22:15 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/i2c/gc0310.c:1470:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:15:46 +0000 (22:15 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/i2c/imx/imx.c:2486:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:15:33 +0000 (22:15 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/i2c/gc2235.c:1208:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Wed, 1 Mar 2017 22:15:19 +0000 (22:15 +0000)]
staging/atomisp: fix platform_no_drv_owner.cocci warnings
drivers/staging/media/atomisp/i2c/ap1302.c:1250:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 6 Mar 2017 10:09:02 +0000 (11:09 +0100)]
staging: media: atomisp: handle sched.h breakup
This fixes a build issue where sched.h changed around a bit in 4.11-rc1.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Fri, 17 Feb 2017 16:55:17 +0000 (16:55 +0000)]
staging/atomisp: Add support for the Intel IPU v2
This patch adds support for the Intel IPU v2 as found on Android and IoT
Baytrail-T and Baytrail-CR platforms (those with the IPU PCI mapped). You
will also need the firmware files from your device (Android usually puts
them into /etc) - or you can find them in the downloadable restore/upgrade
kits if you blew them away for some reason.
It may be possible to extend the driver to handle the BYT/T windows
platforms such as the ASUS T100TA. These platforms don't expose the IPU via
the PCI interface but via ACPI buried in the GPU description and with the
camera information somewhere unknown so would need a platform driver
interface adding to the codebase *IFF* the firmware works on such devices.
To get good results you also need a suitable support library such as
libxcam. The camera is intended to be driven from Android so it has a lot of
features that many desktop apps don't fully spport.
In theory all the pieces are there to build it with -DISP2401 and some
differing files to get CherryTrail/T support, but unifying the drivers
properlly is a work in progress.
The IPU driver represents the work of a lot of people within Intel over many
years. It's historical goal was portability rather than Linux upstream. Any
queries about the upstream aimed driver should be sent to me not to the
original authors.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Narcisa Ana Maria Vasile [Wed, 1 Mar 2017 00:40:59 +0000 (02:40 +0200)]
staging: vc04_services: Removed unnecessary variable
Removed unnecessary variable and used instead the parameter
that was already defined
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Narcisa Ana Maria Vasile [Tue, 28 Feb 2017 23:52:53 +0000 (01:52 +0200)]
staging: bcm2835-camera: Refactored get_format function
Now, when the condition inside the for is fulfilled, I return the result,
instead of checking afterwards whether the counter has reached or not
the end of the list.
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sreya Mittal [Tue, 28 Feb 2017 21:08:13 +0000 (02:38 +0530)]
staging: speakup: Clean up if conditions
Found by checkpatch.pl
Logical conditions are on the next line, useless parentheses present
Clean up the if tests by
* Put logical conditions on the previous line
* Line up the tests
Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sreya Mittal [Tue, 28 Feb 2017 21:08:12 +0000 (02:38 +0530)]
staging: speakup: Align with parentheses
Align next line of print statements
to the right of open parentheses.
Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Mon, 27 Feb 2017 17:01:39 +0000 (22:31 +0530)]
staging: dgnc: replace udelay with usleep_range
Fix checkpatch warning on dgnc_cls.c: CHECK usleep_range is preferred
over udelay. udelay(t) in function cls_uart_init is within non-atomic
context and can be safely replaced by usleep_range(t, t + delta) where
delta is t (as t is between 10 and 20 microseconds).
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Tue, 28 Feb 2017 11:22:50 +0000 (16:52 +0530)]
staging: vc04_services: bcm2835-camera: Simplify NULL comparisons
Remove instances of explicit NULL comparisons in bcm2835-camera driver
for code compaction.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Tue, 28 Feb 2017 07:01:47 +0000 (12:31 +0530)]
staging: lustre: Replace typedef with struct
As per the Linux kernel coding style guidelines, using typedef for a
structure type is not recommended. Hence, occurences of typedefs have
been removed. To find the occurences of the structures grep was used
and no uses were found.
Coccinelle script:
@r1@
type T;
@@
typedef struct { ... } T;
@script:python c1@
T2;
T << r1.T;
@@
coccinelle.T2=T;
@@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manoj Sawai [Tue, 28 Feb 2017 12:14:53 +0000 (17:44 +0530)]
Staging: xgifb: vb_setmode.c: Fix checkpath warnings
Fix the following checkpatch.pl warnings:
1: Avoid multiple line dereference - prefer
'XGI330_RefIndex[RefreshRateTableIndex+i].ModeID'
2: Avoid multiple line dereference - prefer
'XGI330_RefIndex[RefreshRateTableIndex+(*i)].Ext_InfoFlag'
Signed-off-by: Manoj Sawai <mas@iitkgp.ac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Manoj Sawai [Tue, 28 Feb 2017 12:14:52 +0000 (17:44 +0530)]
Staging: xgifb: vb_setmode.c: Fix checkpath warning
Fix the following checkpatch.pl warning:
Avoid multiple line dereference - prefer
'XGI330_RefIndex[RefreshRateTableIndex+(*i)].Ext_InfoFlag'
Signed-off-by: Manoj Sawai <mas@iitkgp.ac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Tue, 28 Feb 2017 11:47:33 +0000 (11:47 +0000)]
staging: wilc1000: add check for kmalloc allocation failure.
Add a sanity check that wid.val has been allocated, fixes a null
pointer deference on stamac when calling ether_add_copy.
Detected by CoverityScan, CID#1369537 ("Dereference null return value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Tue, 28 Feb 2017 12:05:48 +0000 (12:05 +0000)]
staging: wilc1000: remove redundant result < 0 check
The check for result < 0 is redundant because at that point result
is always zero, hence we can remove this check and the netdev_err
message.
Detected by CoverityScan, CID#1357147 ("Logically Dead Code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Heiner Kallweit [Tue, 28 Feb 2017 07:10:38 +0000 (08:10 +0100)]
staging: fbtft: add adriver for SH1106
This patch adds support for the SH1106 OLED controller chip.
It's similar to the SSD1306, however it supports only a subset of
commands and the internal video memory has a different width.
Major differences:
- Internal video memory has a width of 132 pixels
- Only a subset of commands is supported
- Only page addressing mode is supported, no support for vertical and
horizontal addressing
- SPI frequency limited to 2 MHz according to the datasheet
Successfully tested with a 1.3" OLED display with this chip and
SPI interface.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Narcisa Ana Maria Vasile [Tue, 28 Feb 2017 15:50:06 +0000 (17:50 +0200)]
staging: fbtft: Merged two identical conditionals into one.
Merged two if conditionals into a single one, since they had exactly
the same condition.
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cezary Gapinski [Mon, 27 Feb 2017 21:26:40 +0000 (22:26 +0100)]
staging: fbtft: fix unnecessary line continuations
Fix the following formatting issues:
WARNING: Avoid unnecessary line continuations
Signed-off-by: Cezary Gapinski <gapalinux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jitendra Kumar Khasdev [Sat, 25 Feb 2017 20:18:40 +0000 (01:48 +0530)]
Staging: vt6656: Fix spaces and char limit
This is a patch to usbpipe.c to fix space and char limit warning found by
checkpatch tool.
Signed-off-by: Jitendra Khasdev <jkhasdev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sat, 25 Feb 2017 13:25:44 +0000 (13:25 +0000)]
staging: vchiq_arm: Don't define PAGE_SIZE
There is no need to define PAGE_SIZE in the vchiq driver
so remove the define from vchiq_pagelist.h .
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sat, 25 Feb 2017 13:25:43 +0000 (13:25 +0000)]
staging: vchiq_arm: Include linux/mm.h
vchiq_2835_arm.c uses functions and macros like put_page() or
PAGE_ALIGN(). So we better include the necessary header.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Wahren [Sat, 25 Feb 2017 13:25:42 +0000 (13:25 +0000)]
staging: vchiq_arm: Remove unnecessary includes
Including those headers is unnecessary, so we better remove them.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Tue, 28 Feb 2017 11:08:25 +0000 (16:38 +0530)]
staging: ks7010: Unnecessary parentheses removed and improved coding style.
Unnecessary parentheses are removed as reported by checkpatch.pl
to make coder nicer and to improve readability.
Also coding style is improved as it's often nicer to read if
&(foo[0]) is converted to foo like:
memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN);
memcpy(ap->bssid, ap_info->bssid, ETH_ALEN);
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Mon, 27 Feb 2017 05:27:50 +0000 (10:57 +0530)]
staging: rtl8192u: Remove ternary operator
Relational and logical operators evaluate to either true or false.
Lines with ternary operators were found using coccinelle script. In a
few cases using logical && operator would suffice. Hence those were
changed to improve readability.
Coccinelle Script:
@r@
expression A,B;
symbol true,false;
binary operator b = {==,!=,&&,||,>=,<=,>,<};
@@
- (A b B) ? true : false
+ A b B
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chetan Sethi [Tue, 28 Feb 2017 03:01:27 +0000 (12:01 +0900)]
staging: ks7010: fix coding style issue of aligning comments properly
This patch fixes coding style issue of having block comments using a
trailing */ on a separate line, warning as issued by checkpatch
Signed-off-by: Chetan Sethi <cpsethi369@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chetan Sethi [Tue, 28 Feb 2017 03:01:07 +0000 (12:01 +0900)]
staging: ks7010: fix coding style issue of using __func__ instead of __FUNCTION__
This patch fixes coding style issue of using __func__ instead of gcc
specific __FUNCTION__, warning as issued by checkpatch
Signed-off-by: Chetan Sethi <cpsethi369@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chetan Sethi [Tue, 28 Feb 2017 03:00:45 +0000 (12:00 +0900)]
staging: ks7010: fix coding style issue of using pr_notice instead of printk
Signed-off-by: Chetan Sethi <cpsethi369@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chetan Sethi [Tue, 28 Feb 2017 03:00:23 +0000 (12:00 +0900)]
staging: ks7010: fix coding style issue of enclosing complex macro value in parentheses
This patch fixes error of enclosing complex macro value in parentheses,
error as issued by checkpatch
Signed-off-by: Chetan Sethi <cpsethi369@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chetan Sethi [Tue, 28 Feb 2017 02:59:36 +0000 (11:59 +0900)]
staging: ks7010: fixed warning of avoiding line over 80 characters
This patch fixes warning of line over 80 characters, as issued by
checkpatch.pl
Signed-off-by: Chetan Sethi <cpsethi369@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Georgiana Rodica Chelu [Mon, 27 Feb 2017 21:29:48 +0000 (23:29 +0200)]
staging:rtl8188eu Add spaces around binary operator
Add spaces around binary operator '&' in order to
increase the readability of the code.
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>
Narcisa Ana Maria Vasile [Sun, 26 Feb 2017 17:47:51 +0000 (19:47 +0200)]
staging: bcm2835-audio: Fixed spacing around '&'
This was reported by checkpatch.pl
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexandru Jercaianu [Sat, 25 Feb 2017 10:19:41 +0000 (10:19 +0000)]
Staging: bcm2835-audio: Removed redundant check
This was reported by checkpatch.pl
Signed-off-by: Alexandru Jercaianu <alex.jercaianu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Mon, 27 Feb 2017 23:35:15 +0000 (15:35 -0800)]
staging: bcm2835-camera: Update driver name
Update the name of the camera driver as displayed
by the Kconfig to match the audio driver style.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Mon, 27 Feb 2017 23:35:14 +0000 (15:35 -0800)]
staging: bcm2835-audio: Update driver description
The audio driver description contains a reference to a card.
Since this is for built in audio, drop the card reference
from the description.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Mon, 27 Feb 2017 23:35:13 +0000 (15:35 -0800)]
staging: bcm2835-camera: Move driver under vc04_services
The bcm2835-camera driver is part of v04_services, so it makes
sense for it to be located under vc04_services to make
configuration clearer.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Zoran [Mon, 27 Feb 2017 23:35:12 +0000 (15:35 -0800)]
staging: bcm2835-audio: Move driver under vc04_services
The bcm2835-audio driver is part of v04_services, so it makes
sense for it to be located under vc04_services to make
configuration clearer.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Mon, 27 Feb 2017 10:19:31 +0000 (15:49 +0530)]
staging: sm750fb: Remove blank lines after { and before } braces.
Removed unnecessary blank lines after open brace and before closed
braces, to fix the check patch issue. Also removed braces which were not
required.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Mon, 27 Feb 2017 10:12:55 +0000 (15:42 +0530)]
staging: sm750fb: Replace NULL comparison.
Replaced NULL comparison with pCurrentDviCtrl->pfnInit. This patch fixes
the following checkpatch issue:
CHECK: Comparison to NULL could be written "pCurrentDviCtrl->pfnInit"
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Mon, 27 Feb 2017 10:10:52 +0000 (15:40 +0530)]
staging: sm750fb: Added spaces around arithmetic operators.
Added spaces around arithmetic operators (/, *), to fix the checkpatch
issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Mon, 27 Feb 2017 10:09:47 +0000 (15:39 +0530)]
staging: sm750fb: Remove unnecessary blank lines.
Removed multiple blank lines, which are not required. This patch fixes
the following check patch issues:
CHECK: Please don't use multiple blank lines
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Mon, 27 Feb 2017 10:08:07 +0000 (15:38 +0530)]
staging: sm750fb: Add identifier to function definition argument.
Added pinit_param as the identifier to function definition argument
struct initchip_param and this patch fixes the checkpatch issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Mon, 27 Feb 2017 10:05:33 +0000 (15:35 +0530)]
staging: sm750fb: Fix line over 80 characters.
Line over 80 characters are split to fix the following checkpatch issue:
WARNING: line over 80 characters
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Mon, 27 Feb 2017 10:03:45 +0000 (15:33 +0530)]
staging: sm750fb: Add braces around if statement.
Added braces around if statement. This patch fixes the following
checkpatch issue:
CHECK: braces {} should be used on all arms of this statement
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 27 Feb 2017 03:14:48 +0000 (14:14 +1100)]
staging: ks7010: refactor function call parameters
Function call parameters are split over more lines than
necessary. Also assignment statements are split after the '=' sign.
This adds extra lines to the function and may also reduces
readability.
Refactor function call parameters and reduce the number of lines
used. Put assignment statements onto single line.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 27 Feb 2017 03:14:47 +0000 (14:14 +1100)]
staging: ks7010: remove switch statement
Switch statement uses one [trivial] case and a default case holding
bulk of code. We can swap the switch statement with an if/return
statement as replacement for the original switch. This can be done
without changing the program logic.
Remove switch statement. Use original switch parameter as conditional
and return if conditional evaluates to true. Reduce level of
indentation. Do not change the program logic.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 27 Feb 2017 03:14:46 +0000 (14:14 +1100)]
staging: ks7010: move logic operator to end of line
Logic operator (&&) is place at the start of the line. Kernel
standards suggest that logical operators should be placed at the end
of the line.
Move logical operator to the end of the previous line.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 27 Feb 2017 03:14:45 +0000 (14:14 +1100)]
staging: ks7010: fix checkpatch MULTILINE_DEREFERENCE
Checkpatch emits WARNING: Avoid multiple line dereference.
Move dereference onto single line.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Mon, 27 Feb 2017 03:14:44 +0000 (14:14 +1100)]
staging: ks7010: invert conditional, reduce indent
Function _ks_wlan_hw_power_save has 5 levels of indentation. Reducing
the amount of indentation may make code clearer to read. Also a number
of other checkpatch warnings may be removed if we first reduce the
level of indentation in this function.
Invert conditional and return from function if new conditional
evaluates to true. Repeat on subsequent conditional. Reduce
indentation without changing the program logic.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Fri, 24 Feb 2017 22:05:10 +0000 (17:05 -0500)]
staging: wilc1000: Rename network_info member str_rssi to rssi_history
Change name of str_rssi to rssi_history within the network_info
struct for clarity.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Fri, 24 Feb 2017 22:05:07 +0000 (17:05 -0500)]
staging: wilc1000: Rename tstrRSSI members and change type of u8Full to bool
Remove Hungarian notation and camel casing from all tstrRSSI members'
names. Additionally, change type of u8Full to bool since it only takes
values 1 or 0.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Fri, 24 Feb 2017 22:05:04 +0000 (17:05 -0500)]
staging: wilc1000: Rename struct tstrRSSI to rssi_history_buffer
Rename struct tstrRSSI to rssi_history_buffer for clarity
and to remove camel casing.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>