Sandhya Bankar [Sun, 6 Mar 2016 07:13:27 +0000 (12:43 +0530)]
Staging: vt6655: Remove & from function name.
Remove & from function name,when function name passed as an argument to another function.
Function name is used as pointer without &.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Marsh [Tue, 1 Mar 2016 18:45:09 +0000 (19:45 +0100)]
Staging: vt6655: remove unnecessary blank lines from card.c
This a patch to card.c to remove unnecessary blank lines in order to
remove a checkpatch.pl warning.
Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Fri, 26 Feb 2016 12:57:05 +0000 (18:27 +0530)]
staging: vt6656: Remove unnecessary parentheses
This patch removes the following checkpatch.pl warnings:
Unnecessary parentheses around al7230_init_table_amode[0][0]
Unnecessary parentheses around al7230_channel_table2[0][0]
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:12 +0000 (12:57 +0000)]
staging: vt6655: mac.c replace dwData with data.
Removing camel case and type prefix.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:11 +0000 (12:57 +0000)]
staging: vt6655: mac.c replace wOffset with offset.
Removing camel case and type prefix.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:10 +0000 (12:57 +0000)]
staging: vt6655: mac.c replace byOrgDMACtl with org_dma_ctl
Removing camel case and type prefix.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:09 +0000 (12:57 +0000)]
staging: vt6655: mac Replace dwCurrDescAddr with curr_desc_addr.
Removing camel case and type prefix.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:08 +0000 (12:57 +0000)]
staging: vt6655: mac.c replace VNSvInPortB with ioread8
Removing the macro from functions.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:07 +0000 (12:57 +0000)]
staging: vt6655: MACvSetLoopbackMode replace byOrgValue with ioread8
Removing VNSvInPortB and nesting inside iowrite8.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:06 +0000 (12:57 +0000)]
staging: vt6655: MACbPSWakeup replace VNSvInPortB byOrgValue with ioread8
removing byOrgValue variable.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:05 +0000 (12:57 +0000)]
staging: vt6655: mac.c replace VNSvOutPortB with iowrite8
removing macro from functions
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:04 +0000 (12:57 +0000)]
staging: vt6655: mac.c replace VNSvOutPortW with iowrite16
removig macro from functions.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:03 +0000 (12:57 +0000)]
staging: vt6655: mac.c replace VNSvOutPortD with iowrite32.
Removing the macro from functions.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:02 +0000 (12:57 +0000)]
staging: vt6655: mac.c/h resize all unsigned long to u32
All addressing is limited to 32 bits match this to all
functions and port out functions.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:01 +0000 (12:57 +0000)]
staging: vt6655: MACvRestoreContext replace for loops with memcpy_toio.
Removing the need for variable ii.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 6 Mar 2016 12:57:00 +0000 (12:57 +0000)]
staging: vt6655: mac.c rename pbyCxtBuf to cxt_buf
Removing camel case and type prefix.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 28 Feb 2016 19:02:57 +0000 (19:02 +0000)]
staging: vt6655: MACvSaveContext use memcpy_fromio to read context.
Use memcpy_fromio to store data removing the need for local count.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 28 Feb 2016 19:02:56 +0000 (19:02 +0000)]
staging: vt6655: replace VNSvInPortD dwData reads with ioread32
Removing dwData variable altogether.
The reads are always 32 bit insize.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 28 Feb 2016 19:02:55 +0000 (19:02 +0000)]
staging: vt6655: mac.c Replace VNSvInPortB byData reads with ioread8.
Removing byData variable altogether.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sun, 28 Feb 2016 19:02:54 +0000 (19:02 +0000)]
staging: vt6655: mac.c rename dwIoBase to io_base
Removing camel case.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Tue, 8 Mar 2016 22:35:29 +0000 (17:35 -0500)]
staging: lustre: make lustre dependent on LNet
In the case of lustre routers you only need a functioning
LNet stack. Especially since often the routers are very
light weight and want to avoid any addition software that
would create additional pressures on the system.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Tue, 8 Mar 2016 22:35:28 +0000 (17:35 -0500)]
staging: lustre: add help section of Kconfig config LNET
Include a help section for Kconfig LNET.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Tue, 8 Mar 2016 22:35:27 +0000 (17:35 -0500)]
staging: lustre: fixup kernel Kconfig option LNET_MAX_PAYLOAD
A few errors exist for the Kconfig option LNET_MAX_PAYLOAD. First
mistake is the default size is 1MB not 2MB as it is shown to the
person configuring the kernel. Second the LNET_MAX_PAYLOAD option
is more closely related to LNET than the LUSTRE_FS option.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Tue, 8 Mar 2016 22:35:26 +0000 (17:35 -0500)]
staging: lustre: move libcfs to lnet layer
The lustre file system has a layered architecture with
libcfs as the lowest layer and LNet layered on top. Then
on top of LNet we run the lustre client. This patch moves
the libcfs module code out of lustre into the lnet tree.
This fits into the long term goal of eventually merging
libcfs into LNet.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Mon, 7 Mar 2016 23:10:24 +0000 (18:10 -0500)]
staging: lustre: make LNet use lprocfs_call_handler
Sometime ago a patch was submitted to duplicate the
proc_call_handler code in the LNet layer. This was
due to the thinking libcfs was not used by the LNet
layer. This was a wrong assumption so lets make LNet
use the lprocfs_call_handler from the libcfs layer.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Mon, 7 Mar 2016 23:10:23 +0000 (18:10 -0500)]
staging: lustre: rename proc_call_handler to lprocfs_call_handler
Using proc_call_handler as a function name is way too generic.
Rename to lprocfs_call_handler to avoid possible collisions.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Mon, 7 Mar 2016 23:10:22 +0000 (18:10 -0500)]
staging: lustre: change test to assert in LNetGetId
The ln_refcount test was changed into an assert.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Nunez [Mon, 7 Mar 2016 23:10:21 +0000 (18:10 -0500)]
staging: lustre: Correct missing newline
Several error messages are missing newline characters
at the end of the message. Newlines are added where
necessary and other minor corrections; no punctuation
at the end of an error message, add a return code to
the end of error messages, device name at the beginning,
etc.
There are just a couple of places where newlines are
removed and this is only in LDLM_DEBUG_NOLOCK. The definition
of LDLM_DEBUG_NOLOCK already has a newline in it and
resulted in double newlines printed.
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4871
Reviewed-on: http://review.whamcloud.com/10000
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sebastien Buisson [Mon, 7 Mar 2016 23:10:20 +0000 (18:10 -0500)]
staging: lustre: fix 'data race condition' issue in framework.c
Fix 'data race condition' defects found by Coverity version 6.5.0:
Data race condition (MISSING_LOCK)
Accessing variable without holding lock. Elsewhere,
this variable is accessed with lock held.
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744
Reviewed-on: http://review.whamcloud.com/6568
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sebastien Buisson [Mon, 7 Mar 2016 23:10:19 +0000 (18:10 -0500)]
staging: lustre: fix 'NULL pointer dereference' errors
Fix 'NULL pointer dereference' defects found by Coverity version
6.5.3:
Dereference after null check (FORWARD_NULL)
For instance, Passing null pointer to a function which dereferences
it.
Dereference before null check (REVERSE_INULL)
Null-checking variable suggests that it may be null, but it has
already been dereferenced on all paths leading to the check.
Dereference null return value (NULL_RETURNS)
The following fixes for the LNet layer are broken out of patch
http://review.whamcloud.com/4720.
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2217
Reviewed-on: http://review.whamcloud.com/4720
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sebastien Buisson [Mon, 7 Mar 2016 23:10:18 +0000 (18:10 -0500)]
staging: lustre: fix 'data race condition' issue in conrpc.c
Fix 'data race condition' defects found by Coverity version 6.5.0:
Data race condition (MISSING_LOCK)
Accessing variable without holding lock. Elsewhere,
this variable is accessed with lock held.
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744
Reviewed-on: http://review.whamcloud.com/6567
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Liang Zhen [Mon, 7 Mar 2016 23:10:17 +0000 (18:10 -0500)]
staging: lustre: LNet network latency simulation
Incoming lnet message can be delayed for seconds if it can match
any of LNet Delay Rules.
User can add/remove/list Delay Rule by lctl commands:
- lctl net_delay_add
Add a new Delay Rule to LNet, options
<-s | --source SRC_NID>
<-d | --dest DST_NID>
<<-r | --rate RATE_NUMBER>
<-i | --interlval SECONDS>>
<-l | --latency DELAY_LATENCY>
- lctl net_delay_del
Remove matched Delay Rule from LNet, options:
<[-a | --all] |
<-s | --source SRC_NID>
<-d | --dest DST_NID>>
- lctl net_delay_list
List all Delay Rules in LNet
- lctl net_delay_reset
Reset statistic counters for all Delay Rules
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11409
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Liang Zhen [Mon, 7 Mar 2016 23:10:16 +0000 (18:10 -0500)]
staging: lustre: LNet drop rule implementation
This is implementation of LNet Drop Rule, which can randomly drop
LNet messages at specified rate.
LNet Drop Rule can only be applied to receive side of message. User
can add drop_rule either on end point of cluster (client/server) or
on LNet routers.
Here are lctl command to control LNet Drop Rules:
- net_drop_add -s SRC_NID -d DEST_NID --rate VALUE
drop 1/@VALUE of messages from @SRC_NID to @DEST_NID
- net_drop_del -s SRC_NID -d DEST_NID
remove all drop rules from @SRC_NID to @DEST_NID
- net_drop_list
list all drop rules on current node
Examples:
- lctl net_drop_add -s *@o2ib0 -d 192.168.1.102@tcp 1000
add new drop rule, it will drop 1/1000 messages from network o2ib0
to 192.168.1.102@tcp
- lctl net_drop_add -s 10.8.6.123@o2ib1 -d * 500
add new drop rule, it will drop 1/500 messages from 10.8.6.123@o2ib1
to all nodes
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11314
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 2 Mar 2016 19:06:46 +0000 (20:06 +0100)]
isdn: i4l: move active-isdn drivers to staging
The icn, act2000 and pcbit drivers are all for very old hardware,
and it is highly unlikely that anyone is actually still using them
on modern kernels, if at all.
All three drivers apparently are for hardware that predates PCI
being the common connector, as they are ISA-only and active
PCI ISDN cards were widely available in the 1990s.
Looking through the git logs, it I cannot find any indication of a
patch to any of these drivers that has been tested on real hardware,
only cleanups or global API changes.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 2 Mar 2016 19:06:45 +0000 (20:06 +0100)]
isdn: icn: remove a #warning
The icn driver currently produces an unconditional #warning whenever
we build it, introduced by Karsten Keil back in 2003:
#warning TODO test headroom or use skb->nb to flag ACK
Karsten's original commit (from BitKeeper) contains this description:
- here are lot of bugs left, so ISDN is not stable yet but
I think it's really time to fix it, even if it need some cycles
to get it right (normally I'm only send patches if it works 100% for
me).
- I add some additional #warnings to address places which need fixing
(I hope that some of the other ISDN developer jump in)
Apparently this has not happened, and it is unlikely that it ever will,
given that the driver doesn't seem to work. No substantial bug fixes
other than janitorial cleanups have happened in the driver since then,
and I see no indication that anyone who patched it had the hardware.
We should probably either remove the driver, or remove all of i4l,
but for now, this shuts up the distracting #warning by turning it
into a comment.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: http://git.meleeweb.net/linux.git/commit/?id=b0deac0886b0056765afd149e9834373b38e096b
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 2 Mar 2016 14:27:38 +0000 (14:27 +0000)]
staging: comedi: comedi.h: Fix comment for struct comedi_krange
The kernel-doc comment for `struct comedi_krange` refers to the macro
constant `RF_external`. It should be `RF_EXTERNAL`, so fix it. It also
documents the value of the constant as `(1 << 8)`, but the macro now
expands to the hexadecimal constant `0x100`, so use that as the
documented value.
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 [Wed, 2 Mar 2016 14:27:37 +0000 (14:27 +0000)]
staging: comedi: comedi.h: Do not use BIT macro
The "comedi.h" file is part of the user API for COMEDI devices, and is
intended to be migrated to "include/uapi/linux". The `BIT` macro from
"include/linux/bitops.h" should not be used there.
Replace the use of the `BIT` macro with hexadecimal constants of the
same value. The `BIT` macro replaced expressions of the form `(1 << N)`
in this file originally, but reverting back to that form would encourage
patches changing them back to use the `BIT` macro.
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>
Rasmus Linusson [Sun, 28 Feb 2016 15:38:12 +0000 (16:38 +0100)]
staging: comedi: cb_pcimdda: Fix long lines in comments
Reorder comments to keep 80 character limit
Signed-off-by: Rasmus Linusson <rasmus@linusson.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rasmus Linusson [Sun, 28 Feb 2016 15:38:11 +0000 (16:38 +0100)]
staging: comedi: cb_pcimdda: Fix multi-line comments
Add asterisks to multi-line comments currently missing them
Signed-off-by: Rasmus Linusson <rasmus@linusson.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Sun, 28 Feb 2016 07:58:47 +0000 (13:28 +0530)]
Staging: comedi: s626.c: Remove unused functions
The functions s626_get_clk_mult, s626_get_clk_mult, s626_get_enc_mode,
s626_set_index_pol are not used anywhere in the kernel so they can be
removed. This also cleans the code. Grepped to find the occurences.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 24 Feb 2016 11:15:34 +0000 (16:45 +0530)]
staging: comedi: drivers: Remove use of deprecated pci API
Replace pci_[alloc|free]_consistent occurences with
dma_[alloc|free]_coherent.
The Coccinelle semantic patch that was used to make some of these
changes is as follows:
@deprecated@
idexpression id;
position p;
@@
(
pci_dma_supported@p ( id, ...)
|
pci_alloc_consistent@p ( id, ...)
)
@bad1@
idexpression id;
position deprecated.p;
@@
...when != &id->dev
when != pci_get_drvdata ( id )
when != pci_enable_device ( id )
(
pci_dma_supported@p ( id, ...)
|
pci_alloc_consistent@p ( id, ...)
)
@depends on !bad1@
idexpression id;
expression direction;
position deprecated.p;
@@
(
- pci_dma_supported@p ( id,
+ dma_supported ( &id->dev,
...
+ , GFP_KERNEL
)
|
- pci_alloc_consistent@p ( id,
+ dma_alloc_coherent ( &id->dev,
...
+ , GFP_KERNEL
)
)
alloc_and_init_dma_members does not affect the interrupt status and is
only called by auto_attach, which also does not affect the interrupt
status. auto_attach() also contains a call to comedi_alloc_devpriv()
which calls kzalloc with GFP_KERNEL flag. Thus, there seems to be no
danger that dma_alloc_coherent can be called with interrupts turned
off, and GFP_KERNEL can be used.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Ravichandran [Wed, 24 Feb 2016 00:36:04 +0000 (19:36 -0500)]
staging: comedi: drivers: Remove unneeded NULL check before kfree()
Remove NULL check before kfree as it is not needed.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philippe Loctaux [Mon, 22 Feb 2016 23:47:59 +0000 (00:47 +0100)]
Staging: comedi: contec_pci_dio: fixed comment blocks coding style issues
Makes the comment blocks start with /* on separate lines, and end
with */ on separate lines as well,
starting with * for each comment lines.
Signed-off-by: Philippe Loctaux <phil@philippeloctaux.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhaktipriya Shridhar [Sun, 21 Feb 2016 10:43:01 +0000 (16:13 +0530)]
staging: comedi: Use macro DIV_ROUND_CLOSEST
Occurences of the computation (x +d/2)/d can be replaced with
the macro DIV_ROUND_CLOSEST.
This was detected by the following Coccinelle script.
@@
expression e1,e2;
@@
(
- ((e1) + e2/2) / (e2)
+ DIV_ROUND_CLOSEST(e1,e2)
|
- ((e1) + (e2/2)) / (e2)
+ DIV_ROUND_CLOSEST(e1,e2)
)
Since some lines exceeded the 80 character limit,
some changes were made by hand.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan [Mon, 15 Feb 2016 18:59:06 +0000 (18:59 +0000)]
comedi: note a coverity discovered hole that needs fixing
It's not trivial to just post up a fix, so add it to the TODO list and
ensure it doesn't get lost.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Tue, 1 Mar 2016 19:43:22 +0000 (01:13 +0530)]
Staging: gdm724x: Replace random_ether_addr with eth_random_addr
The macro random_ether_addr is calling the function eth_random_addr.
Therefore, the call to random_ether_addr can be replaced with
eth_random_addr.
Done using coccinelle:
@@
expression addr;
@@
- random_ether_addr(addr);
+ eth_random_addr(addr);
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Fri, 26 Feb 2016 10:04:32 +0000 (15:34 +0530)]
Staging: gdm724x: Use min instead of ternary operator
This patch replaces ternary operator with macro min as it shorter and
thus increases code readability. Macro min return the minimum of the
two compared values.
Made a semantic patch for changes:
@@
type T;
T x;
T y;
@@
(
- x < y ? x : y
+ min(x,y)
|
- x > y ? x : y
+ max(x,y)
)
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Sun, 28 Feb 2016 14:24:41 +0000 (19:54 +0530)]
staging: gdm724x: gdm_usb: Remove create_workqueue()
With concurrency managed workqueues, use of dedicated workqueues
can be replaced by using system_wq. Drop usb_tx_wq and usb_rx_wq
by using system_wq.
Since there are multiple work items per udev but different udevs
do not need to be ordered, increase of concurrency level by
switching to system_wq should not break anything.
cancel_work_sync() is used to ensure that work is not pending or
executing on any CPU.
Lastly, since all devices are suspended, which shutdowns the work
items before the driver can be unregistered, it is guaranteed
that no work item is pending or executing by the time exit path
runs.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 22 Feb 2016 19:33:33 +0000 (22:33 +0300)]
Staging: gdm72xx: remove duplicate condition
We know "len" is not zero because we tested for that at the beginning of
the function so this test can be removed.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 22 Feb 2016 19:33:09 +0000 (22:33 +0300)]
Staging: gdm72xx: underflow bug in gdm_wimax_ioctl_get_data()
"size" here should be unsigned, otherwise we might end up trying to copy
negative bytes in gdm_wimax_ioctl_get_data() resulting in an information
leak.
Reported-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 22 Feb 2016 19:32:38 +0000 (22:32 +0300)]
staging: gdm72xx: zero out padding
We pad the start of this buffer with 256 bytes of padding. It's not
clear to me exactly what's going on or how it's used but let's zero it
out.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 22 Feb 2016 19:32:21 +0000 (22:32 +0300)]
Staging: gdm72xx: make "len" unsigned
We had an underflow bug here and I think I fixed it but we may as
well be proactive and make "len" unsigned to be double sure.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 22 Feb 2016 19:31:31 +0000 (22:31 +0300)]
Staging: gdm72xx: silence underflow warning in netlink_send()
The value of "group" comes from "idx" in __gdm_wimax_event_send():
if (sscanf(e->dev->name, "wm%d", &idx) == 1)
Smatch marks sscanf values as user controlled. It's supposed to be a
number in 0-30 range. We cap the upper bound but allow negatives. Fix
this by making it type u16 instead.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 22 Feb 2016 19:30:46 +0000 (22:30 +0300)]
staging: gdm72xx: underflow in netlink_rcv_cb()
If nlh->nlmsg_len is less than ND_IFINDEX_LEN we end up trying to memcpy
a negative size. I also re-ordered slighty the condition to make it
more uniform.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tapan Prakash T [Tue, 23 Feb 2016 17:15:48 +0000 (22:45 +0530)]
drivers: staging: rtl8712: rtl871x_xmit.c: Fix Comparisons should place the constant on the right side of the test warning
Fixed checkpatch.pl warning 'Comparisons should place the constant on the
right side of the test'
Signed-off-by: Tapan Prakash T <tapanprakasht@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan [Mon, 15 Feb 2016 18:58:10 +0000 (18:58 +0000)]
rtl871x: avoid running off end of buffer
If 32 bytes of non zero are passed in pdata->pointer then the mac_pton
function will run off the end of the buffer. Make sure we always have a
terminated string kernel side.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 24 Feb 2016 15:24:28 +0000 (20:54 +0530)]
staging: speakup: Remove unnecessary test in if condition
Remove unnecessary test on synth->alive since it has already been
tested previously.
This fixes the following smatch warning:
drivers/staging/speakup/synth.c:182 spk_synth_is_alive_restart() warn:
we tested 'synth->alive' before and it was 'false'
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alison Schofield [Wed, 24 Feb 2016 05:38:58 +0000 (21:38 -0800)]
staging: speakup: remove multiple assignments
Remove multiple assignments by factorizing.
Coccinelle semantic patch used:
@@ identifier x,y; constant z; @@
- x=y=z;
+ x=z;
+ y=z;
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dilek Uzulmez [Mon, 22 Feb 2016 19:56:01 +0000 (21:56 +0200)]
Staging: speakup: Add space around '|'
Add space around operator '|'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '|' (ctx:VxV)
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Thu, 3 Mar 2016 16:00:58 +0000 (11:00 -0500)]
staging: lustre: handle complex strings in cfs_str2num_check
Originally the function cfs_str2num_check used simple_strtoul
but has been updated to kstrtoul. The string passed into
cfs_str2num_check can be a very complex, for example we could
have 10.37.202.[59-61]. When simple_strtoul was used the first
number until we hit a non-digit character could be extracted
but testing showed that kstrtoul will not return any value if
it detects any non-digit character. Because of this change in
behavior a different approach is needed to handle these types
of complex strings. The use of sscanf was investigated to see
if it could be used to extract numbers from the passed in
string but unlike its glibc counterpart the kernel version
also just reported a error with no results if a non-digit value
in the string was encountered. Another possible approach would
be to use __parse_int directly but that class of functions is
not exported by the kernel. So the approach in this patch is
to scan the string passed in for the first non-digit character
and replace that character with a '\0' so kstrtoul can be used.
Once completed the original character is restored. We also
restore a original behavior that was removed to return 0 when
we encounter any non digit character before the nob count.
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 12:05:22 +0000 (21:05 +0900)]
staging: wilc1000: use switch statement instead of multiple if statement
It is more readable than multiple if-else statement.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 12:05:21 +0000 (21:05 +0900)]
staging: wilc1000: remove unnecessary comments
This patch removes unnecessary comments because enum cfg_cmd_type
shows each command type without it.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 12:05:20 +0000 (21:05 +0900)]
staging: wilc1000: add enum cfg_type_cmd
This patch adds a new enum cfg_type_cmd to change hard-coded command
type.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 12:05:19 +0000 (21:05 +0900)]
staging: wilc1000: rename hardwareProductVersion in struct wilc_mac_cfg
This patch renames hardwareProductVersion to hw_product_version to avoid
camelcase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 12:05:18 +0000 (21:05 +0900)]
staging: wilc1000: remove commented codes
This patch removes commented codes in struct wilc_cfg_str.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 12:05:17 +0000 (21:05 +0900)]
staging: wilc1000: use TAG_PARAM_OFFSET define
TAG_PARAM_OFFSET is defined at top of this file so that it is used
to simplify codes.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anchal Jain [Wed, 2 Mar 2016 15:42:19 +0000 (21:12 +0530)]
staging: wilc1000: Remove a whitespace before parenthesis
Remove a whitespace before parenthesis "("
Signed-off-by: Anchal Jain <anchalj109@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 05:28:24 +0000 (14:28 +0900)]
staging: wilc1000: remove typedef from enum tenuConnectSts
This patch removes typedef from enum tenuConnectSts and renames it to
connect_status to avoid camelcase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 05:28:23 +0000 (14:28 +0900)]
staging: wilc1000: remove unused define
This patch removes INFINITE_SLEEP_TIME that is not used in the driver,
so just remove it.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 05:28:22 +0000 (14:28 +0900)]
staging: wilc1000: remove typedef from sdio_cmd53_t
This patch removes typedef from struct sdio_cmd53_t and renames it to
sdio_cmd53.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 05:28:21 +0000 (14:28 +0900)]
staging: wilc1000: remove unnecessary comment codes
This patch removes unnecessary comment code in struct sdio_cmd53_t.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 3 Mar 2016 05:28:20 +0000 (14:28 +0900)]
staging: wilc1000: remove typedef from struct sdio_cmd52_t
This patch removes typedef from struct sdio_cmd52_t and renames it to
sdio_cmd52.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Liang Zhen [Wed, 2 Mar 2016 23:53:30 +0000 (18:53 -0500)]
staging: lustre: do less intense allocating retry for ko2iblnd
ko2iblnd may retry too frequent for growing pools, all schedulers
are spinning if another thread is in progress of allocating a new
pool and can't finish right away because of high system load.
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7054
Reviewed-on: http://review.whamcloud.com/16470
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Liang Zhen [Wed, 2 Mar 2016 23:53:29 +0000 (18:53 -0500)]
staging: lustre: avoid intensive reconnecting for ko2iblnd
When there is a connection race between two nodes and one side
of the connection is rejected by the other side. o2iblnd will
reconnect immediately, this is going to generate a lot of
trashes if:
- race winner is slow and can't send out connecting request
in short time.
- remote side leaves a cmid in TIMEWAIT state, which will reject
future connection requests
To resolve this problem, this patch changed the reconnection
behave: reconnection is submitted by connd only if a zombie
connection is being destroyed and there is a pending
reconnection request for the corresponding peer.
Also, after a few rejections, reconnection will have a time
interval between each attempt.
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7569
Reviewed-on: http://review.whamcloud.com/17892
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Liang Zhen [Wed, 2 Mar 2016 23:53:28 +0000 (18:53 -0500)]
staging: lustre: check wr_id returned by ib_poll_cq
If ib_poll_cq returned +ve without initialising ib_wc::wr_id (bug
in driver), then o2iblnd will run into unpredictable situation
because ib_wc::wr_id may refer to stale tx/rx pointer in stack.
It indicates bug in HCA driver if this happened, ko2iblnd should
output console error then close current connection.
This patch could also be helpful for LU-5271
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-519
Reviewed-on: http://review.whamcloud.com/12747
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Doug Oucharek [Wed, 2 Mar 2016 23:53:27 +0000 (18:53 -0500)]
staging: lustre: Change connect peer failed cleanup order
A race condition has been found where connd is cleaning up failed
connections, the peer ref counter goes to zero, but we stil have
a connecting counter > 0.
One possible race is when we are retrying a connection by
calling kiblnd_connect_peer() which itself fails and decrements
the peer ref counter and gets swapped out before it can decrement
the connecting counter. connd swaps in and cleans up the
connection where it sees a peer ref counter of 1 and a connecting
counter of 1. This will trigger the assert seen in LU-7210 when
it decrements the peer counter.
The solution: be sure to decrement the connecting counter
before decrementing the peer counter in the peer connect
failure path.
Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7210
Reviewed-on: http://review.whamcloud.com/17004
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Liang Zhen [Wed, 2 Mar 2016 23:53:26 +0000 (18:53 -0500)]
staging: lustre: take extra refcount in kiblnd_connreq_done
refcount taken by cmid is not reliable after kiblnd_connreq_done
released the glock because this connection is visible to other
threads, another thread can find and close this connection right
after kiblnd_connreq_done released the glock, if kiblnd_cm_callback
for RDMA_CM_EVENT_DISCONNECTED is called, it can release the
connection refcount taken by cmid. It means the connection could be
destroyed before kiblnd_connreq_done() finish operations on it.
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
ntel-bug-id: https://jira.hpdd.intel.com/browse/LU-7210
Reviewed-on: http://review.whamcloud.com/17527
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amir Shehata [Wed, 2 Mar 2016 23:53:25 +0000 (18:53 -0500)]
staging: lustre: make ko2iblnd connect parameters persistent
Store map-on-demand and peertx credits in the peer, since the peer
is persistent. Also made sure that when assigning the parameters
received on the connection to the peer structure through create,
that if another peer is added before grabbing the lock we assign
these parameters to it as well.
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3322
Reviewed-on: http://review.whamcloud.com/17074
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jeremy Filizetti [Wed, 2 Mar 2016 23:53:24 +0000 (18:53 -0500)]
staging: lustre: Support different ko2iblnd configs between systems
This patch adds suppoort for ko2iblnd to have different values for
peer_credits and map_on_demand between systems.
Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3322
Reviewed-on: http://review.whamcloud.com/11794
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Wed, 2 Mar 2016 19:16:37 +0000 (00:46 +0530)]
Staging: lustre: lnet: Remove and rename struct typedefs
Remove typedefs from structures stt_timer_t and lst_ping_data_t as typedef
for a structure type is not preferred. The suffix '_t' and the typedefs
are removed using coccinelle.
Script 1:
//Drop typedefs and '_t'
@r1@
type T;
@@
typedef struct { ... } T;
@script:python c1@
T2;
T << r1.T;
@@
if T[-2:] =="_t":
coccinelle.T2 = T[:-2];
print T
else:
coccinelle.T2=T;
@@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;
Script 2:
//Replacement
@@
typedef stt_timer_t;
typedef lst_ping_data_t;
@@
(
- stt_timer_t
+ struct stt_timer
|
- lst_ping_data_t
+ struct lst_ping_data
)
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Wed, 2 Mar 2016 20:02:14 +0000 (01:32 +0530)]
staging: lustre: llite: Remove unnecessary test in if condition
Remove unnecessary test on `rc` variable since it has already been
tested previously.
Fixes following smatch warning:
drivers/staging/lustre/lustre/llite/llite_lib.c:1331 ll_setattr_raw()
warn: we tested 'rc' before and it was 'false'
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amir Shehata [Wed, 2 Mar 2016 22:02:03 +0000 (17:02 -0500)]
staging: lustre: change ibh_mrs from array to pointer
With the removal of PMR we no longer require ibh_mrs field
to be a array so change it to a simple pointer.
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6850
Reviewed-on: http://review.whamcloud.com/15788
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Frank Zago [Wed, 2 Mar 2016 22:02:02 +0000 (17:02 -0500)]
staging: lustre: corrected some typos and grammar errors
Cleanup various typos and grammar errors.
Signed-off-by: Frank Zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5710
Reviewed-on: http://review.whamcloud.com/12201
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Frank Zago [Wed, 2 Mar 2016 22:02:01 +0000 (17:02 -0500)]
staging: lustre: make o2iblnd_cb.c local functions static
This reduces the code size by about 1KiB.
Signed-off-by: Frank Zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5396
Reviewed-on: http://review.whamcloud.com/11256
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Frank Zago [Wed, 2 Mar 2016 22:02:00 +0000 (17:02 -0500)]
staging: lustre: make o2iblnd local functions static
This fixes sparse warnings such as:
.../o2iblnd.c:424:1: warning: symbol 'kiblnd_get_peer_info' was not declared.
Should it be static?
This reduces the code size by 400 bytes.
The body of "the_o2iblnd" was moved at the end of the file,
to avoid having to declare some static prototypes.
Signed-off-by: Frank Zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5396
Reviewed-on: http://review.whamcloud.com/11255
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 2 Mar 2016 22:01:59 +0000 (17:01 -0500)]
staging: lustre: reverse LNet and infinband header order
LNet is an abstraction built on top of network APIs such
as infiniband or TCP/IP layer. Since LNet is dependent
on these other layers we should ensure LNet headers
should always come after the infiniband header since the
infiniband headers can influence the LNet header
definitions.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5140
Reviewed-on: http://review.whamcloud.com/10571
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Eremin [Wed, 2 Mar 2016 22:01:58 +0000 (17:01 -0500)]
staging: lustre: fix framework.c issues found by Klocwork Insight tool
The functions sfw_test_buffers() and sfw_unload_test() from LNet
selftest both assume sfw_test_instance_t being passed in is never
null. This is corrected here.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-on: http://review.whamcloud.com/9386
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Eremin [Wed, 2 Mar 2016 22:01:57 +0000 (17:01 -0500)]
staging: lustre: fix conctl.c issues found by Klocwork Insight tool
The function lst_test_add_ioctl is always copying lstio_tes_param
from userland even if the user doesn't send this data to LNet
selftest. Only consider lstio_tes_param data if lstio_tes_param_len
is not zero.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-on: http://review.whamcloud.com/9386
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Eremin [Wed, 2 Mar 2016 22:01:56 +0000 (17:01 -0500)]
staging: lustre: fix api-ni.c issues found by Klocwork Insight tool
Pointer 'ni' checked for NULL at line 1569 may be passed to
function and may be dereferenced there by passing argument 1 to
function 'lnet_ni_notify_locked' at line 1621.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-on: http://review.whamcloud.com/9386
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Eremin [Wed, 2 Mar 2016 22:01:55 +0000 (17:01 -0500)]
staging: lustre: fix socklnd issues found by Klocwork Insight tool
Null pointer 'best_iface' that comes from line 802 may be
dereferenced at line 832.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-on: http://review.whamcloud.com/9386
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 2 Mar 2016 22:01:54 +0000 (17:01 -0500)]
staging: lustre: bind socklnd peers to a specific CPT
Currently the socklnd driver doesn't support
CPT affinity for its peers. Binding peers to
a specific CPT and memory allocated to the
NUMA node belonging to the CPT should give a
performance boost.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7245
Reviewed-on: http://review.whamcloud.com/16710
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jian Yu [Wed, 2 Mar 2016 22:01:53 +0000 (17:01 -0500)]
staging: lustre: replace direct LNet HZ access with kernel APIs
On some customers' systems, the kernel was compiled with HZ defined
to 100, instead of 1000. This improves performance for HPC applications.
However, to use these systems with Lustre, customers have to re-build
Lustre for the kernel because Lustre directly uses the defined constant
HZ.
Since kernel 2.6.21, some non-HZ dependent timing APIs become non-
inline functions, which can be used in Lustre codes to replace the
direct HZ access.
These kernel APIs include:
jiffies_to_msecs()
jiffies_to_usecs()
jiffies_to_timespec()
msecs_to_jiffies()
usecs_to_jiffies()
timespec_to_jiffies()
And here are some samples of the replacement:
HZ -> msecs_to_jiffies(MSEC_PER_SEC)
n * HZ -> msecs_to_jiffies(n * MSEC_PER_SEC)
HZ / n -> msecs_to_jiffies(MSEC_PER_SEC / n)
n / HZ -> jiffies_to_msecs(n) / MSEC_PER_SEC
n / HZ * 1000 -> jiffies_to_msecs(n)
This patch replaces the direct HZ access in lnet module.
Signed-off-by: Jian Yu <jian.yu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5443
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Wed, 2 Mar 2016 22:01:52 +0000 (17:01 -0500)]
staging: lustre: set task state before scheduling in lnet_sock_accept
In the original code change when libcfs_sock_accept() was made
into lnet_sock_accept() a call to set_current_state(TASK_INTERRUPTIBLE)
got dropped which was restored. For upstream this is an
optimization of calling init_waitqueue_entry() only if
accept() return -EAGAIN. Also we can remove setting the
task to TASK_RUNNING that is not needed.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6407
Reviewed-on: http://review.whamcloud.com/14265
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sebastien Buisson [Wed, 2 Mar 2016 22:01:51 +0000 (17:01 -0500)]
staging: lustre: fix 'copy into fixed size buffer' errors
Fix 'copy into fixed size buffer' defects found by Coverity
version 6.0.3:
Copy into fixed size buffer (STRING_OVERFLOW)
The fixed-size string might be overrun by copying without
checking the length.
Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2074
Reviewed-on: http://review.whamcloud.com/4154
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alyona Romanenko [Wed, 2 Mar 2016 22:01:50 +0000 (17:01 -0500)]
staging: lustre: issue in the offset in lnet match hash table
the offset in hash table is overflowed for no wildcard portal.
The offset for no wildcard has been corrected as for wildcard
in the LU-1622
Signed-off-by: Alyona Romanenko <alyona.romanenko@seagate.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7774
Reviewed-on: http://review.whamcloud.com/18422
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Olaf Weber [Wed, 2 Mar 2016 22:01:49 +0000 (17:01 -0500)]
staging: lustre: Use after free in lnet_ptl_match_delay()
In lnet_ptl_match_delay() we check msg->msg_rx_delayed to see whether
the message has been added to the delay queue. But this check is done
after lnet_ptl_unlock() and lnet_res_unlock(), and the message can be
processed and freed before the check.
Replace the check with checking rc against LNET_MATCHMD_NONE, which
is how the callers of lnet_ptl_match_delay() know whether the message
was added to the delay queue. To make this work we reset rc in the
loop when there was no match and the message hasn't been delayed. In
addition reorganize the code and add comments to clarify the logic.
In lnet_ptl_match_md() a similar msg->msg_rx_delayed is replaced for
the same reason.
Signed-off-by: Olaf Weber <olaf@sgi.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7324
Reviewed-on: http://review.whamcloud.com/17840
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Li Xi [Wed, 2 Mar 2016 22:01:48 +0000 (17:01 -0500)]
staging: lustre: remove annoying message in parse_nidrange
When setting TBF rules of jobid, parse_nidrange() prints warning
messages. However, this is unnecessary and annoying since paring
a TBF rule will always try to parse the jobid like a nid.
Signed-off-by: Li Xi <lixi@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7647
Reviewed-on: http://review.whamcloud.com/17916
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 2 Mar 2016 22:01:47 +0000 (17:01 -0500)]
staging: lustre: return proper error code for LNet core
It is consider bad style in the linux kernel to
return -1 or a positive number for an error.
Instead return the appropriate error codes.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: http://review.whamcloud.com/17626
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amir Shehata [Wed, 2 Mar 2016 22:01:46 +0000 (17:01 -0500)]
staging: lustre: Ignore hops if not explicitly set
Since the # of hops is not a mandatory parameter the LU-6060
patch will cause problems to already existing systems since it
changes the behavior by which a route is determined down.
To fix this case the # of hops now defaults to LNET_UNDEFINED_HOPS
if no hop count is specified.
LNET_UNDEFINED_HOPS is defined to ((__u32)-1). When it's printed as
%d, it displays as -1.
__u32 is used through out the call stack for hop count to explicitly
define the size of the hop count and to avoid any sizing issues when
passing data to and from the kernel.
To keep existing behavior both lnet_compare_routes() and LNetDist()
will treat undefined hop count as hop count 1.
When executing the logic in lnet_parse_rc_info() there is no
longer an assumption that the default hop count is 1. If
the hop count is 1 then it must've been explicitly set by
the user.
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6851
Reviewed-on: http://review.whamcloud.com/15719
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Liang Zhen [Wed, 2 Mar 2016 22:01:45 +0000 (17:01 -0500)]
staging: lustre: recv could access freed message
When lnet_parse_put calls lnet_ptl_match_md, this function can attach
current message on the delayed list if there is no match. It means
this message can be taken over and freed by another thread who is
posting new MD, then it is not safe for caller of lnet_parse_put to
check this message again.
This patch fixes this issue by adding a local variable "ready_delay"
to store corresponding status of lnet_msg, so lnet doesn't need to
check the message again if lnet_ptl_match_md returned MATCH_NONE for
it.
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7324
Reviewed-on: http://review.whamcloud.com/17065
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This page took 0.047089 seconds and 5 git commands to generate.