Stuart Yoder [Tue, 23 Aug 2016 22:14:08 +0000 (17:14 -0500)]
staging: fsl-mc: remove unneeded includes
Over time we've accumulated some includes that are no longer
needed. Remove them.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:59 +0000 (17:13 -0500)]
staging: fsl-mc: move bus definitions from mc.h to mc-bus.h
move public bus-related definitions to the proper mc-bus.h header.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:51 +0000 (17:13 -0500)]
staging: fsl-mc: remove unneeded forward declarations
Remove unneeded and duplicated forward declarations.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:46 +0000 (17:13 -0500)]
staging: fsl-mc: make fsl_mc_get_root_dprc public
fsl_mc_get_root_dprc is needed by other components (e.g. vfio) to find
the root dprc
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:40 +0000 (17:13 -0500)]
staging: fsl-mc: move bus private definitions into fsl-mc-bus.c
Move definitions that are private to fsl-mc-bus.c out of the
public mc-bus.h and mc.h headers.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:35 +0000 (17:13 -0500)]
staging: fsl-mc: move dprc-driver private definitions out of mc-bus.h
Move definitions that are private to dprc-driver.c out of the
public mc-bus.h header.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:30 +0000 (17:13 -0500)]
staging: fsl-mc: create private include for fsl-mc bus components
The mc-bus.h header file is intended to be public for system related
drivers that may need to make fsl-mc bus specific calls-- gic its,
smmu, vfio. But, currently it contains definitions private/internal
to the fsl-mc bus itself. Split those definitions out into a new
fsl-mc bus private header.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:24 +0000 (17:13 -0500)]
staging: fsl-mc: move resource pool init/cleanup into allocator
The resource pool init/cleanup functions logically belong in the
allocator. Move them to the allocator and rename to reflect the
move out of the dprc-driver.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:17 +0000 (17:13 -0500)]
staging: fsl-mc: move allocator private definitions out of mc-bus.h
move definitions private to the allocator out of mc-bus.h and into
allocator.c
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:12 +0000 (17:13 -0500)]
staging: fsl-mc: improve naming of source files
The mc- prefix on the source files names of some internal components
of the fsl-mc bus driver makes things less clear that they could be.
The string "mc" generally refers to hardware-- the physical DPAA
'management complex'. Names like "mc-allocator.c" have nothing to
with the "MC" hardware per se. Improve clarity by using the prefix
string "fsl-mc" instead which is what we are calling this bus.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stuart Yoder [Tue, 23 Aug 2016 22:13:04 +0000 (17:13 -0500)]
staging: fsl-mc: rename mc-private.h to mc-bus.h
The definitions in mc-private.h are not strictly speaking
'private', they are bus-related definitions expected to be
referenced by bus driver components as well as system components
(gic, smmu, vfio). Rename mc-private.h to mc-bus.h to more
accurately reflect expected use.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Fri, 26 Aug 2016 14:45:05 +0000 (14:45 +0000)]
staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()
Add the missing unlock before return from function
rtw_resume_process() in the error handling case.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Thu, 25 Aug 2016 15:18:42 +0000 (11:18 -0400)]
staging: emxx_udc: Fix checkpatch warning
Fix checkpatch.pl warning
Block comments use * on subsequent lines
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Wed, 31 Aug 2016 07:30:43 +0000 (09:30 +0200)]
staging: slicoss: constify ethtool_ops structures
Check for ethtool_ops structures that are only stored in the ethtool_ops
field of a net_device structure or passed as the second argument to
netdev_set_default_ethtool_ops. These contexts are declared const, so
ethtool_ops structures that have these properties can be declared as const
also.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };
@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;
@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)
@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Claudiu Beznea [Fri, 26 Aug 2016 17:58:17 +0000 (20:58 +0300)]
Staging: wlan-ng: replace switch-case statements with macro
This patch removes multiple switch-case statements
with a new macro. The macro will generate the
corresponding bit mask based on the key index
received as input.
Chances since v1:
Corrected patch title
Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Claudiu Beznea [Thu, 25 Aug 2016 17:03:25 +0000 (20:03 +0300)]
Staging: wlan-ng: removed duplicate code in p80211req.c
This patch removes duplicate code in p80211req_mibset_mibget()
by adding p80211req_handle_action() function.
Changes since v1:
Removed prototype of p80211req_handle_action() from the prototype
list and add directly the function definition.
Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Claudiu Beznea [Tue, 23 Aug 2016 18:26:42 +0000 (21:26 +0300)]
Staging: wlan-ng: Improved case statements in p80211req_mibset_mibget()
This patch improves code from p80211req_mibset_mibget() function by
taking into account that every
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKeyX with
X in {0, 1, 2, 3} is a bit mask where the (P80211DID_MASK_ITEM <<
P80211DID_LSB_ITEM) mask aka 0x0x0003f000 mask keeps bits representing
the DID item number. To get this item number use P80211DID_ITEM().
Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Mon, 22 Aug 2016 18:40:05 +0000 (19:40 +0100)]
Staging: comedi: fix spelling mistake "Firmare" -> "Firmware"
Trivial fix to spelling mistake in dev_dbg message.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Mon, 22 Aug 2016 21:12:35 +0000 (17:12 -0400)]
staging: vt6655: rxtx.c: Fix checkpatch warning
Fix checkpatch.pl warning for trailing */ on a separate line
Remove '+' postfix and '-' prefix from the start and end of block comments
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Mon, 22 Aug 2016 21:12:15 +0000 (17:12 -0400)]
staging: vt6655: rf.c: Fix checkpatch warning
Fix checkpatch.pl warning for trailing */ on a separate line
Remove '+' postfix and '-' prefix from the start and end of block comments
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
MingChia Chung [Sun, 28 Aug 2016 01:04:36 +0000 (09:04 +0800)]
staging: rts5208: Add two blank lines in comments.
This patch fixes a minor checkpatch warnings:
"WARNING: Block comments use a trailing */ on a separate line"
Signed-off-by: Ming-Chia Chung <Quexint@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matthias Beyer [Tue, 23 Aug 2016 19:44:17 +0000 (21:44 +0200)]
drivers: staging: rtl8723au: hal: Remove pointless test
This patch removes the pointless `else if` test.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reported-by: David Binderman <linuxdev.baldrick@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Mon, 22 Aug 2016 04:39:42 +0000 (10:09 +0530)]
rtl8712: pwrctrl_priv: Replace semaphore lock with mutex
The semaphore 'lock' in 'pwrctrl_priv' is used as a simple mutex, so it
should be written as one. Semaphores are going away in the future.
_enter_pwrlock was using down_interruptible(), so the lock could be broken
by sending a signal. This could be a bug, because nothing checks the return
code here. Hence, using mutex_lock instead of the interruptible version.
Removing the now unused _enter_pwrlock and _down_sema.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Didik Setiawan [Wed, 24 Aug 2016 09:08:01 +0000 (16:08 +0700)]
staging: android: ion: ion.c fix parenthesis alignment
Fix checkpatch.pl warning about "Alignment should match open parenthesis".
Signed-off-by: Didik Setiawan <ds@didiksetiawan.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Thu, 25 Aug 2016 15:10:25 +0000 (11:10 -0400)]
staging: android: lowmemorykiller.c: Fix checkpatch warning
Fix checkpatch.pl 'line over 80 characters' warning
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johanna Abrahamsson [Tue, 23 Aug 2016 22:42:39 +0000 (00:42 +0200)]
staging: android: ion: Remove unnused function ion_handle_buffer
Remove the function ion_handle_buffer since it is not used anywhere.
Signed-off-by: Johanna Abrahamsson <johanna@mjao.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johanna Abrahamsson [Tue, 23 Aug 2016 22:41:54 +0000 (00:41 +0200)]
staging: android: ion: Remove ret variable in ion_handle_put_nolock
It is not necessary to save the return value of kref_put since it is directly
returned.
Signed-off-by: Johanna Abrahamsson <johanna@mjao.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben LeMasurier [Mon, 22 Aug 2016 13:45:53 +0000 (07:45 -0600)]
Staging: android: ion: fix parenthesis alignment
This fixes remaining checkpatch.pl "Alignment should match open
parenthesis" issues.
Signed-off-by: Ben LeMasurier <ben@crypt.ly>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johanna Abrahamsson [Mon, 22 Aug 2016 10:16:58 +0000 (12:16 +0200)]
staging: android: ion: Fix alignment
Alignment should match open parenthesis as per checkpatch.pl.
Signed-off-by: Johanna Abrahamsson <johanna@mjao.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Tue, 30 Aug 2016 18:28:11 +0000 (21:28 +0300)]
staging: octeon: configure rx-delay/tx-delay
Configure rx-delay/tx-delay when available.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johanna Abrahamsson [Tue, 23 Aug 2016 22:02:45 +0000 (00:02 +0200)]
staging: android: ion: Remove valid_handle variable in ion_free_nolock
It is not neccessary to save the value of ion_handle_validate since it
is only used once.
Signed-off-by: Johanna Abrahamsson <johanna@mjao.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johanna Abrahamsson [Tue, 23 Aug 2016 22:02:27 +0000 (00:02 +0200)]
staging: android: ion: Do not BUG on handle client mismatch
The ion_free_nolock() function should not BUG on a handle client mismatch.
Signed-off-by: Johanna Abrahamsson <johanna@mjao.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Sun, 28 Aug 2016 11:28:41 +0000 (12:28 +0100)]
staging: wilc1000: fix spelling mistake: "retyring" -> "retrying"
trivial fix to spelling mistake in dev_err message
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Wed, 31 Aug 2016 22:21:20 +0000 (00:21 +0200)]
staging: netlogic: constify ethtool_ops structures
Check for ethtool_ops structures that are only stored in the ethtool_ops
field of a net_device structure or passed as the second argument to
netdev_set_default_ethtool_ops. These contexts are declared const, so
ethtool_ops structures that have these properties can be declared as const
also.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };
@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;
@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)
@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Thu, 25 Aug 2016 17:50:59 +0000 (13:50 -0400)]
staging/lustre: Fix max_dirty_mb output in sysfs
%ul definitely was supposed to be %lu in the format string,
so we print long unsigned int value, not just unsigned int
with a letter l added at the end.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sun, 28 Aug 2016 21:16:07 +0000 (23:16 +0200)]
staging: lustre: constify lmv_proc_target_fops structure
lmv_proc_target_fops, of type struct file_operations, is never modified, so
declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sun, 28 Aug 2016 21:27:06 +0000 (23:27 +0200)]
staging/lustre: constify sops structure
sops, of type struct seq_operations, is never modified, so declare it as
const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sun, 28 Aug 2016 21:38:27 +0000 (23:38 +0200)]
staging: lustre: constify lprocfs_generic_fops structure
lprocfs_generic_fops, of type struct file_operations, is never modified, so
declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Sun, 28 Aug 2016 21:45:11 +0000 (23:45 +0200)]
staging: lustre: obdclass: constify obd_psdev_fops structure
obd_psdev_fops, of type struct file_operations, is never modified, so
declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 29 Aug 2016 12:20:01 +0000 (14:20 +0200)]
staging: lustre: hide unused variable
After a code cleanup, we get a harmless warning about a variable
that is unused when CONFIG_FS_POSIX_ACL is disabled:
drivers/staging/lustre/lustre/llite/xattr.c: In function 'll_xattr_get_common':
drivers/staging/lustre/lustre/llite/xattr.c:312:24: error: unused variable 'lli' [-Werror=unused-variable]
This puts the variable declaration into the same #ifdef.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes:
1e1f9ff406fd ("staging: lustre: llite: break ll_getxattr_common into 2 functions")
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 29 Aug 2016 12:20:00 +0000 (14:20 +0200)]
staging: lustre: fix unstable pages tracking
A patch to change to page accounting code (in v4.8-rc1) conflicts with
a change to lustre (in staging-next for v4.9), and fortunately gets
detected using a gcc warning:
In file included from /git/arm-soc/include/linux/mm.h:1001:0,
from /git/arm-soc/include/linux/highmem.h:7,
from /git/arm-soc/drivers/staging/lustre/lustre/osc/../../include/linux/libcfs/linux/libcfs.h:46,
from /git/arm-soc/drivers/staging/lustre/lustre/osc/../../include/linux/libcfs/libcfs.h:36,
from /git/arm-soc/drivers/staging/lustre/lustre/osc/osc_cl_internal.h:45,
from /git/arm-soc/drivers/staging/lustre/lustre/osc/osc_page.c:40:
drivers/staging/lustre/lustre/osc/osc_page.c: In function 'unstable_page_accounting':
include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds]
atomic_long_add(x, &vm_zone_stat[item]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds]
atomic_long_add(x, &vm_zone_stat[item]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This changes the function to use the correct interface for accounting in the
"node" rather than the "zone".
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes:
d806f30e639b ("staging: lustre: osc: revise unstable pages accounting")
Fixes:
11fb998986a7 ("mm: move most file-based accounting to the node")
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 24 Aug 2016 15:11:58 +0000 (11:11 -0400)]
staging/lustre/o2iblnd: handle mixed page size configurations.
Currently it is not possible to send LNet traffic between
two nodes using infiniband hardware that have different
page sizes for the case when RDMA fragments are used.
When two nodes establish a connection they tell the other
node the maximum number of RDMA fragments they support.
The issue is that the units are pages, and 256 64K pages
corresponds to 16MB of data, whereas a 4K page system is
limited to messages with 1MB of data. The solution is to
report over the wire the maximum number of fragments in
4K unites regardless of the native page size. The recipient
then uses its native page size to translate into the
maximum number of pages sized fragments it can send to
the other node.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/21304
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7650
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Wed, 24 Aug 2016 15:11:57 +0000 (11:11 -0400)]
staging/lustre: release MGC device if connect fails
In lustre_fill_super() if lustre_start_mgc() fails then call
lustre_common_put_super() to release a reference on the MGC device
attached to the LSI.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/20851
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8297
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lokesh Nagappa Jaliminche [Wed, 24 Aug 2016 15:11:56 +0000 (11:11 -0400)]
staging/lustre/llite: changes to avoid cache corruption
ll_find_alias is responsible for getting alias for inode
which can be reused. Directories are assumed to have unique
alias, where in case of non-directories there can be multiple
aliases. In case of lustre there can be two type of aliases
i.e. discon_alias and invalid_alias. Usage of discon_alias in
case of non-directories may corrupt dcache and leads to kernel
crash. Changes made to avoid use of discon_alias in case of
non-directories.
Seagate-bug-id: MRP-2739, MRP-3601
Signed-off-by: Lokesh Nagappa Jaliminche <lokesh.jaliminche@seagate.com>
Reviewed-by: Ujjwal Lanjewar <ujjwal.lanjewar@seagate.com>
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Tested-by: Parinay Vijayprakash Kondekar <parinay.kondekar@seagate.com>
Reviewed-on: http://review.whamcloud.com/17732
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7613
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Eremin [Wed, 24 Aug 2016 15:11:55 +0000 (11:11 -0400)]
staging/lustre/llite: Fix suspicious dereference of pointer 'vma->vm_file'
Remove useless LASSERT(vma->vm_file) because of if it's NULL it
will crash early in file_inode(vma->vm_file).
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/21171
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8372
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yang Sheng [Wed, 24 Aug 2016 15:11:54 +0000 (11:11 -0400)]
staging/lustre/llite: check return value for obd_set_info_async
The return value is ignored in client_common_fill_super.
Restore to check it and error out.
Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-on: http://review.whamcloud.com/21125
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8360
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrew Perepechko [Wed, 24 Aug 2016 15:11:53 +0000 (11:11 -0400)]
staging/lustre: avoid clearing i_nlink for inodes in use
The patch removes find_cbdata callbacks and clear_nlink
from dentry_iput path, since this piece of code makes
a few races possible.
The test case reproduces one of the possible races
described in LU-7925:
1) two hard links are created for the same file
2) the test calls stat(2) for link #1
3) in the middle of 2) the test opens and closes link #2
4) in the middle of 2) the test drops the ldlm locks and
forces dentry reclaim via vm.drop_caches=2
5) in the middle of 2) ll_d_iput() clears i_nlink for
the inode
6) the initial stat(2) continues and copies the wrong
i_nlink value into st_nlink
Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Seagate-bug-id: MRP-3271
Reviewed-on: http://review.whamcloud.com/19164
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7925
Reviewed-by: Wally Wang <wang@cray.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Boyko [Wed, 24 Aug 2016 15:11:52 +0000 (11:11 -0400)]
staging/lustre/mdc: fix panic at mdc_free_open()
Assertion was happened for open request when rq_replay is set
to 1.
ASSERTION(mod->mod_open_req->rq_replay == 0)
But this situation is not fatal for client, and could happened
when mdc_close() failed.
The fix allow to free such requests. If mdc_close fail, MDS doesn`t
receive close request from client. And in a worst case client would
be evicted.
The test recreates issue when mdc_close failed and
client asserts:
ASSERTION( mod->mod_open_req->rq_replay == 0 ) failed
Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Seagate-bug-id: MRP-3156
Reviewed-on: http://review.whamcloud.com/17495
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5282
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Wed, 24 Aug 2016 15:11:51 +0000 (11:11 -0400)]
staging/lustre: const correct set_lock_data()
Change the __u64 *cookie parameter of md_ops->set_lock_data() to
const struct lustre_handle *lockh.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/17072
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7403
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Mon, 22 Aug 2016 01:43:59 +0000 (10:43 +0900)]
staging: dgnc: check the type of print before calling
The dgnc_maxcps_room() function must be called only for print device.
The if-statement for checking print device checks before calling
dgnc_maxcps_room() and also this function doesn't need to have any
data except channel_t.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Sat, 27 Aug 2016 03:23:57 +0000 (23:23 -0400)]
staging: i4l: act2000: capi: Fix checkpatch warning
Fix checkpath.pl warning:
trailing statements should be on next line
open brace '{' following function declarations go on the next line
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Mon, 22 Aug 2016 16:34:58 +0000 (22:04 +0530)]
staging: i4l: icn: fix incorrect type of arguments
sparse was warning about incorrect type of argument:
drivers/staging/i4l/icn/icn.c:1048:49: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/i4l/icn/icn.c:1048:49: expected void const [noderef] <asn:1>*from
drivers/staging/i4l/icn/icn.c:1048:49: got unsigned char const [usertype] *buf
drivers/staging/i4l/icn/icn.c:1476:38: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/i4l/icn/icn.c:1476:38: expected unsigned char const [usertype] *buf
drivers/staging/i4l/icn/icn.c:1476:38: got unsigned char const [noderef] [usertype] <asn:1>*buf
The function icn_writecmd() was used to copy from userspace and also
from the kernelspace. Add another argument to the function to have two
separate pointers, one for the userspace and one for the kernelspace.
Based on the value of user as passed from the caller we use one of
the two pointers.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Mon, 22 Aug 2016 16:34:57 +0000 (22:04 +0530)]
staging: i4l: icn: remove blank lines
Blank lines are not needed after starting brace or before a closing
brace.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Mon, 22 Aug 2016 16:34:56 +0000 (22:04 +0530)]
staging: i4l: icn: space not needed after cast
No need provide a space after a typecast.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Mon, 22 Aug 2016 16:34:55 +0000 (22:04 +0530)]
staging: i4l: act2000: remove unused macro
The macro EVAL_PLCI and MAKE_PLCI are not being used. Remove them.
But keep the comment preceding them as it contains information
regarding message format.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Mon, 22 Aug 2016 16:34:54 +0000 (22:04 +0530)]
staging: i4l: act2000: remove unused argument
The macro EVAL_NCCI was only being used in capi.c and the argument
controller was not used. Remove the argument and at the same time
remove the variable which now becomes unused.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 23 Aug 2016 14:13:21 +0000 (19:43 +0530)]
staging: i4l: icn: use memdup_user
Its better to use memdup_user which does the same thing which this
code has implemented. Also removed a related warning as we will be
warned if allocation fails.
Suggested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anson Jacob [Mon, 22 Aug 2016 17:11:03 +0000 (13:11 -0400)]
staging: vt6656: usbpipe.c: Fix checkpatch warning
Fix checkpatch.pl warning for line over 80 characters
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Randy Dunlap [Tue, 23 Aug 2016 20:07:52 +0000 (13:07 -0700)]
staging: octeon-usb: correct driver name in Kconfig help text
The module name in the Makefile and in the driver source file is
octeon-hcd, so correct the Kconfig text to be the same.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Tue, 23 Aug 2016 21:50:16 +0000 (17:50 -0400)]
Merge tag 'iio-for-4.9a' of git://git./linux/kernel/git/jic23/iio into work-testing
Jonathan writes:
First round of new features, device support and cleanups for IIO in the 4.9 cycle.
Device support
* ak8974
- New driver and bindings for this 2009 vintage magnetometer (it was very
popular back then!)
* atlas-ph-sensor
- ORP sensor support(I had to look up what one of these was)
* cio-dac
- New driver for Measurement Computing DAC boards
* dmard06
- New driver for Domintech DMARDO6 accelerometer. Also vendor prefix.
* dmard09
- New driver for Domintech DMARD09 accelerometer.
* maxim-thermocouple
- max6675 and max31855 new driver
* mt6577 auxdac
- new driver for this Mediatek chip mt2701, mt6577 and mt8173 have this
hardware.
* ti-adc161s626
- new driver for this TI single channel differential ADC.
* vcnl4000
- support vcnl4010 and vcnl4020 which are compatible for all features
currently supported by this driver.
New features
* Core
- Allow retrieving of underlying iio_dev from a callback buffer handle.
This is needed to allow client drivers to perform operations such as
configuring the trigger used.
* hid-sensors
- asynchronous resume support to avoid really long resume times.
* kxcjk-1013
- add the mysterious KIOX000A ACPI id seen in the wild.
* Tools
- lsiio now enumerates processed as well as raw channels.
Cleanup
* ad7298
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* ad7793
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* ade7854
- checkpatch fixups (alignment of parameters)
* atlas-ph-sensor
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
- Switch to REGCACHE_NONE as there are no useful register to cache.
* bma180
- use iio_device_claim_direct_mode and friends to simplify locking around
mode switching and drop some boilerplate.
* hdc100x
- Add mention of the HDC1000 and HDC1008 to the Kconfig help text.
* isl29018
- Add driver specific prefixes to defines and function names.
- Remove excessive logging.
- Drop newlines which add nothing to readability.
- General tidying up of comments.
- Drop I2C_CLASS_HWMON as irrelevant to driver.
* isl29028
- Add driver specific prefixes to defines, enums and function names.
- Drop comma's from available attribute output as not ABI compliant.
- Drop I2C_CLASS_HWMON as irrelevant to driver.
* kxsd9
- devicetree bindings.
* mag3110
- This one wasn't locking to protect against mode switches during
raw_reads. Use the iio_claim_direct_mode function to fix this buglet.
* maxim-theromcouple
- Fix missing selects for triggered buffer support in Kconfig.
* nau7802
- Use complete instead of complete_all as only one completion at a time.
* sx9500
- Use complete instead of complete_all as only one completion at a time.
* us5182d
- Add a missing error code asignment instead of checking the result of
an already checked statement.
* vcnl4000
- Use BIT macro where appropriate.
- Refactor return codes in read_raw callback.
- Add some missing locking for concurrent accesses to the device.
Christian Gromm [Mon, 22 Aug 2016 14:46:24 +0000 (16:46 +0200)]
staging: most: aim-cdev: destroy ida struct in case of exception
This patch is needed to clean up the initialized ida structure in case
the function exits with an exception.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Mon, 22 Aug 2016 16:57:43 +0000 (12:57 -0400)]
staging: lustre: mdc: fix NULL pointer dereference in mdc_adjust_dirpages
The function mdc_adjust_dirpages is only called on platforms which
don't have pages 4K in size which is why kbuild only reported this
for platforms like the Alpha. The problem was a typo in ordering of
variables in the beginning of a while loop. We were accessing the
dp pointer before it was kmapped.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Sun, 21 Aug 2016 22:04:36 +0000 (18:04 -0400)]
staging/lustre: Remove unused cp_error from struct cl_page
cp_error member is not really set anywhere, so kill
it and the only printing user of it too.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Sun, 21 Aug 2016 22:04:35 +0000 (18:04 -0400)]
staging/lustre: Make alignment match open parenthesis
This patch fixes most of checkpatch occurences of
"CHECK: Alignment should match open parenthesis"
in Lustre code.
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Sun, 21 Aug 2016 22:04:34 +0000 (18:04 -0400)]
staging/lustre: Add spaces preferred around that '{+, -, *, /, |, <<, >>, &}'
This patch fixes all checkpatch occurences of
"CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)"
in Lustre code.
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Walleij [Tue, 16 Aug 2016 13:33:27 +0000 (15:33 +0200)]
iio: accel: kxsd9: Add device tree bindings
This accelerometer can be probed from the device tree, so it needs
to have proper documentation of it's device tree bindings.
Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Srinivas Pandruvada [Mon, 15 Aug 2016 19:12:47 +0000 (12:12 -0700)]
iio: hid-sensors: use asynchronous resume
Some platforms power off sensor hubs during S3 suspend, which will require
longer time to resume. This hurts system resume time, so resume
asynchronously.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Zhiyong Tao [Thu, 18 Aug 2016 07:11:36 +0000 (15:11 +0800)]
iio: adc: mt2701: Add Mediatek auxadc driver for mt2701.
Add Mediatek auxadc driver based on iio.
It will register a device in iio and support iio.
So thermal can read auxadc channel to sample data by iio device.
It is tested successfully on mt2701 platform.
Mt8173 and mt6577 platforms are not tested.
But the expectation is compatible.
Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Zhiyong Tao [Thu, 18 Aug 2016 07:11:35 +0000 (15:11 +0800)]
dt-bindings: auxadc: Add binding document for Mediatek auxadc.
The commit adds the device tree binding documentation for the mediatek
auxadc found on Mediatek MT2701.
Thermal gets auxadc sample data by iio device.
So the commit changes auxadc device tree binding documentation from
/soc/mediatek/auxadc.txt to /iio/adc/mt6577_auxadc.txt.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Alison Schofield [Mon, 15 Aug 2016 23:09:36 +0000 (16:09 -0700)]
iio: temperature: add Kconfig selects for triggered buffer
Select IIO_BUFFER and IIO_TRIGGERED_BUFFER to compile maxim_thermocouple.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Alison Schofield [Thu, 18 Aug 2016 16:09:00 +0000 (09:09 -0700)]
iio: magnetometer: mag3110: claim direct mode during raw reads
Driver was checking for direct mode but not locking it. Use
claim/release helper functions to guarantee the device stays
in direct mode during raw reads.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Louie Lu [Mon, 15 Aug 2016 10:44:41 +0000 (18:44 +0800)]
staging: rts5208: Change data type to unsigned int.
This patch fixes a minor checkpatch warning:
"WARNING: Prefer 'unsigned int' to bare use of 'unsigned'"
Signed-off-by: Louie Lu <louie.lu@hopebaytech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quentin Lambert [Fri, 12 Aug 2016 14:15:18 +0000 (16:15 +0200)]
staging: rts5208/ms.c: add missing releases in mg_get_local_EKB and mg_get_ICV
mg_get_local_EKB and mg_get_ICV used to return with an error code before
releasing all resources. This patch add a jump to the appropriate label
ensuring that the resources are properly released before returning.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quentin Lambert [Fri, 12 Aug 2016 14:15:17 +0000 (16:15 +0200)]
staging: rts5208/ms.c: change the label name to respect the coding style
This patch changes label names using camel case to snake case as well as giving
a new name representing what will be done after the label.
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jonas Rickert [Sat, 30 Jul 2016 11:27:58 +0000 (13:27 +0200)]
Staging: rts5208: fix double blank line coding style issues
This is a patch for double blank lines and a missing blank line reported
by checkpatch.pl
Signed-off-by: Jonas Rickert <jrickertkc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shiva Kerdel [Fri, 5 Aug 2016 20:14:41 +0000 (22:14 +0200)]
Staging: rtl8723au: rtw_ieee80211: Fixed operators spacing style issues
Fixed spaces around operators to fix their coding style issues.
Signed-off-by: Shiva Kerdel <shiva@exdev.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Thu, 14 Jul 2016 10:21:28 +0000 (11:21 +0100)]
staging: rtl8723au: hal: check BT_Active and BT_State with correct bit pattern
BT_Active and BT_State are being masked with 0x00ffffff so it the subsequent
comparisons with 0xffffffff are therefore a buggy check. Instead, check them
against 0x00ffffff.
Unfortunately I couldn't find a datasheet or hardware to see if 0xffffffff
is an expected invalid bit pattern that should be checked before BT_Active and
BT_State are masked with 0x00ffffff, so for now, this fix seems like the least
risky approach.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Sat, 2 Jul 2016 23:48:51 +0000 (19:48 -0400)]
staging: fsl-mc: make bus/mc-bus explicitly non-modular
The Kconfig currently controlling compilation of this code is:
config FSL_MC_BUS
bool "Freescale Management Complex (MC) bus driver"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
Since the code was already not using module_init, we don't have to change
the initcall and the init ordering remains unchanged with this commit.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
We don't replace module.h with init.h since the file does make some
references to "struct *module" for processing other modules.
Cc: "J. German Rivera" <German.Rivera@freescale.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nipun Gupta [Wed, 29 Jun 2016 17:14:39 +0000 (22:44 +0530)]
fsl-mc: add helper macro to determine if a device is of fsl_mc type
Add a helper macro to return if a device has a bus type of fsl_mc.
This makes the bus driver code more readable and provides a way for
drivers like the SMMU driver to easily check the bus type.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Bharat Bhushan <bharat.bhushan@nxp.com>
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 8 Jun 2016 07:40:55 +0000 (13:10 +0530)]
staging: r8723au: Remove unused semaphores
The semaphores xmit_sema, terminate_xmitthread_sema, tx_retevt and
io_req have no users, hence remove all references to them.
Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 8 Jun 2016 07:40:54 +0000 (13:10 +0530)]
staging: r8723au: pwrctrl_priv: Replace semaphore lock with mutex
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 5 Jun 2016 19:11:19 +0000 (14:11 -0500)]
staging: r8188eu: Fix scheduling while atomic splat
Commit
fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu:
Remove rtw_zmalloc(), wrapper for kzalloc()") changed all allocation
calls to be GFP_KERNEL even though the original wrapper was testing
to determine if the caller was in atomic mode. Most of the mistakes
were corrected with commit
33dc85c3c667209c930b2dac5ccbc2a365e06b7a
("staging: r8188eu: Fix scheduling while atomic error introduced in
commit
fadbe0cd"); however, two kzalloc calls were missed as the
call only happens when the driver is shutting down.
Fixes:
fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu: Remove rtw_zmalloc(), wrapper for kzalloc()")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 5 Jun 2016 15:20:59 +0000 (10:20 -0500)]
staging: r8188eu: Remove some false positives from kmemleak
When this driver preallocates some SKBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is released; therefore, the report is a false positive.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sat, 4 Jun 2016 01:17:37 +0000 (20:17 -0500)]
staging: r8712u: Handle some false positives from kmemleak
When this driver preallocates some URBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is reclaimed, therefore, the report is a false positive.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sat, 4 Jun 2016 01:17:36 +0000 (20:17 -0500)]
staging: r8712u: Fix leak of skb
There are two types of messages queued for RX. The major type, which does
I/O on the device, was being handled properly. The skbs that communicated
with the firmware were being leaked.
While rewriting the code that sets up the skb, it was possible to remove
the private variable indicating that the old skb could be reused.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sat, 4 Jun 2016 01:17:35 +0000 (20:17 -0500)]
staging: r8712u: Check pointer before use
Routine r8712_usb_read_port() dereferences "precvbuf" before testing it
for NULL.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Parth Sane [Wed, 8 Jun 2016 11:27:45 +0000 (16:57 +0530)]
staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c
Multiple parenthesis alignment warnings were thrown by checkpatch in ieee80211.c
This patch effectively fixes that.
Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anuradha Weeraman [Mon, 27 Jun 2016 07:42:16 +0000 (13:12 +0530)]
Staging: rtl8712: Fixed brace and comment style issue
Fixed issues with coding style.
Signed-off-by: Anuradha Weeraman <anuradha@weeraman.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Thu, 2 Jun 2016 04:24:09 +0000 (09:54 +0530)]
rtl8712: intf_priv: Replace semaphore lock with completion
The semaphore 'lock' in 'intf_priv' is used as completion,
so convert it to a struct completion type.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Thu, 2 Jun 2016 04:24:08 +0000 (09:54 +0530)]
rtl8712: Replace semaphore terminate_cmdthread_sema with completion
The semaphore 'terminate_cmdthread_sema' is used as completion,
so convert it to a struct completion type.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Thu, 2 Jun 2016 04:24:07 +0000 (09:54 +0530)]
rtl8712: Replace semaphore cmd_queue_sema with completion
The semaphore 'cmd_queue_sema' is used as completion,
so convert it to a struct completion type.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:56 +0000 (14:56 +0530)]
rtl8192e: Replace semaphore ips_sem with mutex
The semaphore 'ips_sem' in the rtl8192e is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:55 +0000 (14:56 +0530)]
rtl8192e: Replace semaphore scan_sem with mutex
The semaphore 'scan_sem' in the rtl8192e is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:54 +0000 (14:56 +0530)]
rtl8192e: Replace semaphore rf_sem with mutex
The semaphore 'rf_sem' in the rtl8192e is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:53 +0000 (14:56 +0530)]
rtl8192e: r8192_priv: Replace semaphore wx_sem with mutex
The semaphore 'wx_sem' in the r8192_priv is a simple mutex,
so it should be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binoy Jayan [Wed, 1 Jun 2016 09:26:52 +0000 (14:56 +0530)]
rtl8192e: rtllib_device: Replace semaphore wx_sem with mutex
The semaphore 'wx_sem' in the rtllib_device is a simple mutex,
so it should be written as one. Semaphores are going away in the future.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 20 Jul 2016 15:26:06 +0000 (17:26 +0200)]
staging/rtl8192e: avoid comparing unsigned type >= 0
There is one remaining warning about a type limit check in rtl8192e:
staging/rtl8192e/rtl819x_TSProc.c:326:14: error: comparison is always true due to limited range of data type [-Werror=type-limits]
This changes a macro into a local function to clarify the types and simplify
the check while removing the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 20 Jul 2016 15:26:05 +0000 (17:26 +0200)]
staging/rtl8192e: use s8 instead of char
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
incorrect code that results from 'char' being unsigned here, e.g.
staging/rtl8192e/rtl8192e/r8192E_phy.c:1072:36: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtl8192e/r8192E_phy.c:1104:36: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtl8192e/rtl_core.c:1987:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtl8192e/rtl_dm.c:782:37: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtllib_softmac_wx.c:465:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
This patch changes all uses of 'char' in this driver that refer to
8-bit integers to use 's8' instead, which is signed on all architectures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 20 Jul 2016 15:13:58 +0000 (17:13 +0200)]
staging/rtl8192u: use s8 instead of char
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
incorrect code that results from 'char' being unsigned here, e.g.
staging/rtl8192u/r8192U_core.c:4150:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192u/r8192U_dm.c:646:50: error: comparison is always false due to limited range of data type [-Werror=type-limits]
This patch changes all uses of 'char' in this driver that refer to
8-bit integers to use 's8' instead, which is signed on all architectures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 20 Jun 2016 05:29:30 +0000 (12:29 +0700)]
staging: rtl8188eu: remove _EFUSE_DEF_TYPE enum
This enumeration does not used.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>