Dennis Dalessandro [Wed, 11 Nov 2015 05:34:37 +0000 (00:34 -0500)]
staging/rdma/hfi1: Reduce number of parameters passed to send handlers
The current send function handlers are passed a bunch of parameters that are
already part of the data structure that is passed in first (qp). This patch
removes all of this and just passes the QP.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Marciniszyn [Tue, 10 Nov 2015 14:14:01 +0000 (09:14 -0500)]
staging/rdma/hfi1: add ACK coalescing logic
Implement ACK coalesing logic using a 8 bit counter.
The algorithm is send pio ack when:
- fecn present
- this is the first packet in an interrupt session
- counter is >= HFI1_PSN_CREDIT
Otherwise the ack is defered.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Marciniszyn [Tue, 10 Nov 2015 14:13:55 +0000 (09:13 -0500)]
staging/rdma/hfi1: add common routine for queuing acks
This patch is a prelimary patch required to
coalesce acks.
The routine to "schedule" a QP for sending a NAK is
now centralized in rc_defer_ack(). The flag is changed
for clarity since the all acks will potentially use
the deferral mechanism.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark F. Brown [Tue, 10 Nov 2015 00:18:20 +0000 (19:18 -0500)]
staging/rdma/hfi1: Workaround to prevent corruption during packet delivery
Disabling one receive context when RX_DMA is receiving a packet can cause
incorrect packet delivery for a subsequent packet on another receive
context.
This is resolved by doing the following:
1. Programming dummy tail address for every receive context
before enabling it
2. While deallocating receive context resetting tail address
to dummy address
3. Leaving the dummy address in when disabling tail update
4. When disabling receive context leaving tail update enabled
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Mark F. Brown <mark.f.brown@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Marciniszyn [Tue, 10 Nov 2015 00:13:59 +0000 (19:13 -0500)]
staging/rdma/hfi1: pre-compute sc and sde for RC/UC QPs
Now that we have a multi-threaded work queue we precomputed and store the SC
and SDE on RC and UC QPs for faster access.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Marciniszyn [Tue, 10 Nov 2015 00:13:58 +0000 (19:13 -0500)]
staging/rdma/hfi1: Use parallel workqueue for SDMA engines
The workqueue is currently single threaded per port which for a small number of
SDMA engines is ok.
For hfi1, the there are up to 16 SDMA engines that can be fed descriptors in
parallel.
Use alloc_workqueue with a workqueue limit of the number of sdma engines and
with WQ_CPU_INTENSIVE and WQ_HIGHPRI specified.
Then change send to use the new scheduler which no longer needs to get the
s_lock
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Marciniszyn [Tue, 10 Nov 2015 00:13:57 +0000 (19:13 -0500)]
staging/rdma/hfi1: move hfi1_migrate_qp
Move hfi1_migrate_qp from ruc.c to qp.[hc] in prep for modifying the QP
workqueue.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Geliang Tang [Sun, 8 Nov 2015 14:17:52 +0000 (22:17 +0800)]
staging: rdma: use kmalloc_array instead of kmalloc
Use kmalloc_array instead of kmalloc to allocate memory for an array.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Sat, 7 Nov 2015 20:12:03 +0000 (01:42 +0530)]
staging: rdma: amso1100: Remove unnecessary variables
Remove unnecessary variable 'err' from functions c2_reject() and
c2_service_destroy() since it can be replaced by a single line of
code instead.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Othmar Pasteka [Mon, 16 Nov 2015 22:29:44 +0000 (23:29 +0100)]
staging: vt6656: remove address from GPL text
Cleanup errors from checkpatch.pl.
Signed-off-by: Othmar Pasteka <pasteka@kabsi.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:35:00 +0000 (13:35 -0500)]
staging: unisys: fix vbuschannel.h comments
Fixes trailling */ from vbuschannel.h and alignment issue on the
same comment block
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:59 +0000 (13:34 -0500)]
staging: unisys: controlvmcompletionstatus.h fix block comments
This patch fixes the checkpatch warning messages in
controlvmcompletionstatus.h. All the warning messages in this file are
caused by "Block comments use atrailing */ on a separate line"
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:58 +0000 (13:34 -0500)]
staging: unisys: Fix periodic_work.c parenthesis alignment
This patch fixes checkpatch.pl message:
CHECK: Alignment should match open parenthesis
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:57 +0000 (13:34 -0500)]
staging: unisys: Fix channel.h Block comments
This patch fixes all the checkpatch.pl block commments that use a
trailing */ in channel.h
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:56 +0000 (13:34 -0500)]
staging: unisys: Fix vmcallerinterface.h block comments
This patch fixes all the checkpatch Block comments use a trailing
*/ while keeping comments clean.
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:55 +0000 (13:34 -0500)]
staging: unisys: Fix visorchannel.c block comments
This patch fixes the last checkpatch warning about:
Block comments use a trailing */ on a separate line
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:53 +0000 (13:34 -0500)]
staging: unisys: vbushelper.h fix Block comment
This patch fixes last checkpatch warning for vbushelper.h
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:52 +0000 (13:34 -0500)]
staging: unisys: visorbus.h fix block comment
This fixes last checkpatch warning:
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:51 +0000 (13:34 -0500)]
staging: unisys: iochannel fix trailing */
Fixed last warning message from checkpatch.pl by removing the
wordiness of the comment
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:50 +0000 (13:34 -0500)]
staging: unisys: iochannel fix spacing around operators
This patch fixes check warning from checkpatch.pl in the macro definition
CHECK: spaces preferred around that '+' (ctx:VxV)
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:49 +0000 (13:34 -0500)]
staging: unisys: iochannel.h remove redundant comments
iochannel cleanup redudant comments in function declarations.
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 17 Nov 2015 18:34:48 +0000 (13:34 -0500)]
staging: unisys: iochannel fix block comments
This patch fixes warning messages from checkpatch.pl specifically:
WARNING: Block comments use a trailing */ on a separate lines
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Mon, 16 Nov 2015 14:46:46 +0000 (20:16 +0530)]
staging: unisys: return error value directly
In case of error we are jumping to err_del_scsipending_ent and always
returning SCSI_MLQUEUE_DEVICE_BUSY from error path. We donot need a
variable to return a fixed error value, it can be returned directly.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Mon, 16 Nov 2015 14:46:45 +0000 (20:16 +0530)]
staging: unisys: remove unused variable
The variables op, sd and zmotion were never being used.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gavin O'Leary [Tue, 10 Nov 2015 04:12:00 +0000 (20:12 -0800)]
staging: unisys: visorbus: visorbus_main.c: made checkpatch warning-free
Made visorbus_main.c checkpatch warning-free by fixing the comment style
issues.
Signed-off-by: Gavin O'Leary <gavinoleary3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Thu, 5 Nov 2015 14:05:36 +0000 (19:35 +0530)]
Staging: fwserial: Declare fwtty_port_put as static
Declare the function fwtty_port_put as static since it is used
only in this particular file. Also remove the corresponding
declaration from header file.
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dean Luick [Sat, 7 Nov 2015 01:07:04 +0000 (20:07 -0500)]
staging/rdma/hfi1: use one-shot LCB write
Use the one-shot LCB write implemented in the 8051 firmware.
This speeds up 8051 LCB writes by 2x. Use old method for older
firmwares.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ignacio Hernandez [Sat, 7 Nov 2015 01:07:03 +0000 (20:07 -0500)]
staging/rdma/hfi1: Remove spurious error messages
Changed the order in which diagnostics messages are printed,
taking into account the cases where the errors are handled in
rcv_hdrerr() and no further message is needed to report.
Reviewed-by: Mark Debbage <mark.debbage@intel.com>
Reviewed-by: Arthur Kepner <arthur.kepner@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Ignacio Hernandez <ignacio.hernandez@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sebastian Sanchez [Sat, 7 Nov 2015 01:07:02 +0000 (20:07 -0500)]
staging/rdma/hfi1: Fix for opaportconfig ledon by not checking for portNum
opaportconfig ledon fails with error message due to port
number being checked in the attr modifier. This change
removes the check for the port number in AttrMod, so the
P field is ignored.
Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dean Luick [Sat, 7 Nov 2015 01:07:01 +0000 (20:07 -0500)]
staging/rdma/hfi1: Select only devices with active links
When looking for or validating a user device, only use devices
that are currently active.
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jareer Abdel-Qader [Sat, 7 Nov 2015 01:07:00 +0000 (20:07 -0500)]
staging/rdma/hfi1: Disable thermal polling before sensor initialization
During driver load the thermal sensor needs to be reset prior
to initialization of the sensor. This prevents a possible sensor lock
up which can cause the wrong temperature value to be reported.
This fix leads to remove disabling thermal polling from
reset_asic_csrs() function.
Reviewed by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Jareer Abdel-Qader <jareer.h.abdel-qader@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dean Luick [Sat, 7 Nov 2015 01:06:59 +0000 (20:06 -0500)]
staging/rdma/hfi1: Always download SBus firmware
B0 dual port parts require the SBus firmware to always be
downloaded.
Remove reset of the SBus Master spico. It is not necessary
since the SBus firmware download already does that.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vennila Megavannan [Sat, 7 Nov 2015 01:06:58 +0000 (20:06 -0500)]
staging/rdma/hfi1: Enable WFR PCIe extended tags from the driver
Some BIOS implementations turn off extended tags in DevCtl (a RW
field) even though it was originally set and is advertised in DevCap
Fix is to set it in the driver
Reviewed-by: Dean Luick <dean.luick@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Vennila Megavannan <vennila.megavannan@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Easwar Hariharan [Sat, 7 Nov 2015 01:06:57 +0000 (20:06 -0500)]
staging/rdma/hfi1: Clear the QSFP reset that is asserted on FLR
The FLR on driver load asserts the QSFP reset pin and the driver does
not deassert it after. This patch allows the external QSFP cable to exit
reset by writing 1 to all the QSFP pins.
Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sebastian Sanchez [Sat, 7 Nov 2015 01:06:56 +0000 (20:06 -0500)]
staging/rdma/hfi1: Convert dd_dev_info() to hfi1_cdbg() in process startup
Replacing dd_dev_info() for hfi1_cdbg() to avoid generating syslog
output for every context that is open by PSM.
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Markus Elfring [Thu, 5 Nov 2015 13:34:43 +0000 (14:34 +0100)]
staging: most: Delete an unnecessary check before the function call "module_put"
The module_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:17 +0000 (22:59 +0900)]
staging: most: rename DIM_EnqueueBuffer to dim_enqueue_buffer
This patch renames DIM_EnqueueBuffer to dim_enqueue_buffer to avoid
camelcase found by checkpatch.
CHECK: Avoid CamelCase: <DIM_EnqueueBuffer>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:877:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:16 +0000 (22:59 +0900)]
staging: most: rename DIM_GetChannelState to dim_get_channel_state
This patch renames DIM_GetChannelState to dim_get_channel_state to avoid
camelcase found by checkpatch.
CHECK: Avoid CamelCase: <DIM_GetChannelState>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:865:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:15 +0000 (22:59 +0900)]
staging: most: fix argument name of DIM_GetChannelState
The second argument name of DIM_GetChannelState declaration changes from
dim_ch_state_ptr to state_ptr. The DIM_GetChannelState declaration and
definition has same argument name as state_ptr.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:14 +0000 (22:59 +0900)]
staging: most: rename DIM_ServiceChannel to dim_service_channel
This patch renames DIM_ServiceChannel to dim_service_channel to avoid
camelcase found by checkpatch.
CHECK: Avoid CamelCase: <DIM_ServiceChannel>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:857:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:13 +0000 (22:59 +0900)]
staging: most: rename DIM_ServiceIrq to dim_service_irq
This patch renames DIM_ServiceIrq to dim_service_irq to avoid camelcase
found by checkpatch.
CHECK: Avoid CamelCase: <DIM_ServiceIrq>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:819:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:12 +0000 (22:59 +0900)]
staging: most: rename DIM_DestroyChannel to dim_destroy_channel
This patch renames DIM_DestroyChannel to dim_destroy_channel to avoid
camelcase found by checkpatch.
CHECK: Avoid CamelCase: <DIM_DestroyChannel>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:806:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:11 +0000 (22:59 +0900)]
staging: most: rename DIM_InitSync to dim_init_sync
This patch renames DIM_InitSync to dim_init_sync to avoid camelcase
found by checkpatch.
CHECK: Avoid CamelCase: <DIM_InitSync>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:781:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:10 +0000 (22:59 +0900)]
staging: most: rename DIM_InitIsoc to dim_init_isoc
This patch renames DIM_InitIsoc to dim_init_isoc to avoid camelcase
found by checkpatch.
CHECK: Avoid CamelCase: <DIM_InitIsoc>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:756:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:09 +0000 (22:59 +0900)]
staging: most: rename DIM_InitAsync to dim_init_async
This patch renames DIM_InitAsync to dim_init_async to avoid camelcase
found by checkpatch.
CHECK: Avoid CamelCase: <DIM_InitAsync>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:749:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:08 +0000 (22:59 +0900)]
staging: most: rename DIM_InitControl to dim_init_control
This patch renames DIM_InitControl to dim_init_control to avoid
camelcase found by checkpatch.
CHECK: Avoid CamelCase: <DIM_InitControl>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:742:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:07 +0000 (22:59 +0900)]
staging: most: rename DIM_NormSyncBufferSize to dim_norm_sync_buffer_size
This patch renames DIM_NormSyncBufferSize to dim_norm_sync_buffer_size
to avoid camelcase found by checkpatch.
CHECK: Avoid CamelCase: <DIM_NormSyncBufferSize>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:734:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:06 +0000 (22:59 +0900)]
staging: most: rename DIM_NormIsocBufferSize to dim_norm_isoc_buffer_size
This patch renames DIM_NormIsocBufferSize to dim_norm_isoc_buffer_size
to avoid camelcase found by checkpatch.
CHECK: Avoid CamelCase: <DIM_NormIsocBufferSize>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:720:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:05 +0000 (22:59 +0900)]
staging: most: rename DIM_NormCtrlAsyncBufferSize to dim_norm_ctrl_async_buffer_size
This patch renames DIM_NormCtrlAsyncBufferSize to
dim_norm_ctrl_async_buffer_size to avoid camelcase found by checkpatch
CHECK: Avoid CamelCase: <DIM_NormCtrlAsyncBufferSize>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:709:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:04 +0000 (22:59 +0900)]
staging: most: rename DIMCB_IoRead to dimcb_io_read
This patch renames DIMCB_IoRead to dimcb_io_read to avoid camelcase
found by checkpatch.
CHECK: Avoid CamelCase: <DIMCB_IoRead>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:157:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:03 +0000 (22:59 +0900)]
staging: most: rename DIMCB_IoWrite to dimcb_io_write
This patch renames DIMCB_IoWrite to dimcb_io_write to avoid camelcase
found by checkpatch.
CHECK: Avoid CamelCase: <DIMCB_IoWrite>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:154:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:02 +0000 (22:59 +0900)]
staging: most: rename DIMCB_OnError to dimcb_on_error
This patch renames DIMCB_OnError to dimcb_on_error to avoid camelcase
found by checkpatch.
CHECK: Avoid CamelCase: <DIMCB_OnError>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:77:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Mon, 2 Nov 2015 13:59:01 +0000 (22:59 +0900)]
staging: most: rename DIM_GetLockState to dim_get_lock_state
This patch renames DIM_GetLockState to dim_get_lock_state to avoid
camelcase found by checkpatch.
CHECK: Avoid CamelCase: <DIM_GetLockState>
FILE: drivers/staging/most/hdm-dim2/dim2_hdm.c:131:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 29 Oct 2015 07:44:13 +0000 (16:44 +0900)]
staging: most: rename DIM_DetachBuffers to dim_detach_buffers
This patch renames DIM_DetachBuffers to dim_detach_buffers to avoid
camelcase found by checkpatch.
CHECK: Avoid CamelCase: <DIM_DetachBuffers>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:886:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 29 Oct 2015 07:44:12 +0000 (16:44 +0900)]
staging: most: rename DIM_Shutdown to dim_shutdown
This patch renames DIM_Shutdown to dim_shutdown to avoid camelcase
found by checkpatch.
CHECK: Avoid CamelCase: <DIM_Shutdown>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:676:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 29 Oct 2015 07:44:11 +0000 (16:44 +0900)]
staging: most: rename DIM_Startup to dim_startup
This patch renames DIM_Startup to dim_startup to avoid camelcase
found by checkpatch.
CHECK: Avoid CamelCase: <DIM_Startup>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:653:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 29 Oct 2015 07:44:10 +0000 (16:44 +0900)]
staging: most: add spaces preferred around that '<<'
This patch adds space around '<<' found by checkpatch.
CHECK: spaces preferred around that '<<' (ctx:VxV)
FILE: drivers/staging/most/hdm-dim2/dim2_reg.h:69:
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 29 Oct 2015 07:44:09 +0000 (16:44 +0900)]
staging: most: remove blank line after an open brace
This patch removes blank line after an open brace found by checkpatch.
CHECK: Blank lines aren't necessary after an open brace '{'
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 29 Oct 2015 07:44:08 +0000 (16:44 +0900)]
staging: most: remove multiple blank lines
This patch removes multiple blank lines found by checkpatch.
CHECK: Please don't use multiple blank lines
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Fri, 6 Nov 2015 15:20:17 +0000 (22:20 +0700)]
staging: rtl8188eu: goto removed
malloc error handling moved into one place.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Fri, 6 Nov 2015 15:17:29 +0000 (22:17 +0700)]
staging: rtl8188eu: goto replaced by 'else' branch
goto is not needed here.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Thu, 5 Nov 2015 09:58:56 +0000 (16:58 +0700)]
staging: rtl8188eu: unused macros removed
IS_* and GET_CVID_* macros have not been used.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Thu, 5 Nov 2015 09:56:38 +0000 (16:56 +0700)]
staging: rtl8188eu: rarely used macros replaced by their definitions
IS_* macros (except one) occur only once.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Wed, 4 Nov 2015 11:58:41 +0000 (18:58 +0700)]
staging: rtl8188eu: for loop instead of while loop used
The range of elements to fill with zeros is determined by using a roundup macro
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:54:45 +0000 (16:54 +0700)]
staging: rtl8188eu: offset renamed to write_address
This name is better suited for this variable.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:54:28 +0000 (16:54 +0700)]
staging: rtl8188eu: pu4BytePtr renamed to dword_buffer
This name is better suited for this variable.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:54:10 +0000 (16:54 +0700)]
staging: rtl8188eu: buf_ptr renamed to byte_buffer
This name is better suited for this variable.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:53:43 +0000 (16:53 +0700)]
staging: rtl8188eu: unnessesary braces for single statement block removed
checkpatch fix:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:52:23 +0000 (16:52 +0700)]
staging: rtl8188eu: unnecessary initialization removed
It is superfluous.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:51:47 +0000 (16:51 +0700)]
staging: rtl8188eu: types of local variables conformed with types of function arguments
The array should not change in any case.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:51:11 +0000 (16:51 +0700)]
staging: rtl8188eu: buf_ptr variable completely defined in a single line
It is simpler.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:49:13 +0000 (16:49 +0700)]
staging: rtl8188eu: offset increment placed into for loop header
It makes the code little easier.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:48:22 +0000 (16:48 +0700)]
staging: rtl8188eu: unnecessary branching removed
If the 'remain' is zero, the loop is not executed at all.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:47:32 +0000 (16:47 +0700)]
staging: rtl8188eu: unnecessary variable override removed
Variable value calculated in the previous loop.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:46:53 +0000 (16:46 +0700)]
staging: rtl8188eu: offset variable replaced by its value
It is now possible to get rid of re-initializing the offset variable.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:46:08 +0000 (16:46 +0700)]
staging: rtl8188eu: initial value placed in the variable
Line become shorter.
After the loop offset variable points to the location following insertion.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:45:00 +0000 (16:45 +0700)]
staging: rtl8188eu: assigning a value to the variable is replaced by the increment
It is made to the initial value could be placed in the offset variable.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Tue, 3 Nov 2015 09:43:53 +0000 (16:43 +0700)]
staging: rtl8188eu: *(ptr + i) replaced by ptr[i] in _rtl88e_fw_block_write
It is better to read.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Abdul Hussain [Tue, 3 Nov 2015 05:30:56 +0000 (05:30 +0000)]
Staging: rtl8188eu: fix space prohibited before that ','
This patch fixes the following checkpatch.pl error:
fix space prohibited before that ','
Signed-off-by: Abdul Hussain <hussain.abdul@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 2 Nov 2015 17:16:53 +0000 (00:16 +0700)]
staging: rtl8188eu: 'infinite' loop removed
The body of this loop is executed only once, so it can be removed.
In this loop no keyword 'continue', only 'break' at the end.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 2 Nov 2015 17:16:28 +0000 (00:16 +0700)]
staging: rtl8188eu: while loop replaced by for loop
Here is more suitable for loop.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Mon, 2 Nov 2015 17:16:09 +0000 (00:16 +0700)]
staging: rtl8188eu: do .. while (0) loop replaced by while (...) loop
It is a simple and clear representation of this loop.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rémy Oudompheng [Mon, 2 Nov 2015 10:43:09 +0000 (11:43 +0100)]
staging: rtl8188eu: add missing delay in polling loops.
Previously the code could exit with failure too early.
Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rémy Oudompheng [Mon, 2 Nov 2015 10:39:22 +0000 (11:39 +0100)]
staging: rtl8188eu: jiffies are unsigned long
Remove rtw_get_passing_time_ms function and adjust type
of relevant variables.
Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Fri, 6 Nov 2015 17:44:32 +0000 (23:14 +0530)]
Staging: lustre: ldlm_pool: Drop unneeded wrapper function
Remove the function ldlm_pool_set_limit() and replace its calls with the
function it wrapped.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Fri, 6 Nov 2015 17:43:56 +0000 (23:13 +0530)]
Staging: lustre: ldlm_pool: Drop wrapper function
Remove the function ldlm_pool_get_limit() and replace its calls with the
function it wrapped.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Fri, 6 Nov 2015 17:43:19 +0000 (23:13 +0530)]
Staging: lustre: ldlm_pool: Remove unneeded wrapper function
Remove the function ldlm_pl2ns() and replace its calls with the function
it wrapped.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Fri, 6 Nov 2015 17:19:43 +0000 (22:49 +0530)]
Staging: lustre: tracefile: Remove function prototype
Remove the prototype of function cfs_trace_free_string_buffer() as it is
no longer needed.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Fri, 6 Nov 2015 17:19:07 +0000 (22:49 +0530)]
Staging: lustre: tracefile: Remove wrapper function
Remove the function cfs_trace_free_string_buffer() as it can be replaced
with the standard function kfree().
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Fri, 6 Nov 2015 17:18:29 +0000 (22:48 +0530)]
Staging: lustre: module: Replace function calls
Replace the calls of function cfs_trace_free_string_buffer() with
kfree() as the former function is not required.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Fri, 6 Nov 2015 16:55:29 +0000 (22:25 +0530)]
Staging: lustre: dir: Remove wrapper function
Remove the function ll_check_page() and replace all its calls with the
function it wrapped.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Amitoj Kaur Chawla [Fri, 6 Nov 2015 14:56:52 +0000 (20:26 +0530)]
staging: lustre: lnet: klnds: socklnd: Move extern declarations to header
This patch moves extern declarations in socklnd_lib.c to the respective
header file, 'socklnd.h'.
This patch also removes extern keyword from function declarations
since functions have the extern specifier by default.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Markus Elfring [Thu, 5 Nov 2015 09:55:16 +0000 (10:55 +0100)]
staging: lustre: Delete an unnecessary variable initialisation in class_register_type()
The variable "rc" will be eventually set to an error return code in the
class_register_type() function.
Thus let us omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sebastien Buisson [Wed, 4 Nov 2015 18:40:06 +0000 (13:40 -0500)]
staging: lustre: fix 'error handling' issues for libcfs workitem.c
Fix 'error handling' issues found by Coverity version 6.5.1:
Unchecked return value (CHECKED_RETURN)
Calling function without checking return value.
Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3427
Reviewed-on: http://review.whamcloud.com/7103
Reviewed-by: Bobbie Lind <bobbie.j.lind@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 [Wed, 4 Nov 2015 18:40:05 +0000 (13:40 -0500)]
staging: lustre: remove page_collection::pc_lock in libcfs
page_collection::pc_lock is supposed to protect race between
functions called by smp_call_function(), however we don't have
this use-case for ages and page_collection only lives in stack
of thread, so it is safe to remove it.
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3055
Reviewed-on: http://review.whamcloud.com/7660
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fan Yong [Wed, 4 Nov 2015 18:40:04 +0000 (13:40 -0500)]
staging: lustre: race condition for check/use cfs_fail_val
There are some race conditions when check/use cfs_fail_val.
For example: when inject failure stub for LFSCK test as following:
764 if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_DELAY2) &&
765 cfs_fail_val > 0) {
766 struct l_wait_info lwi;
767
768 lwi = LWI_TIMEOUT(cfs_time_seconds(cfs_fail_val),
769 NULL, NULL);
770 l_wait_event(thread->t_ctl_waitq,
771 !thread_is_running(thread),
772 &lwi);
773
774 if (unlikely(!thread_is_running(thread))) {
775 CDEBUG(D_LFSCK, "%s: scan dir exit for engine "
776 "stop, parent "DFID", cookie "LPX64"n",
777 lfsck_lfsck2name(lfsck),
778 PFID(lfsck_dto2fid(dir)),
779 lfsck->li_cookie_dir);
780 RETURN(0);
781 }
782 }
The "cfs_fail_val" may be changed as zero by others after the check
at the line 765 but before using it at the line 768. Then the LFSCK
engine will fall into "wait" until someone run "lfsck_stop".
Signed-off-by: Fan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6146
Reviewed-on: http://review.whamcloud.com/13481
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 4 Nov 2015 18:40:02 +0000 (13:40 -0500)]
staging: lustre: Update module author to OpenSFS
The modinfo data has gone stale for the author information.
This patch changes all the MODULE_AUTHOR to OpenSFS.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6204
Reviewed-on: http://review.whamcloud.com/16132
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@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>
Dmitry Eremin [Wed, 4 Nov 2015 18:40:01 +0000 (13:40 -0500)]
staging: lustre: Fix possible NULL pointer dereference in lprocfs_status.c
The imp->imp_connection really could be NULL, we better check for it
before dereferencing it in taht call to libcfs_nid2str_r.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6507
Reviewed-on: http://review.whamcloud.com/14808
Reviewed-by: Bob Glossman <bob.glossman@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>
Dmitry Eremin [Wed, 4 Nov 2015 18:40:00 +0000 (13:40 -0500)]
staging: lustre: fix buffer overflow of string buffer
Buffer overflow of string buffer due to non null terminated string.
Use strlcpy() when it's justifiable.
Use sizeof(var) instead of constants.
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/9389
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
frank zago [Wed, 4 Nov 2015 18:39:59 +0000 (13:39 -0500)]
staging: lustre: remove libcfs_debug_set_level prototype from libcfs_private.h
The function libcfs_debug_set_level is used only internally so no reason
to expose it in libcfs_private.h. This is broken out from LU-5829 patch
http://review.whamcloud.com/13319.
Signed-off-by: frank zago <fzago@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>