openwrt/staging/blogic.git
9 years agostaging: lustre: change cfs_hash_ops_t to struct
James Simmons [Wed, 28 Oct 2015 16:54:24 +0000 (12:54 -0400)]
staging: lustre: change cfs_hash_ops_t to struct

Change cfs_hash_ops_t to struct cfs_hash_ops.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: change cfs_hash_hlist_ops_t to struct
James Simmons [Wed, 28 Oct 2015 16:54:23 +0000 (12:54 -0400)]
staging: lustre: change cfs_hash_hlist_ops_t to struct

Change cfs_hash_hlist_ops_t to struct cfs_hash_hlist_ops.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: change cfs_hash_lock_ops_t to struct
James Simmons [Wed, 28 Oct 2015 16:54:22 +0000 (12:54 -0400)]
staging: lustre: change cfs_hash_lock_ops_t to struct

Change cfs_hash_lock_ops_t to struct cfs_hash_lock_ops.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Remove unused lustre_lfsck_user.h file
Shraddha Barke [Tue, 27 Oct 2015 15:53:46 +0000 (21:23 +0530)]
Staging: lustre: Remove unused lustre_lfsck_user.h file

Remove the header file lustre_lfsck_user.h since it is not needed

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: rtl871x_io: Remove unused function
Amitoj Kaur Chawla [Wed, 28 Oct 2015 19:08:44 +0000 (00:38 +0530)]
staging: rtl8712: rtl871x_io: Remove unused function

Drop function that is declared but not called anywhere.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: Remove unnecessary functions
Amitoj Kaur Chawla [Tue, 27 Oct 2015 08:32:37 +0000 (14:02 +0530)]
staging: rtl8723au: core: Remove unnecessary functions

Drop functions that are declared but are not being used anywhere.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wlan-ng: Remove unused p80211meta.h file
Shraddha Barke [Wed, 28 Oct 2015 13:07:20 +0000 (18:37 +0530)]
Staging: wlan-ng: Remove unused p80211meta.h file

Remove the header file p80211meta.h since it is not needed

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iio: adc: Fix sparse warning
Ksenija Stanojevic [Tue, 27 Oct 2015 23:08:37 +0000 (16:08 -0700)]
Staging: iio: adc: Fix sparse warning

Fix following sparse endianness problems:

  CHECK   drivers/staging/iio/adc/ad7816.c
drivers/staging/iio/adc/ad7816.c:91:17: warning: cast to restricted
__be16
drivers/staging/iio/adc/ad7816.c:91:17: warning: cast to restricted
__be16
drivers/staging/iio/adc/ad7816.c:91:17: warning: cast to restricted
__be16
drivers/staging/iio/adc/ad7816.c:91:17: warning: cast to restricted
__be16

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iio: impedance-analyzer: Fix sparse warning
Ksenija Stanojevic [Tue, 27 Oct 2015 23:07:54 +0000 (16:07 -0700)]
Staging: iio: impedance-analyzer: Fix sparse warning

Fix following sparse endian warning:

drivers/staging/iio/impedance-analyzer/ad5933.c:671:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:671:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:671:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:671:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:672:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:672:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:672:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:672:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:674:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:674:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:674:34: warning: cast to restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:674:34: warning: cast to restricted __be16

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: panel: Logical continuations should be on the previous line
Sirnam Swetha [Tue, 27 Oct 2015 09:26:13 +0000 (14:56 +0530)]
Staging: panel: Logical continuations should be on the previous line

This patch fixes the checkpatch issue:

CHECK: Logical continuations should be on the previous line

Signed-off-by: Sirnam Swetha <theonly.ultimate@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: panel: usleep_range is preferred over udelay
Sirnam Swetha [Tue, 27 Oct 2015 09:25:46 +0000 (14:55 +0530)]
Staging: panel: usleep_range is preferred over udelay

This patch fixes the issue:

CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt

Signed-off-by: Sirnam Swetha <theonly.ultimate@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: panel: Removing multiple blank lines
Sirnam Swetha [Tue, 27 Oct 2015 09:25:15 +0000 (14:55 +0530)]
Staging: panel: Removing multiple blank lines

This patch fixes the checkpatch issue

CHECK: Please don't use multiple blank lines

Signed-off-by: Sirnam Swetha <theonly.ultimate@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: panel: spaces preferred around that '/'
Sirnam Swetha [Tue, 27 Oct 2015 09:24:51 +0000 (14:54 +0530)]
Staging: panel: spaces preferred around that '/'

This patch fixes the checkpatch issue:

CHECK: spaces preferred around that '/'

Signed-off-by: Sirnam Swetha <theonly.ultimate@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Update driver version string to 0.9-294
Jubin John [Mon, 26 Oct 2015 14:28:49 +0000 (10:28 -0400)]
staging/rdma/hfi1: Update driver version string to 0.9-294

Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: add additional rc traces
Mike Marciniszyn [Mon, 26 Oct 2015 14:28:48 +0000 (10:28 -0400)]
staging/rdma/hfi1: add additional rc traces

Add additional rc traces to aid in debugging rc retry logic.

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>
9 years agostaging/rdma/hfi1: Add unit # to verbs txreq cache name
Jubin John [Mon, 26 Oct 2015 14:28:47 +0000 (10:28 -0400)]
staging/rdma/hfi1: Add unit # to verbs txreq cache name

The name used to create the verbs txreq cache was not qualified with the unit
number. This causes a panic when destroying the cache on a dual HFI systems.
Create a unique name with the unit number with this patch

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Load SBus firmware once per ASIC
Easwar Hariharan [Mon, 26 Oct 2015 14:28:46 +0000 (10:28 -0400)]
staging/rdma/hfi1: Load SBus firmware once per ASIC

Using fw_sbus_load to control SBus firmware load doesn't scale across multiple
HFI1 cards in a single system. This patch ensures that the SBus firmware is
loaded once per ASIC.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Thread the receive interrupt.
Dean Luick [Mon, 26 Oct 2015 14:28:44 +0000 (10:28 -0400)]
staging/rdma/hfi1: Thread the receive interrupt.

When under heavy load, the receive interrupt handler can run too long with IRQs
disabled.  Add a mixed-mode threading scheme.  Initially process packets in the
handler for quick responses (latency).  If there are too many packets to
process move to a thread to continue (bandwidth).

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Add irqsaves in the packet processing path
Dean Luick [Mon, 26 Oct 2015 14:28:43 +0000 (10:28 -0400)]
staging/rdma/hfi1: Add irqsaves in the packet processing path

In preparation for threading the receive interrupt, add irqsaves in the packet
processing path.

When the receive interrupt is threaded, the packet processing path is no longer
guaranteed to have IRQs disabled.  Add irqsaves where needed on several locks
in the packet processing path.  Anything that did not have an obvious, "close"
irqsave in its caller is a candidate.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Increase SDMA descriptor queue size
Ignacio Hernandez [Mon, 26 Oct 2015 14:28:42 +0000 (10:28 -0400)]
staging/rdma/hfi1: Increase SDMA descriptor queue size

A value of 2048 increased PSM performance while not impacting verbs
performance.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Ignacio Hernandez <ignacio.hernandez@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Allow tuning of SDMA interrupt rate
Mitko Haralanov [Mon, 26 Oct 2015 14:28:41 +0000 (10:28 -0400)]
staging/rdma/hfi1: Allow tuning of SDMA interrupt rate

The SDMA engines were configured to generate progress interrupts every time they
processed N/2 descriptors (where N is the size of the descriptor queue). This
interval was too infrequent, leading to degraded performance.

This commit adds a module parameter, as well as a recommended default, which
allows for the tuning of the interrupt frequency.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Wrong cast breaks desired pointer arithmetic
Mitko Haralanov [Mon, 26 Oct 2015 14:28:39 +0000 (10:28 -0400)]
staging/rdma/hfi1: Wrong cast breaks desired pointer arithmetic

The address being mapped into a process's memory for notification events was
improperly calculated due to cast that was happening too early. dd->events is a
pointer and should have been casted to unsigned long after the pointer
arithmetic was done, not before.

As a result, processes were looking at the wrong place and not seeing their
notification events.

Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Prevent silent data corruption with user SDMA
Mitko Haralanov [Mon, 26 Oct 2015 14:28:37 +0000 (10:28 -0400)]
staging/rdma/hfi1: Prevent silent data corruption with user SDMA

User SDMA keeps track of progress into the submitted IO vectors by tracking an
offset into the vectors when packets are submitted. This offset is updated
after a successful submission of a txreq to the SDMA engine.

The same offset was used when determining whether an IO vector should be
'freed' (pages unpinned) in the SDMA callback functions.

This was causing a silent data corruption in big jobs (> 2 nodes, 120 ranks
each) on the receive side because the send side was mistakenly unpinning the
vector pages before the HW has processed all descriptors referencing the
vector.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Fix port bounce issues with 0.22 DC firmware
Easwar Hariharan [Mon, 26 Oct 2015 14:28:36 +0000 (10:28 -0400)]
staging/rdma/hfi1: Fix port bounce issues with 0.22 DC firmware

The DC firmware overwrites the enable_lane_tx register and does not update it
on a host request to go to Poll. This causes an infinite loop through the LNI
state machine if a link width downgrade occurs. This patch re-sets the
enable_lane_tx register to all 4 lanes.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Add a schedule in send thread
Dean Luick [Mon, 26 Oct 2015 14:28:35 +0000 (10:28 -0400)]
staging/rdma/hfi1: Add a schedule in send thread

When under heavy load, the send handler can run too long without allowing other
tasks to run.  Add a conditional resched to break this up.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Reset firmware instead of reloading Sbus
Caz Yokoyama [Mon, 26 Oct 2015 14:28:34 +0000 (10:28 -0400)]
staging/rdma/hfi1: Reset firmware instead of reloading Sbus

Reset firmware instead of reloading Sbus firmware if it's already done for this
ASIC.  To work around thermal polling problem in firmware, don't reload Sbus
firmware, instead, reset the firmware on the initialization of the second HFI.

Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: close shared context security hole
Jareer Abdel-Qader [Mon, 26 Oct 2015 14:28:33 +0000 (10:28 -0400)]
staging/rdma/hfi1: close shared context security hole

Driver does not verify userid for shared context assignments, allowing
malicious user access.

Reviewed by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jareer H Abdel-Qader <jareer.h.abdel-qader@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Add coalescing support for SDMA TX descriptors
Niranjana Vishwanathapura [Mon, 26 Oct 2015 14:28:32 +0000 (10:28 -0400)]
staging/rdma/hfi1: Add coalescing support for SDMA TX descriptors

This fixes transmit errors when the number of scatter gather elements in the
request is more that the number of per packet descriptors supported by the
hardware, allocate and coalesce the extra scatter gather elements into a single
buffer. The last descriptor is reserved and used for this coalesced buffer.

Verbs potentially need this support when transferring small data chunks
involving different memory regions.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Remove QSFP_ENABLED from HFI capability mask
Easwar Hariharan [Mon, 26 Oct 2015 14:28:31 +0000 (10:28 -0400)]
staging/rdma/hfi1: Remove QSFP_ENABLED from HFI capability mask

The QSFP interface code has been running without issues and the flag is
never set to off. This patch removes the QSFP_ENABLED bit from HFI1_CAP.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Prevent host software lock up
Vennila Megavannan [Mon, 26 Oct 2015 14:28:30 +0000 (10:28 -0400)]
staging/rdma/hfi1: Prevent host software lock up

If packets stop egressing the hardware link, software can lock up.

Implement a timeout for send context halt recovery.  This patch increases the
timeout for packet egress to 500 us and timer resets to zero if the packet
occupancy changes. Also we bounce the link on time out.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Vennila Megavannan <vennila.megavannan@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Extend the offline timeout
Dean Luick [Mon, 26 Oct 2015 14:28:29 +0000 (10:28 -0400)]
staging/rdma/hfi1: Extend the offline timeout

The latest version of the 8051 firmware will wait longer
when bringing the link down.  Extend the driver's timeout
to go with that.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Fix code to reset ASIC CSRs on FLR
Easwar Hariharan [Mon, 26 Oct 2015 14:28:28 +0000 (10:28 -0400)]
staging/rdma/hfi1: Fix code to reset ASIC CSRs on FLR

The ASIC registers were not reset on FLR, and the code to
protect the ASIC block against multiple initializations by
peer HFIs did not extend to multiple ASICs in a system. This
patch addresses this gap.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/rdma/hfi1: Fix regression in send performance
Mike Marciniszyn [Mon, 26 Oct 2015 14:28:27 +0000 (10:28 -0400)]
staging/rdma/hfi1: Fix regression in send performance

The clear_ahg call is new in hfi1 vs qib.  For small messages the progress
routine always builds one and clears out the ahg state when the queue has gone
to empty which is the predominant case for small messages.

Inline the routine and avoid the call to sdma_ahg_free to mitigate the
performance impact.  Finally, move the routine to qp.h for scope reasons.

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>
9 years agostaging: hfi1: sdma: Use setup_timer
Muhammad Falak R Wani [Sun, 25 Oct 2015 10:43:25 +0000 (16:13 +0530)]
staging: hfi1: sdma: Use setup_timer

Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: hfi1: driver: Use setup_timer
Muhammad Falak R Wani [Sun, 25 Oct 2015 10:43:24 +0000 (16:13 +0530)]
staging: hfi1: driver: Use setup_timer

Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.

<smpl>

@timer@
expression e1,e2,e3,fn_ptr;
@@
-init_timer(&e1);
+setup_timer(&e1, fn_ptr, e2);
... when != fn_ptr = e3
-e1.function = fn_ptr;
-e1.data = e2;

</smpl>

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unused fields from struct sm750_dev
Mike Rapoport [Mon, 26 Oct 2015 07:06:08 +0000 (09:06 +0200)]
staging: sm750fb: remove unused fields from struct sm750_dev

The {x,y}LCD fields of struct sm750_dev are not used and can be removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove '#ifdef CAP_EXP*' conditionals
Mike Rapoport [Mon, 26 Oct 2015 07:06:07 +0000 (09:06 +0200)]
staging: sm750fb: remove '#ifdef CAP_EXP*' conditionals

There are several occurencies of '#ifdef CAP_EXP<something>', spelled
differently each time. None of these is ever defined and therefore they
enclose dead code that can be removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: merge lynx_share into sm750_dev
Mike Rapoport [Mon, 26 Oct 2015 07:06:06 +0000 (09:06 +0200)]
staging: sm750fb: merge lynx_share into sm750_dev

Both struct lynx_share and struct sm750_dev reprsent some parts of the
SM750 graphics adapter. There is no point to keep these parts in
different structures.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unused field in lynx_cursor
Mike Rapoport [Mon, 26 Oct 2015 07:06:05 +0000 (09:06 +0200)]
staging: sm750fb: remove unused field in lynx_cursor

The lynx_share field in lynx_cursor structure is never used and can be
removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: fix wrong indentation
Mike Rapoport [Mon, 26 Oct 2015 07:06:04 +0000 (09:06 +0200)]
staging: sm750fb: fix wrong indentation

Fix wrong indentation of a line in lynxfb_set_fbinfo

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: use sm750_dev with pci_{get, set}_drvdata
Mike Rapoport [Mon, 26 Oct 2015 07:06:03 +0000 (09:06 +0200)]
staging: sm750fb: use sm750_dev with pci_{get, set}_drvdata

Use sm750_dev as private driver data for the PCI device

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: use 'struct sm750_dev *' instead of 'void *'
Mike Rapoport [Mon, 26 Oct 2015 07:06:02 +0000 (09:06 +0200)]
staging: sm750fb: use 'struct sm750_dev *' instead of 'void *'

Use proper 'struct sm750_dev *' type instead of 'void *'

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: replace lynx_share with sm750_dev in function calls
Mike Rapoport [Mon, 26 Oct 2015 07:06:01 +0000 (09:06 +0200)]
staging: sm750fb: replace lynx_share with sm750_dev in function calls

Use sm750_dev rather than lynx_share as parameter for hw_sm750_map,
hw_sm750_inithw and hw_sm750_initAccel functions.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove hw_sm750_getVMSize function
Mike Rapoport [Mon, 26 Oct 2015 07:06:00 +0000 (09:06 +0200)]
staging: sm750fb: remove hw_sm750_getVMSize function

The hw_sm750_getVMSize wraps ddk750_getVMSize without any added
functionality. Call ddk750_getVMSize directly and remove
hw_sm750_getVMSize.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: replace lynx_share with sm750_dev in lynxfb_par
Mike Rapoport [Mon, 26 Oct 2015 07:05:59 +0000 (09:05 +0200)]
staging: sm750fb: replace lynx_share with sm750_dev in lynxfb_par

Use sm750_dev instead of lynx_share in the private data of the
frambuffer device.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unused PROC_SPEC_* typedefs
Mike Rapoport [Mon, 26 Oct 2015 07:05:58 +0000 (09:05 +0200)]
staging: sm750fb: remove unused PROC_SPEC_* typedefs

The PROC_SPEC* typedefs are not used and can be removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: merge struct sm750_state into struct sm750_dev
Mike Rapoport [Mon, 26 Oct 2015 07:05:57 +0000 (09:05 +0200)]
staging: sm750fb: merge struct sm750_state into struct sm750_dev

The struct sm750_state is never used on its own. Merge it into the
struct sm750_dev.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rename 'struct sm750_dev' variables to sm750_dev
Mike Rapoport [Mon, 26 Oct 2015 07:05:56 +0000 (09:05 +0200)]
staging: sm750fb: rename 'struct sm750_dev' variables to sm750_dev

Use consistent naming for 'struct sm750_dev' variables

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: rename struct sm750_share to sm750_dev
Mike Rapoport [Mon, 26 Oct 2015 07:05:55 +0000 (09:05 +0200)]
staging: sm750fb: rename struct sm750_share to sm750_dev

The struct sm750_share represents the device state and name sm750_dev
seems more appropriate.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: merge sm750_hw.h into sm750.h
Mike Rapoport [Mon, 26 Oct 2015 07:05:54 +0000 (09:05 +0200)]
staging: sm750fb: merge sm750_hw.h into sm750.h

There is no actual need to split type definitions and global function
declarations between lots of small headers.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unused smi_indent variable
Mike Rapoport [Mon, 26 Oct 2015 07:05:53 +0000 (09:05 +0200)]
staging: sm750fb: remove unused smi_indent variable

The smi_indent variable is only declared, but never used. Remove it.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: replace PADDING macro with ALIGN
Mike Rapoport [Mon, 26 Oct 2015 07:05:52 +0000 (09:05 +0200)]
staging: sm750fb: replace PADDING macro with ALIGN

The custom macro PADDING differs from standard kernel ALIGN only in
parameters order. Replace PADDING with ALIGN and remove it's definition.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unused SPC_SM750 define
Mike Rapoport [Mon, 26 Oct 2015 07:05:51 +0000 (09:05 +0200)]
staging: sm750fb: remove unused SPC_SM750 define

The SPC_SM750 define is not used and can be removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: replace lynx_cursor methods with function calls
Mike Rapoport [Mon, 26 Oct 2015 07:05:50 +0000 (09:05 +0200)]
staging: sm750fb: replace lynx_cursor methods with function calls

The methods in lynx_cursor always use the same implementation and there is
no point to use redirection rather than direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: remove unneeded forward function declarations
Alison Schofield [Mon, 26 Oct 2015 18:44:16 +0000 (11:44 -0700)]
staging: r8723au: remove unneeded forward function declarations

Remove unneeded forward function declarations.

Addresses checkpatch.pl:
WARNING: externs should be avoided in .c files

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: move function type in line with function name
Alison Schofield [Mon, 26 Oct 2015 18:43:09 +0000 (11:43 -0700)]
staging: r8723au: move function type in line with function name

Move function types to be adjacent to the function names in
declarations to improve readability.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: insert correct spacing around operands
Alison Schofield [Mon, 26 Oct 2015 18:42:01 +0000 (11:42 -0700)]
staging: r8723au: insert correct spacing around operands

Adds required spacing around operands to improve readability.
Corrects checkpatch.pl ERROR: spaces required *

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: r8723au: use kernel preferred style for commenting
Alison Schofield [Mon, 26 Oct 2015 18:36:56 +0000 (11:36 -0700)]
staging: r8723au: use kernel preferred style for commenting

Reworked comments per kernel coding style to improve readability.

Corrects checkpatch.pl:
WARNING: Block comments use * on subsequent lines
WARNING: line over 80 characters

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: Remove unnecessary variables
Amitoj Kaur Chawla [Mon, 26 Oct 2015 17:57:20 +0000 (23:27 +0530)]
staging: rtl8188eu: Remove unnecessary variables

Remove unnecessary variable that can be replaced with a single line
of code.

The semantic patch used to find this is:

// <smpl>
@@
expression ret;
@@
- if (ret) return ret;
- return 0;
+ return ret;

@@
local idexpression ret;
expression e;
@@
- ret = e;
- return ret;
+ return e;

@@
type T;
identifier i;
expression E;
@@
- T i = E;
 ... when != i

@@
type T;
identifier i;
@@
- T i;
 ... when != i
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: rtl871x_mp: Remove unused function
Amitoj Kaur Chawla [Tue, 27 Oct 2015 07:03:25 +0000 (12:33 +0530)]
staging: rtl8712: rtl871x_mp: Remove unused function

Drop unused function that is defined but is not called anywhere.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: Remove unnecessary variables
Amitoj Kaur Chawla [Mon, 26 Oct 2015 17:55:59 +0000 (23:25 +0530)]
staging: rtl8712: Remove unnecessary variables

Remove unnecessary variables that can be replaced with a single line of code.

The semantic patch used to find this is:

// <smpl>
@@
expression ret;
@@
- if (ret) return ret;
- return 0;
+ return ret;

@@
local idexpression ret;
expression e;
@@
- ret = e;
- return ret;
+ return e;

@@
type T;
identifier i;
expression E;
@@
- T i = E;
 ... when != i

@@
type T;
identifier i;
@@
- T i;
 ... when != i
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: lprocfs_status: Remove unused declaration
Shraddha Barke [Tue, 27 Oct 2015 06:35:10 +0000 (12:05 +0530)]
Staging: lustre: lprocfs_status: Remove unused declaration

Remove declaration of function lprocfs_wr_timeouts from header file
since it is not used

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: lustre_log: Remove unused functions
Shraddha Barke [Tue, 27 Oct 2015 06:35:09 +0000 (12:05 +0530)]
Staging: lustre: lustre_log: Remove unused functions

Remove the functions which are defined but not used anywhere

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: mt29f_spinand: Indent to match open parenthesis
Eva Rachel Retuya [Mon, 26 Oct 2015 16:43:45 +0000 (00:43 +0800)]
Staging: mt29f_spinand: Indent to match open parenthesis

Fix alignment issues by properly indenting function parameters in
accordance to the kernel coding style. Checkpatch pointed out this
issue.

CHECK: Alignment should match open parenthesis

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: ieee80211: Do not export static function
Amitoj Kaur Chawla [Sat, 24 Oct 2015 17:21:00 +0000 (22:51 +0530)]
staging: rtl8192u: ieee80211: Do not export static function

Remove the export symbol for static function.

The semantic patch used to find this is:

// <smpl>
@r@
type T;
identifier f;
@@

static T f (...) { ... }

@@
identifier r.f;
declarer name EXPORT_SYMBOL;
@@

-EXPORT_SYMBOL(f);
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: omap4iss: Fixes line break
Amarjargal Gundjalam [Mon, 26 Oct 2015 13:09:32 +0000 (06:09 -0700)]
staging: media: omap4iss: Fixes line break

This patch fixes the checkpatch issue:

CHECK: Logical continuations should be on the previous line

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: omap4iss: Matches alignment with open parenthesis
Amarjargal Gundjalam [Mon, 26 Oct 2015 13:09:31 +0000 (06:09 -0700)]
staging: media: omap4iss: Matches alignment with open parenthesis

This patch fixes some of the checkpatch issue:

CHECK: Alignment should match open parenthesis

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: omap4iss: Removes unnecessary blank lines
Amarjargal Gundjalam [Mon, 26 Oct 2015 13:09:30 +0000 (06:09 -0700)]
staging: media: omap4iss: Removes unnecessary blank lines

This patch fixes checkpatch issues:

CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Please don't use multiple blank lines

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: omap4iss: Replaces bit shift on 1 with BIT Macro
Amarjargal Gundjalam [Mon, 26 Oct 2015 13:09:29 +0000 (06:09 -0700)]
staging: media: omap4iss: Replaces bit shift on 1 with BIT Macro

This patch fixes some of the checkpatch issue:

CHECK: Prefer using the BIT macro

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: omap4iss: Fixes misspelling
Amarjargal Gundjalam [Mon, 26 Oct 2015 13:09:28 +0000 (06:09 -0700)]
staging: media: omap4iss: Fixes misspelling

This patch fixes the checkpatch issue:

CHECK: 'splitted' may be misspelled - perhaps 'split'?

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: omap4iss: Fixes NULL comparison
Amarjargal Gundjalam [Mon, 26 Oct 2015 13:09:27 +0000 (06:09 -0700)]
staging: media: omap4iss: Fixes NULL comparison

This patch fixes the checkpatch issue:

CHECK: Comparison to NULL could be written

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Do not use multiple blank lines.
Burcin Akalin [Mon, 26 Oct 2015 09:00:04 +0000 (12:00 +0300)]
staging: vt6656: Do not use multiple blank lines.

Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines"

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Add space around '|'
Burcin Akalin [Mon, 26 Oct 2015 09:00:03 +0000 (12:00 +0300)]
staging: vt6656: Add space around '|'

Add space around operator '|'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: dummy: replace block comment with single line comment
Alison Schofield [Mon, 26 Oct 2015 20:50:29 +0000 (13:50 -0700)]
staging: iio: dummy: replace block comment with single line comment

Replace one block comment with a single line comment. Follow style of
previous comment and omit word channel, since it's clear the topic is
channels.

Addresses checkpatch.pl:
WARNING: Block comments use * on subsequent lines

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: dummy: use uppercase descriptors for enum names
Alison Schofield [Mon, 26 Oct 2015 20:48:23 +0000 (13:48 -0700)]
staging: iio: dummy: use uppercase descriptors for enum names

Replace lower case names in the enum dummy_scan_elements with
uppercase names and a descriptive prefix: DUMMY_INDEX_

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adis16060_core: Fix error handling
Cristina Moraru [Sun, 25 Oct 2015 21:31:41 +0000 (23:31 +0200)]
staging: iio: adis16060_core: Fix error handling

We need to check adis16060_spi_read return code to avoid feeding user
space with bogus data.
While, at it introduce out_unlock label in order to simplify locking
on error path.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: Remove unused variable
Cristina Moraru [Sun, 25 Oct 2015 20:49:42 +0000 (22:49 +0200)]
staging: iio: Remove unused variable

Remove variable that is initialized but not used.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: nvec: Do not use multiple blank lines.
Burcin Akalin [Sun, 25 Oct 2015 13:23:50 +0000 (15:23 +0200)]
staging: nvec: Do not use multiple blank lines.

Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines".

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: slicoss: Fixes block comment style
Amarjargal Gundjalam [Sun, 25 Oct 2015 14:48:57 +0000 (07:48 -0700)]
staging: slicoss: Fixes block comment style

This patch fixes the checkpatch.pl warnings:

WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: slicoss: Adds space around operators
Amarjargal Gundjalam [Sun, 25 Oct 2015 14:48:56 +0000 (07:48 -0700)]
staging: slicoss: Adds space around operators

This patch fixes the checkpatch.pl check:

CHECK: spaces preferred around that ‘’

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: slicoss: Removes unnecessary space after a cast
Amarjargal Gundjalam [Sun, 25 Oct 2015 14:48:55 +0000 (07:48 -0700)]
staging: slicoss: Removes unnecessary space after a cast

This patch fixes the checkpatch.pl check:

CHECK: No space is necessary after a cast

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: slicoss: Removes multiple blank lines
Amarjargal Gundjalam [Sun, 25 Oct 2015 14:48:54 +0000 (07:48 -0700)]
staging: slicoss: Removes multiple blank lines

This patch fixes the checkpatch.pl check:

CHECK: Please don't use multiple blank lines

Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fsl-mc: section mismatch bug fix
Lijun Pan [Sun, 25 Oct 2015 22:41:19 +0000 (17:41 -0500)]
staging: fsl-mc: section mismatch bug fix

WARNING: drivers/staging/built-in.o(.init.text+0xdc): Section mismatch in reference from the function fsl_mc_bus_driver_init() to the function .exit.text:dprc_driver_exit()
The function __init fsl_mc_bus_driver_init() references
a function __exit dprc_driver_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
dprc_driver_exit() so it may be used outside an exit section.

Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Replace LPROCFS_CLIMP_CHECK with lprocfs_climp_check
Ksenija Stanojevic [Mon, 26 Oct 2015 15:05:57 +0000 (08:05 -0700)]
Staging: lustre: Replace LPROCFS_CLIMP_CHECK with lprocfs_climp_check

Static inline functions are preferred over macros. The function is
placed in obd_class.h instead lprocfs_status.h because obd_class.h
includes header obd.h which contains definition of struct obd_device
and in that way avoids build error: Dereferencing pointer to incomplete
type. Also remove macro LPROCFS_CLIMP_CHECK since it's no longer used.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ptlrpc: Replace seq_printf() with seq_putc()
Amitoj Kaur Chawla [Mon, 26 Oct 2015 17:07:26 +0000 (22:37 +0530)]
staging: lustre: ptlrpc: Replace seq_printf() with seq_putc()

Replace seq_printf() with seq_putc() since it is more expensive than
seq_putc().

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Replace sscanf with kstrtoint
Cristina Moraru [Mon, 26 Oct 2015 22:30:08 +0000 (00:30 +0200)]
staging: lustre: Replace sscanf with kstrtoint

Replace single variable sscanf with specialized function
kstrtoint at the suggestion of checkpatch.pl, to fix
'WARNING: Prefer kstrto<type> to single variable sscanf'

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: remove unused OBD_PAGE_ALLOC/FREE and friends
Mike Rapoport [Mon, 26 Oct 2015 08:06:30 +0000 (10:06 +0200)]
staging: lustre: remove unused OBD_PAGE_ALLOC/FREE and friends

The OBD_PAGE_ALLOC/FREE and related macros are not used and can be
removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: get rid of OBD_PAGE_ALLOC/FREE
Mike Rapoport [Mon, 26 Oct 2015 08:06:29 +0000 (10:06 +0200)]
staging: lustre: get rid of OBD_PAGE_ALLOC/FREE

Use alloc_page and __free_page instead

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Don't ignore error code
Cristina Moraru [Sun, 25 Oct 2015 21:16:31 +0000 (23:16 +0200)]
staging: lustre: Don't ignore error code

Error stored in rc was never reported,
so directly return it here.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Remove unused obd_cache.h file
Shraddha Barke [Sun, 25 Oct 2015 00:26:55 +0000 (05:56 +0530)]
Staging: lustre: Remove unused obd_cache.h file

Remove the header file obd_cache.h since it is not needed

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: ptlrpc: Remove EXPORT_SYMBOL for sptlrpc_rule_set_expand
Shraddha Barke [Sun, 25 Oct 2015 00:19:42 +0000 (05:49 +0530)]
Staging: lustre: ptlrpc: Remove EXPORT_SYMBOL for sptlrpc_rule_set_expand

Since sptlrpc_rule_set_expand is static, export symbol is not needed

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: ldlm: Do not export static function
Amitoj Kaur Chawla [Sat, 24 Oct 2015 17:19:50 +0000 (22:49 +0530)]
staging: lustre: ldlm: Do not export static function

Remove the export symbol for static function.

The semantic patch used to find this is:

// <smpl>
@r@
type T;
identifier f;
@@

static T f (...) { ... }

@@
identifier r.f;
declarer name EXPORT_SYMBOL;
@@

-EXPORT_SYMBOL(f);
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: fix extreme case of comedi_nsamples_left()
Ian Abbott [Fri, 23 Oct 2015 09:56:09 +0000 (10:56 +0100)]
staging: comedi: fix extreme case of comedi_nsamples_left()

`comedi_nsamples_left(s, nsamples)` returns the number of samples
remaining to complete an asynchronous command or the passed in
`nsamples`, whichever is lower.  However, it goes wrong in the extreme
case of setting the `nsamples` parameter to `UINT_MAX` when the number
of conversions per "scan" (`s->async->cmd.scan_end_arg`) is 1.  It uses
`comedi_nscans_remaining(s, nscans)` to determine the number of scans
remaining, or the parameter `nscans`, whichever is lower.  To determine
the parameter `nscans`, it divides `nsamples` by the number of
conversions per scan and adds 1.  The addition of 1 is to avoid setting
the parameter `nscans` to 0, as `comedi_nscans_remaining(s, nscans)`
treats that value specially.  However in the extreme case where
`nsamples` is `UINT_MAX` and the number of samples per scan is 1, the
addition of 1 to `nscans` overflows, producing the unwanted 0.

Fix it by refactoring new a function `__comedi_nscans_remaining(s,
nscans)` out of `comedi_nscans_remaining(s, nscans)`.  The new function
does everything except the special handling when `nscans` is 0.  Change
`comedi_nsamples_remaining()` to call the new function without adding 1
to `nscans` to avoid the overflow.

This overflow bug doesn't affect any of the current COMEDI drivers.  I
stumbled across it while changing to one of the drivers.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wilc1000: coreconfigurator: Remove unnecessary parentheses
Shivani Bhardwaj [Mon, 26 Oct 2015 14:51:26 +0000 (20:21 +0530)]
Staging: wilc1000: coreconfigurator: Remove unnecessary parentheses

Parentheses around some arguments and expressions are not required and
should be removed.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wilc1000: coreconfigurator: Remove irrelevant wrapper function
Shivani Bhardwaj [Mon, 26 Oct 2015 14:51:05 +0000 (20:21 +0530)]
Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function

Remove the function get_current_channel() and replace its calls by
get_current_channel_802_11n() as the former function's definition
involves only returning the value of latter function.
Semantic patch used to find out the issue:

@@
identifier f,g;
@@

*f(...) {
 return g(...); }

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: wilc1000: coreconfigurator: Drop unneeded wrapper functions
Shivani Bhardwaj [Mon, 26 Oct 2015 14:46:32 +0000 (20:16 +0530)]
Staging: wilc1000: coreconfigurator: Drop unneeded wrapper functions

Replace the wrapper functions get_address1(), get_address2() and get_address3()
with the standard kernel function ether_addr_copy().
Semantic patch used to identify the issue:

@@
identifier f,g;
@@

*f(...) {
 g(...); }

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: return -ENOMEM when kmalloc failed
Luis de Bethencourt [Mon, 26 Oct 2015 05:52:50 +0000 (05:52 +0000)]
staging: wilc1000: return -ENOMEM when kmalloc failed

The driver is using -1 instead of the -ENOMEM defined macro to specify that
a buffer allocation failed.

Fixes smatch warning and similars:
drivers/staging/wilc1000/host_interface.c:1757 Handle_Key() warn:
returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename host_int_set_WEPDefaultKeyID
Chaehyun Lim [Mon, 26 Oct 2015 00:44:45 +0000 (09:44 +0900)]
staging: wilc1000: rename host_int_set_WEPDefaultKeyID

This patch replaces host_int_set_WEPDefaultKeyID with
host_int_set_wep_default_key to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: rename u8Index in host_int_set_WEPDefaultKeyID
Chaehyun Lim [Mon, 26 Oct 2015 00:44:44 +0000 (09:44 +0900)]
staging: wilc1000: rename u8Index in host_int_set_WEPDefaultKeyID

This patch changes second parameter of host_int_set_WEPDefaultKeyID from
u8Index to index to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wilc1000: fix parameter name of function declaration
Chaehyun Lim [Mon, 26 Oct 2015 00:44:43 +0000 (09:44 +0900)]
staging: wilc1000: fix parameter name of function declaration

This patch changes struct host_if_drv of host_int_set_WEPDefaultKeyID
function declaration from hWFIDrv to hif_drv in host_interface.h
With this change, first parameter name of this function declaration and
definition has same name as hif_drv.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>