]>
git.karo-electronics.de Git - linux-beck.git/log
Shraddha Barke [Wed, 14 Oct 2015 19:28:28 +0000 (00:58 +0530)]
Staging: lustre: ptlrpc: Remove unnecessary cast on void pointer
void pointers do not need to be cast to other pointer types.
The semantic patch used to find this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:50:03 +0000 (00:20 +0530)]
staging: lustre: osc: Remove useless cast on void pointer
The semantic patch used to find this is:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:48:33 +0000 (00:18 +0530)]
staging: lustre: mgc: Remove useless cast on void pointer
The semantic patch used to find this is:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:47:08 +0000 (00:17 +0530)]
staging: lustre: ptlrpc: sec_gc: Remove useless cast on void pointer
The semantic patch used to find this is:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:45:23 +0000 (00:15 +0530)]
staging: lustre: ptlrpc: pinger: Remove useless cast on void pointer
The semantic patch used to find this is:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:43:30 +0000 (00:13 +0530)]
staging: lustre: ptlrpc: service: Remove useless cast on void pointer
The semantic patch used to find this is:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 14 Oct 2015 18:41:37 +0000 (00:11 +0530)]
staging: lustre: ptlrpc: sec_bulk: Remove useless cast on void pointer
The semantic patch used to find this is:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Wed, 14 Oct 2015 17:18:50 +0000 (22:48 +0530)]
Staging: rtl8192u: ieee80211_rx: Remove unnecessary code
The variable frame_authorized is declared and mentioned in the code but
is not used anywhere so, it should be removed. Also, two case statements
are merged by removing an extra break.
Semantic patch used:
@@
type T;
identifier i;
constant C;
position p != e.p;
@@
- T i@p;
<+... when != i
- i = C;
...+>
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Wed, 14 Oct 2015 17:33:50 +0000 (23:03 +0530)]
Staging: rtl8192u: ieee80211_softmac: Remove extra NULL check
Remove NULL check on a variable as it is already preceded by one.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Punit Vara [Wed, 14 Oct 2015 18:25:54 +0000 (23:55 +0530)]
Staging: rtl8712: Coding style warnings fix for block comments
This patch is to the rtl871x_ioctl_linux.c file that fixes up following
warnings reported by checkpatch.pl :
-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line
Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Punit Vara [Wed, 14 Oct 2015 18:25:53 +0000 (23:55 +0530)]
Staging: rtl8712: Use ether_addr_equal() over memcmp()
This patch is to the rtl871x_ioctl_linux.c file that fixes up following
warning reported by checkpatch.pl :
-Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
bssid and pnetwork->network.MacAddress both are 6 byte
array which aligned with u16
Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Punit Vara [Wed, 14 Oct 2015 18:25:52 +0000 (23:55 +0530)]
Staging: rtl8712: Fix warning prefer eth_broadcast_addr() over memset()
This patch is to the rtl871x_ioctl_linux.c that fixes up following
warning by checkpatch.pl:
-Prefer eth_broadcast_addr() over memset()
Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 14 Oct 2015 20:59:55 +0000 (02:29 +0530)]
staging: rtl8712: rtl8712_recv: Remove useless intialisation
Remove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Wed, 14 Oct 2015 13:54:10 +0000 (19:24 +0530)]
Staging: rtl8712: usb_ops_linux: Remove useless cast
Explicit type conversion is not required and should be removed.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@
* T x = (T)e;
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Wed, 14 Oct 2015 13:44:59 +0000 (19:14 +0530)]
Staging: rtl8712: rtl871x_io: Remove explicit cast
Explicit typecasting is not required and should be removed.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@
* T x = (T)e;
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Wed, 14 Oct 2015 13:40:21 +0000 (19:10 +0530)]
Staging: rtl8712: rtl8712_xmit: Remove useless cast
Explicit typecasting of variables is not required and should be removed.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@
* T x = (T)e;
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Wed, 14 Oct 2015 12:18:58 +0000 (17:48 +0530)]
Staging: rtl8712: rtl8712_io: Remove unnecessary cast
Typecasting should be removed from variables as it is not required.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@
* T x = (T)e;
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Wed, 14 Oct 2015 12:08:23 +0000 (17:38 +0530)]
Staging: rtl8712: rtl8712_cmd: Remove useless cast
Explicit type conversions are not required so, remove them.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@
* T x = (T)e;
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Wed, 14 Oct 2015 12:02:58 +0000 (17:32 +0530)]
Staging: rtl8712: os_intfs: Remove unnecessary cast
Explicit type conversions are not required and so, they should be
removed.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@
* T x = (T)e;
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:08:21 +0000 (13:38 +0530)]
staging: rtl8723au: core: rtw_ap: Remove useless intialisation
Remove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:07:09 +0000 (13:37 +0530)]
staging: rtl8723au: core: rtw_recv: Remove useless initialisation
Remove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:05:58 +0000 (13:35 +0530)]
staging: rtl8723au: core: rtw_wlan_util: Remove useless intialisation
Remove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:04:41 +0000 (13:34 +0530)]
staging: rtl8723au: hal: Remove useless intialisation
Remove intialisation of a variable that is immediately reassigned. The
problem was found using coccinelle semantic patch and further
opportunities were identified by hand.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Wed, 14 Oct 2015 10:19:06 +0000 (15:49 +0530)]
Staging: rtl8723au: rtw_mlme_ext: Remove unnecessary test expression
Logical and-ing of a struct and its member should be replaced by the
member only as the struct has already been NULL tested before.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Tue, 13 Oct 2015 23:34:00 +0000 (05:04 +0530)]
Staging: rtl8723au: rtl8723a_bt-coexist: Remove unused variable
A variable is initialized and then assigned values in the code but is
never used and therefore, should be removed.
Semantic patch used:
@@
type T;
identifier i;
constant C;
position p != e.p;
@@
- T i@p;
<+... when != i
- i = C;
...+>
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Tue, 13 Oct 2015 21:36:20 +0000 (03:06 +0530)]
Staging: sm750fb: sm750: Remove irrelevant code
The variable ret is only declared and initialized to 0, but never
referenced, so remove it.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Tue, 13 Oct 2015 06:26:46 +0000 (09:26 +0300)]
staging: sm750fb: remove some unnecessary castings
The clock divisor calculations in setMasterClock and setMemoryClock
unnecessaryly cast unsigned int to unsigned int. Removing the casting.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Tue, 13 Oct 2015 06:26:45 +0000 (09:26 +0300)]
staging: sm750fb: rename getChipClock to get_mxclk_freq
The getChipClock is used to detect MXCLK frequency. Make it's name
reflect what the function is actually doing.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Tue, 13 Oct 2015 06:26:44 +0000 (09:26 +0300)]
staging: sm750fb: merge calcPLL and getPllValue into getChipClock
The getChipClock function is used only to get MXCLK frequency, which
makes most of getPllValue function unused and thus. The detection of
MXCLK frequency may be implemented directly in getChipClock rendering
getPllValue and calcPLL unused.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Fri, 16 Oct 2015 20:45:39 +0000 (22:45 +0200)]
staging/wilc: fix Kconfig dependencies, second try
My first attempt to fix the Kconfig logic for wilc1000 was incomplete,
as it missed the case where SPI is built-in while SDIO is modular
and wilc1000 is configured as built-in in SPI mode (or vice versa),
which would still lead to a link failure.
This works around the problem by adding an intermediate Kconfig
symbol "WILC1000_DRIVER" that controls visibility of the SDIO and
SPI sub-drivers, so we can control the dependencies better.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 9535ebc5e9cc ("staging/wilc1000: fix Kconfig dependencies")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Fri, 16 Oct 2015 20:05:34 +0000 (22:05 +0200)]
staging: wilc1000: restore wilc_spi_dev variable
A recent change to wilc1000 accidentally deleted an important
variable, so we now get a build error when the SPI mode is
selected:
ERROR: "wilc_spi_dev" [drivers/staging/wilc1000/wilc1000.ko] undefined!
This partially reverts the broken commit to put the variable back.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 56293ff232b9 ("staging: wilc1000: linux_wlan_spi: include header")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luis de Bethencourt [Fri, 16 Oct 2015 15:32:26 +0000 (16:32 +0100)]
staging: wilc1000: Remove boolean comparisons
Boolean tests do not need explicit comparison to true or false.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Fri, 16 Oct 2015 05:17:11 +0000 (10:47 +0530)]
Staging: wilc1000: Use kmemdup instead of kmalloc and memcpy
Replace kmalloc followed by memcpy with kmemdup
Problem found using coccicheck
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:19:47 +0000 (13:49 +0530)]
staging: wilc1000: coreconfigurator: Remove useless initialisation
Remove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Thu, 15 Oct 2015 08:18:29 +0000 (13:48 +0530)]
staging: wilc1000: wilc_wfi_cfgoperations: Remove useless initialisation
Remove intialisation of a variable that is immediately reassigned.
The semantic patch used to find this is:
// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@
T x
- = C
;
x = e;
// </smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Thu, 15 Oct 2015 07:59:53 +0000 (15:59 +0800)]
staging: wilc1000: join_req_drv can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:15 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu8FlushedJoinReqDrvHandler
This patch renames variable gu8FlushedJoinReqDrvHandler to join_req_drv
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Thu, 15 Oct 2015 07:47:44 +0000 (15:47 +0800)]
staging: wilc1000: info_element_size can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:14 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu32FlushedInfoElemAsocSize
This patch renames variable gu32FlushedInfoElemAsocSize to info_element_size
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:13 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu32FlushedJoinReqSize
This patch renames variable gu32FlushedJoinReqSize to join_req_size
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:12 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu8FlushedAuthType
This patch renames variable gu8FlushedAuthType to auth_type
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Thu, 15 Oct 2015 07:18:34 +0000 (15:18 +0800)]
staging: wilc1000: mode_11i can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:11 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu8Flushed11iMode
This patch renames variable gu8Flushed11iMode to mode_11i
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:10 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu8FlushedInfoElemAsoc
This patch renames variable gu8FlushedInfoElemAsoc to info_element
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Thu, 15 Oct 2015 07:04:15 +0000 (15:04 +0800)]
staging: wilc1000: join_req can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:09 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu8FlushedJoinReq
This patch renames variable gu8FlushedJoinReq to join_req
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:08 +0000 (13:25 +0900)]
staging: wilc1000: remove unused variable gu32WidConnRstHack
This patch removes unused the variable gu32WidConnRstHack.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:07 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu8DelBcn
This patch renames variable gu8DelBcn to del_beacon
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:06 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu32InactiveTime
This patch renames variable gu32InactiveTime to inactive_time
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:05 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gs8GetIP
This patch renames variable gs8GetIP to get_ip
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:04 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gs8SetIP
This patch renames variable gs8SetIP to set_ip
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:03 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gu8Chnl
This patch renames variable gu8Chnl to ch_no
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:02 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gs8lnkspd
This patch renames variable gs8lnkspd to link_speed.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:01 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gs8Rssi
This patch renames variable gs8Rssi to rssi
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Thu, 15 Oct 2015 06:46:26 +0000 (14:46 +0800)]
staging: wilc1000: scan_while_connected can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:25:00 +0000 (13:25 +0900)]
staging: wilc1000: rename variable gbScanWhileConnected
This patch renames variable gbScanWhileConnected to scan_while_connected
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:59 +0000 (13:24 +0900)]
staging: wilc1000: rename variable gapu8RcvdAssocResp
This patch renames variable gapu8RcvdAssocResp to rcv_assoc_resp
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Thu, 15 Oct 2015 06:32:40 +0000 (14:32 +0800)]
staging: wilc1000: periodic_rssi can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:58 +0000 (13:24 +0900)]
staging: wilc1000: rename variable g_hPeriodicRSSI
This patch renames variable g_hPeriodicRSSI to periodic_rssi
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Thu, 15 Oct 2015 06:21:32 +0000 (14:21 +0800)]
staging: wilc1000: hif_sema_deinit can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:57 +0000 (13:24 +0900)]
staging: wilc1000: rename variable hSemHostIntDeinit
This patch renames variable hSemHostIntDeinit to hif_sema_deinit
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:56 +0000 (13:24 +0900)]
staging: wilc1000: rename variable hWaitResponse
This patch renames variable hWaitResponse to hif_sema_wait_response
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kbuild test robot [Thu, 15 Oct 2015 06:07:41 +0000 (14:07 +0800)]
staging: wilc1000: hif_sema_driver can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:55 +0000 (13:24 +0900)]
staging: wilc1000: rename variable hSemDeinitDrvHandle
This patch renames variable hSemDeinitDrvHandle to hif_sema_driver
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:54 +0000 (13:24 +0900)]
staging: wilc1000: rename variable hSemHostIFthrdEnd
This patch renames variable hSemHostIFthrdEnd to hif_sema_thread
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:53 +0000 (13:24 +0900)]
staging: wilc1000: rename variable gMsgQHostIF
This patch renames variable gMsgQHostIF to hif_msg_q
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:52 +0000 (13:24 +0900)]
staging: wilc1000: rename variable HostIFthreadHandler
This patch renames variable HostIFthreadHandler to hif_thread_handler
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:51 +0000 (13:24 +0900)]
staging: wilc1000: remove unused variable gWFiDrvHandle
This patch removes unused the variable gWFiDrvHandle.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:49 +0000 (13:24 +0900)]
staging: wilc1000: rename au8Interval of struct join_bss_param
This patch renames au8Interval of struct join_bss_param to interval
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:48 +0000 (13:24 +0900)]
staging: wilc1000: rename au8Duration of struct join_bss_param
This patch renames au8Duration of struct join_bss_param to duration
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:47 +0000 (13:24 +0900)]
staging: wilc1000: rename u8Index of struct join_bss_param
This patch renames u8Index of struct join_bss_param to idx
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:46 +0000 (13:24 +0900)]
staging: wilc1000: rename u8Count of struct join_bss_param
This patch renames u8Count of struct join_bss_param to cnt
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:45 +0000 (13:24 +0900)]
staging: wilc1000: rename u8CtWindow of struct join_bss_param
This patch renames u8CtWindow of struct join_bss_param to ct_window
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:44 +0000 (13:24 +0900)]
staging: wilc1000: rename u8OppEnable of struct join_bss_param
This patch renames u8OppEnable of struct join_bss_param to opp_enabled
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:43 +0000 (13:24 +0900)]
staging: wilc1000: rename u8NoaEnbaled of struct join_bss_param
This patch renames u8NoaEnbaled of struct join_bss_param to noa_enabled
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 15 Oct 2015 04:24:42 +0000 (13:24 +0900)]
staging: wilc1000: rename ssidLen of struct join_bss_param
This patch renames ssidLen of struct join_bss_param to ssid_len
to avoid CamelCase naming convention.
Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tony Cho [Wed, 14 Oct 2015 11:46:32 +0000 (20:46 +0900)]
staging: wilc1000: remove typedef from the tstrInterfaceInfo
This patch removes typedef from the tstrInterfaceInfo and renames it to
the wilc_vif.
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tony Cho [Wed, 14 Oct 2015 11:46:30 +0000 (20:46 +0900)]
staging: wilc1000: remove typedef from the linux_wlan_t
This patch removes typedef from the struct linux_wlan_t and renames it
to the wilc. In addition, all of linux_wlan_t is replaced with struct wilc
and memory allocation style is changed with preferred form as well like the
following:
p = kmalloc(sizeof(*p), ...) where "struct wilc" is used
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tony Cho [Wed, 14 Oct 2015 11:46:29 +0000 (20:46 +0900)]
staging: wilc1000: remove extern declarations of g_linux_wlan
This patch removes extern declaration of g_linux_wlan from the
followings because it is declared as extern in the wilc_wfi_netdevice.h
file.
- linux_mon.c
- linux_wlan_sdio.c
- wilc_wfi_cfgoperations.c
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Wed, 14 Oct 2015 01:59:19 +0000 (07:29 +0530)]
Staging: wilc1000: Remove null check before kfree
kfree on NULL pointer is a no-op.
The semantic patch used to find such an instance where NULL check is
present before kfree-
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Tue, 13 Oct 2015 21:59:58 +0000 (03:29 +0530)]
Staging: wilc1000: host_interface: Remove unnecessary enum
enum scan_conn_timer and its instances are never used anywhere
in the code so, remove it.
Semantic patch used:
@@
type T;
identifier i;
constant C;
position p != e.p;
@@
- T i@p;
<+... when != i
- i = C;
...+>
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Sat, 17 Oct 2015 04:28:55 +0000 (21:28 -0700)]
Merge tag 'iio-for-4.4b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second set of new drivers, functionality and cleanups for IIO in the 4.4 cycle.
Core stuff
* adjust resistance documentation to allow for output devices.
New device support:
* bmc150
- split the i2c driver up into a core and i2c_regmap part including regmap
conversion.
- add spi support.
* mcp4531 digitial potentiometer driver.
* Measurement Specialties set of drivers with a core library module providing
common functionality. Note that the htu21 has a driver in hwmon, but the
view from that side was that, given the range of devices the same silicon
turns up in are not all typical hwmon material, that driver would be
deprecated in favour of this new support.
- ms8607 temperature, pressure and humidty sensor
- ms5637 temperature and pressure sensor
- htu21 temperature and humidity sensor
- tsys02d temperature sensor
- tsys01 temperature sensor
Cleanups
* tree wide.
- squish cases where irq 0 is still considered valid.
* apds9960
- sparse endian warning cleanups by making endianness explicit.
* ad5504
- leave group naming to the core.
* ad7746
- cleanup comment style.
- drop an unnecessary bit of dev_info
- add some appropriate uses of the BIT macro.
* ad799x
- leave group naming to the core.
* hdc100x - introduced this cycle,.
- fix a wrong offset value.
* lidar
- add missing MODULE_DEVICE_TABLE for dt.
* max1363
- leave sysfs group naming to the core.
* m62332 got the Harmut treatment and as ever he found a 'few' bits the
rest of us had missed!
- Share scale and offset attributes across channels.
- Shutdown the device on driver remove
- Use ARRAY_SIZE rather than a hard coded count for channels.
- Return more directly in the write_raw callback dropping a local variable
along the way.
- a few style issues
- move to reading the regulator voltage for each use allowing for dynamic
regulators. This is a common feature across drivers so we might end
up with more fixes throughout the tree for this.
* mlx96014 - introduced this cycle.
- fixed up a spot of error handling.
* vz89x - introduced this cycle.
- work around a hardware quirk.
Aybuke Ozdemir [Tue, 13 Oct 2015 20:55:07 +0000 (23:55 +0300)]
Staging: skein: Remove NULL comparison
Problem found using checkpatch.pl
CHECK: Comparison to NULL could be written "key"
Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Tue, 13 Oct 2015 20:53:40 +0000 (02:23 +0530)]
Staging: wilc1000: wilc_wlan_cfg: Remove unnecessary cast
Remove a cast which is not required.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Tue, 13 Oct 2015 20:32:11 +0000 (02:02 +0530)]
Staging: wilc1000: host_interface: Remove extra NULL test
Remove a NULL test on variable hif_drv as it is already preceded by one.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Tue, 13 Oct 2015 17:37:00 +0000 (23:07 +0530)]
Staging: wilc1000: Use kzalloc instead of kmalloc and memset
Replace kmalloc and memset with a single call to kzalloc.
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Tue, 13 Oct 2015 20:46:53 +0000 (16:46 -0400)]
"drivers/staging: mark android/ion fcns with EXPORT_SYMBOL for tristate
In a recent change, we made a bool into a tristate in:
"drivers/staging: make android tegra_ion.c properly tristate", since it
was self evident that was the original intention. However on the final
link phase we'll see an allmodconfig fail with:
ERROR: "ion_device_add_heap" [drivers/staging/android/ion/tegra/tegra_ion.ko] undefined!
ERROR: "ion_heap_create" [drivers/staging/android/ion/tegra/tegra_ion.ko] undefined!
ERROR: "ion_device_create" [drivers/staging/android/ion/tegra/tegra_ion.ko] undefined!
ERROR: "ion_heap_destroy" [drivers/staging/android/ion/tegra/tegra_ion.ko] undefined!
ERROR: "ion_device_destroy" [drivers/staging/android/ion/tegra/tegra_ion.ko] undefined!
Export the above using the non GPL specific export, since that is what
the rest of the ion code base does.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Arve Hjønnevåg" <arve@android.com>
Cc: Riley Andrews <riandrews@android.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Markus Elfring <elfring@users.sourceforge.net>
Cc: devel@driverdev.osuosl.org
Cc: linux-tegra@vger.kernel.org
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lars Svensson [Wed, 7 Oct 2015 07:20:14 +0000 (09:20 +0200)]
staging: fbtft: access screen buffer directly
In fbtft-bus.c:fbtft_write_vmem16_bus9(), ioread8() is used for
accessing the provided screen array. Since screen_buffer actually
points to an ordinary buffer, instead access it directly.
Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lars Svensson [Wed, 7 Oct 2015 07:20:13 +0000 (09:20 +0200)]
staging: fbtft: use alternate screen pointer
Member screen_base in struct fb_info is declared with __iomem
qualifier causing sparse warnings when used as a regular ponter.
To avoid the warnings, instead use alternate non-__iomem pointer,
screen_buffer, troughout the driver.
Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lars Svensson [Wed, 7 Oct 2015 07:20:12 +0000 (09:20 +0200)]
fb.h: Provide alternate screen_base pointer
Some drivers use member screen_base of struct fb_info to store non-
__iomem pointers, creating the need for ugly __force typecasts to
avoid sparse warnings. This adds an alternate pointer without the
__iomem qualifyer for this use.
Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dennis Menschel [Wed, 7 Oct 2015 20:15:46 +0000 (22:15 +0200)]
staging: fbtft: add support for C-Berry28 display
This patch adds support for the C-Berry28, a small 2.8" color display
with a resolution of 320x240 pixels from admatec for the Raspberry Pi.
It uses the Sitronix ST7789V display controller along with a custom
init sequence and custom gamma curves.
Signed-off-by: Dennis Menschel <menschel-d@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dennis Menschel [Wed, 7 Oct 2015 20:15:45 +0000 (22:15 +0200)]
staging: fbtft: add support for ST7789V display controller
This patch adds support for the Sitronix ST7789V display controller.
The controller is intended for small color displays with a resolution
of up to 320x240 pixels.
Signed-off-by: Dennis Menschel <menschel-d@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anish Bhatt [Tue, 13 Oct 2015 04:02:36 +0000 (21:02 -0700)]
rtl8192u: BIT() macro cleanup
Use the BIT(x) macro directly instead using multiple
BITX defines.
Signed-off-by: Anish Bhatt <anish@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 12 Oct 2015 17:03:25 +0000 (18:03 +0100)]
staging: comedi: comedidev.h: spaces preferred around that '*'
Fix the checkpatch.pl issues:
CHECK: spaces preferred around that '*' (ctx:VxV)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 12 Oct 2015 17:03:24 +0000 (18:03 +0100)]
staging: comedi: comedidev.h: add comments to spin-lock and mutex
Fix the checkpatch.pl issues:
CHECK: spinlock_t definition without comment
CHECK: struct mutes definition withoug comment
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 12 Oct 2015 16:21:29 +0000 (17:21 +0100)]
staging: comedi: check for more errors for zero-length read
If the "read" file operation handler, `comedi_read()` is passed 0 for
the amount to read, some error conditions are currently skipped and the
function just returns 0. Change it to check those error conditions and
return an error value if appropriate. The trickiest case is the check
for when the previously set up asynchronous command has terminated with
an error. In that case, `-EPIPE` is returned (as it is for a read of
non-zero length) and the subdevice gets marked as non-busy.
A zero-length read that returns 0 has no other effects, in particular,
it does not cause the subdevice to be marked as non-busy, and the return
value does not indicate an "end-of-file" condition.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 12 Oct 2015 16:21:28 +0000 (17:21 +0100)]
staging: comedi: simplify returned errors for comedi_read()
In order to perform a "read" file operation, an asynchronous COMEDI
command in the "read" direction needs to have been set up by the current
file object on the COMEDI "read" subdevice associated with the file
object. If there is a "read" subdevice, but a command has not been set
up by the file object (or is has been set-up in the wrong direction),
`comedi_read()` currently returns one of two error values `-EINVAL` or
`-EACCES`. `-EACCES` is returned if the command was set up by a
different subdevice, or somewhat randomly, if a COMEDI "instruction" is
currently being processed. `-EINVAL` is returned in other cases.
Simplify it by returning `-EINVAL` for all these cases.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 12 Oct 2015 16:21:27 +0000 (17:21 +0100)]
staging: comedi: return error on "read" if no command set up
The "read" file operation handler, `comedi_read()` returns an error for
pretty much any condition that prevents a "read" going ahead. One of
the conditions that prevents a "read" going ahead is that no
asynchronous command has been set up, but that currently results in a
return value of 0 (unless COMEDI instructions are being processed or an
asynchronous command has been set up by a different file object).
Change it to return `-EINVAL` in this case.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 12 Oct 2015 16:21:26 +0000 (17:21 +0100)]
staging: comedi: remove superfluous retval = 0 in comedi_read()
`comedi_read()` initializes `retval` to 0. The other `retval = 0`
assignments are superfluous, so remove them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 12 Oct 2015 16:21:25 +0000 (17:21 +0100)]
staging: comedi: allow buffer wraparound in comedi_read()
`comedi_read()` copies data from the acquisition data buffer, which is
cyclic, to the user buffer using a single call to `copy_to_user()`. It
currently avoids having to deal with wraparound of the cyclic buffer by
limiting the amount it copies (and the amount returned to the user).
Change it to deal with the wraparound using two calls to
`copy_to_user()` if necessary.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>