Commit graph

724157 commits

Author SHA1 Message Date
Andreas Klinger 511051d509 iio: srf08: fix link error "devm_iio_triggered_buffer_setup" undefined
Functions for triggered buffer support are needed by this module.
If they are not defined accidentally by another driver, there's an error
thrown out while linking.

Add a select of IIO_BUFFER and IIO_TRIGGERED_BUFFER in the Kconfig file.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Fixes: a831959371 ("iio: srf08: add triggered buffer support")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-02-04 11:13:00 +00:00
Alexandru Ardelean 7d2b8e6aaf staging: iio: ad5933: switch buffer mode to software
Since commit 152a6a884a ("staging:iio:accel:sca3000 move
to hybrid hard / soft buffer design.")
the buffer mechanism has changed and the
INDIO_BUFFER_HARDWARE flag has been unused.

Since commit 2d6ca60f32 ("iio: Add a DMAengine framework
based buffer")
the INDIO_BUFFER_HARDWARE flag has been re-purposed for
DMA buffers.

This driver has lagged behind these changes, and
in order for buffers to work, the INDIO_BUFFER_SOFTWARE
needs to be used.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Fixes: 2d6ca60f32 ("iio: Add a DMAengine framework based buffer")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-01-28 08:24:20 +00:00
Fabrice Gasnier a3b5655ebd iio: adc: stm32: fix stm32h7_adc_enable error handling
Error handling in stm32h7_adc_enable routine doesn't unwind enable
sequence correctly. ADEN can only be cleared by hardware (e.g. by
writing one to ADDIS).
It's also better to clear ADRDY just after it's been set by hardware.

Fixes: 95e339b6e8 ("iio: adc: stm32: add support for STM32H7")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-01-28 08:18:49 +00:00
Alexandru Ardelean e31b617d0a staging: iio: adc: ad7192: fix external frequency setting
The external clock frequency was set only when selecting
the internal clock, which is fixed at 4.9152 Mhz.

This is incorrect, since it should be set when any of
the external clock or crystal settings is selected.

Added range validation for the external (crystal/clock)
frequency setting.
Valid values are between 2.4576 and 5.12 Mhz.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-01-28 08:16:24 +00:00
Christophe JAILLET 787e1853ae iio: adc: aspeed: Fix error handling path
The labels and branching order of the error path of 'aspeed_adc_probe()'
are broken.
Re-order the labels and goto statements.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-01-14 11:01:13 +00:00
Michael Panzlaff a66a4e8e01 staging: pi433: Cleanup codestyle, indent statements after case labels
This patch changes the indentation of the statements after case labels.
The linux coding guidelines do not explicitly mentiond this but pretty
much all existing code doesn't put any statements into the same line of
their belonging case labels. Therefore this adapts to the more usual style.

Please note that there is still a lot of > 80 character lines which will
cause checkpatch warnings. This patch does not intent to fix this
already existing issue.

Signed-off-by: Michael Panzlaff <michael.panzlaff@fau.de>
Signed-off-by: Tillmann Zipperer <tillmann.zipperer@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10 19:29:34 +01:00
Luis de Bethencourt 71b3261267 staging: rtl8723bs: Fix trailing semicolon
The trailing semicolon is an empty statement that does nothing.
Removing it since it has no purpose.

Signed-off-by: Luis de Bethencourt <luisbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10 19:14:47 +01:00
Luis de Bethencourt 66e3bc9c80 staging: rtl8723bs: Fix trailing semicolon
The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.

Signed-off-by: Luis de Bethencourt <luisbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10 19:14:47 +01:00
Luis Gerhorst 9365f281e2 staging: fbtft: Fix indentation
This fixes the checkpatch message:

    CHECK: Alignment should match open parenthesis
    #1380: FILE: drivers/staging/fbtft/fbtft-core.c:1380:
    +		dev_warn(dev,
    +			"no default functions for regwidth=%d and buswidth=%d\n",

Signed-off-by: Luis Gerhorst <linux-kernel@luisgerhorst.de>
Signed-off-by: Jonny Schaefer <schaefer.jonny@gmail.com>
Acked-by: Alexander Wuerstlein <arw@cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10 19:14:47 +01:00
Sumit Pundir 7da75cc427 staging: rts5208: sd: fix misspelled constant
Fixes the misspelled constant to 'SWITCH_NO_ERR'.
Issue reported by checkpatch.pl

Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10 19:14:47 +01:00
Joe Perches 47595e3286 MAINTAINERS: Mark some staging directories as "Obsolete"
Several staging directories have TODO files that indicate a
subsystem will be removed in the future.

Using a status entry of "S:	Obsolete" helps indicate the
subsystem files should not be modified unnecessarily.

checkpatch also tests this setting and emits a warning that
the matching subsystem files should not be modified.

This might help avoid receiving patches that will be dropped.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 20:38:24 +01:00
Luis de Bethencourt 1590fb3a61 staging: rtl8723bs: Fix trailing semicolon
The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.

Signed-off-by: Luis de Bethencourt <luisbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 19:40:22 +01:00
Colin Ian King 24c971c613 ncpfs: remove redundant cast of struct ncp_inode_info
Casting a value returned by memory an allocation function is
not required and can be removed. Also add in a newline after before
the first statement. Code clean up as suggested by coccinelle.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 19:34:12 +01:00
Valentin Vidic 3861b724de staging: pi433: align function parameters with open parenthesis
Fixes checkpatch warnings:

  CHECK: Alignment should match open parenthesis

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 16:02:18 +01:00
Gilad Ben-Yossef f24d41169a staging: ccree: dma mask is type u64
The dma mask var was defined as dma_addr_t but should be
u64. This showed as a sparse warning when building for 32 bit.
Fix it by changing type to u64 and drop the cast.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 16:02:18 +01:00
Gilad Ben-Yossef 5d5583d0e2 staging: ccree: make stub function static inline
The debugfs interface defines stub function if debugfs is not
enabled, which were missing the 'static inline' qualifiers causing
sparse warnings.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 16:02:18 +01:00
Gilad Ben-Yossef 65073e6ea9 staging: ccree: add missing include
Add the missing include of include file with function declarations.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 16:02:18 +01:00
Gilad Ben-Yossef 6daa971b57 staging: ccree: remove unneeded includes
Remove include files not needed for compilation.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 16:01:35 +01:00
Gilad Ben-Yossef e7660d2d47 staging: ccree: use a consistent file naming convention
The ccree driver source files were using an inconsistent
naming convention stemming from what the company was called
when they were added.

Move to a single consistent naming convention for better
code readability.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 16:00:07 +01:00
NeilBrown 5b135f6b50 staging: lustre: remove LIBCFS_ALLOC, LIBCFS_FREE and related macros.
LIBCFS_ALLOC
LIBCFS_ALLOC_ATOMIC
LIBCFS_ALLOC_POST
LIBCFS_CPT_ALLOC
LIBCFS_FREE

are no longer used, and so are removed.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:57:54 +01:00
NeilBrown 8d60ecd99c staging: lustre: replace LIBCFS_CPT_ALLOC()
LIBCFS_APT_ALLOC() calls kvmalloc_node() with GFP_NOFS
which is not permitted.
Mostly, a kmalloc_node(GFP_NOFS) is appropriate, though occasionally
the allocation is large and GFP_KERNEL is acceptable, so
kvmalloc_node() can be used.

This patch introduces 4 alternatives to LIBCFS_CPT_ALLOC():
 kmalloc_cpt()
 kzalloc_cpt()
 kvmalloc_cpt()
 kvzalloc_cpt().

Each takes a size, gfp flags, and cpt number.

Almost every call to LIBCFS_CPT_ALLOC() passes lnet_cpt_table()
as the table.  This patch embeds that choice in the k*alloc_cpt()
macros, and opencode kzalloc_node(..., cfs_cpt_spread_node(..))
in the one case that lnet_cpt_table() isn't used.

When LIBCFS_CPT_ALLOC() is replaced, the matching LIBCFS_FREE()
is also replaced, with with kfree() or kvfree() as appropriate.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:48:45 +01:00
NeilBrown d0157f0c7e staging: lustre: opencode LIBCFS_ALLOC_ATOMIC calls.
Just call kzalloc(GFP_ATOMIC) directly.
We don't need the warning on failure.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:57 +01:00
NeilBrown 4c03f554bf staging: lustre: cfs_percpt_alloc: use kvmalloc(GFP_KERNEL)
this allocation is called from several places, but all are
during initialization, so GFP_NOFS is not needed.
So use kvmalloc and GFP_KERNEL.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:57 +01:00
NeilBrown dc31f99be6 staging: lustre: use kmalloc for allocating ksock_tx
The size of the data structure is primarily controlled
by the iovec size, which is limited to 256.
Entries in this vector are 12 bytes, so the whole
will always fit in a page.
So it is safe to use kmalloc (kvmalloc not needed).
So replace LIBCFS_ALLOC with kmalloc.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:57 +01:00
NeilBrown db1e7806d3 staging: lustre: lnet-route: use kmalloc for small allocation
This allocation is reasonably small.
As the function is called "*_locked", it might not be safe
to perform a GFP_KERNEL allocation, so be safe and
use GFP_NOFS.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:57 +01:00
NeilBrown 33be4600f0 staging: lustre: more conversions to GFP_KERNEL allocations.
These are not called from filesystem context, so use
GFP_KERNEL, not LIBCFS_ALLOC().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:57 +01:00
NeilBrown 464dbfcaa2 staging: lustre: more LIBCFS_ALLOC conversions to GFP_KERNEL allocations.
None of these need GFP_NOFS so allocate directly.
Change matching LIBCFS_FREE() to kfree() or kvfree().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:57 +01:00
NeilBrown 343fb6af08 staging: lustre: Convert more LIBCFS_ALLOC allocation to direct GFP_KERNEL
None of these need to be GFP_NOFS, so use GFP_KERNEL explicitly
with kmalloc(), kvmalloc(), or kvmalloc_array().
Change matching LIBCFS_FREE() to kfree() or kvfree()

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:57 +01:00
NeilBrown 12e46c461c staging: lustre: change some LIBCFS_ALLOC calls to k?alloc(GFP_KERNEL)
When an allocation happens from process context rather than
filesystem context, it is best to use GFP_KERNEL rather than
LIBCFS_ALLOC() which always uses GFP_NOFS.
This include initialization during, or prior to, mount,
and code run from separate worker threads.

So for some of these cases, switch to kmalloc, kvmalloc, or
kvmalloc_array() as appropriate.
In some cases we preserve __GFP_ZERO (via kzalloc/kvzalloc), but in
others it is clear that allocated memory is immediately initialized.

In each case, the matching LIBCFS_FREE() is converted to
kfree() or kvfree()

This is just a subset of locations that need changing.
As there are quite a lot, I've broken them up into several
ad-hoc sets to avoid review-fatigue.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:56 +01:00
NeilBrown 2aa8b1b728 staging: lustre: lnet: use kmalloc/kvmalloc in router_proc
The buffers allocated in router_proc are to temporarily
hold strings created for procfs files.
So they do not need to be zeroed and are safe to use
GFP_KERNEL.
So use kmalloc() directly except in two cases where it
isn't trivial to confirm that the size is always small.
In those cases, use kvmalloc().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:56 +01:00
NeilBrown b9c4b8a15a staging: lustre: lnet: selftest: don't allocate small strings.
All of the "name" buffers here are at most LST_NAME_SIZE+1
bytes, so 33 bytes at most.
They are only used temporarily during the life of the function
that allocates them.
So it is much simpler to just allocate on the stack.
Worst case is lst_tet_add_ioct(), which allocates
3 for these which 99 bytes on the stack, instead of the 24 that would
have been allocated for 64-bit pointers.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:56 +01:00
NeilBrown 3872fb73ca staging: lustre: lnet: switch to cpumask_var_t
So that we can use the common cpumask allocation functions,
switch to cpumask_var_t.
We need to be careful not to free a cpumask_var_t until the
variable has been initialized, and it cannot be initialized
directly.
So we must be sure either that it is filled with zeros, or
that zalloc_cpumask_var() has been called on it.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:41:56 +01:00
NeilBrown 3c88bdbbf9 staging: lustre: replace simple cases of LIBCFS_ALLOC with kzalloc.
All usages of the form
  LIBCFS_ALLOC(variable, sizeof(variable))
or
  LIBCFS_ALLOC(variable, sizeof(variable's-type))

are changed to
  variable = kzalloc(sizeof(...), GFP_NOFS);

Similarly, all
   LIBCFS_FREE(variable, sizeof(variable))
become
   kfree(variable);

None of these need the vmalloc option, or any of the other minor
benefits of LIBCFS_ALLOC().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:39:28 +01:00
Valentin Vidic 9ab7bc50a8 staging: pi433: replace shifting with BIT macro
Fixes checkpatch warnings:

  CHECK: Prefer using the BIT macro

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:38:48 +01:00
Sumit Pundir b5c54c4520 Staging: greybus: camera: cleanup multiple checks for null pointers
Fixed coding style issue regarding null comparison at multiple lines.
Issue reported by checkpatch.pl

Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
Acked-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:38:48 +01:00
Laura Abbott e4e179a844 staging: android: ion: Switch from WARN to pr_warn
Syzbot reported a warning with Ion:

WARNING: CPU: 0 PID: 3502 at drivers/staging/android/ion/ion-ioctl.c:73 ion_ioctl+0x2db/0x380 drivers/staging/android/ion/ion-ioctl.c:73
Kernel panic - not syncing: panic_on_warn set ...

This is a warning that validation of the ioctl fields failed. This was
deliberately added as a warning to make it very obvious to developers that
something needed to be fixed. In reality, this is overkill and disturbs
fuzzing. Switch to pr_warn for a message instead.

Reported-by: syzbot+fa2d5f63ee5904a0115a@syzkaller.appspotmail.com
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:38:48 +01:00
Laura Abbott 0c75f10312 staging: android: ion: Add __GFP_NOWARN for system contig heap
syzbot reported a warning from Ion:

  WARNING: CPU: 1 PID: 3485 at mm/page_alloc.c:3926

  ...
   __alloc_pages_nodemask+0x9fb/0xd80 mm/page_alloc.c:4252
  alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2036
  alloc_pages include/linux/gfp.h:492 [inline]
  ion_system_contig_heap_allocate+0x40/0x2c0
  drivers/staging/android/ion/ion_system_heap.c:374
  ion_buffer_create drivers/staging/android/ion/ion.c:93 [inline]
  ion_alloc+0x2c1/0x9e0 drivers/staging/android/ion/ion.c:420
  ion_ioctl+0x26d/0x380 drivers/staging/android/ion/ion-ioctl.c:84
  vfs_ioctl fs/ioctl.c:46 [inline]
  do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
  SYSC_ioctl fs/ioctl.c:701 [inline]
  SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692

This is a warning about attempting to allocate order > MAX_ORDER. This
is coming from a userspace Ion allocation request. Since userspace is
free to request however much memory it wants (and the kernel is free to
deny its allocation), silence the allocation attempt with __GFP_NOWARN
in case it fails.

Reported-by: syzbot+76e7efc4748495855a4d@syzkaller.appspotmail.com
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 15:38:48 +01:00
Shubham Kumaram 4305059627 Staging: gs_fpgaboot: remove FSF's mailing address from io.h
This patch removes FSF's mailing address issue from io.h found by
checkpatch.pl tool.

Signed-off-by: Shubham Kumaram <shubhamkumaram@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:47:23 +01:00
Marcelo Guzmán Lamperti 2c4a97b44f staging: sm750fb: Remove multiple blank lines
Remove multiple blank lines. Issue found by checkpatch.

Signed-off-by: Marcelo Guzmán Lamperti <marcelo.guzman.lamperti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:47:23 +01:00
Ioana Radulescu 7ec0596f89 staging: fsl-dpaa2/eth: Use affine DPIO services
Use the newly added DPIO service API to map cpu-affine DPIO services
to channels.

The DPAA2 Ethernet driver already had mappings of frame queues and
channels to cpus, but had no control over the DPIOs used. We can
now ensure full affinity of hotpath hardware resources to cores,
which improves performance and almost eliminates some resource
contentions (e.g. enqueue/dequeue busy counters should be close to
zero from now on).

Making the pull channel operation core affine brings the most
significant benefits. This ensures the same DPIO service will be
used for all dequeue commands issued for a certain frame queue,
which is in line with the way hardware is optimized.

Additionally, we also use affine DPIOs for the frame enqueue and
buffer release operations in order to avoid resource contention.
dpaa2_io_service_register() and dpaa2_io_service_rearm()
functions receive an affine DPIO as argument mostly for uniformity,
but this doesn't change the previous functionality.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:47:23 +01:00
Ioana Radulescu 1f4953836a staging: fsl-mc/dpio: Add dpaa2_io_service_select() API
All DPIO service API functions receive a dpaa2_io service pointer
as parameter (NULL meaning any service will do) which indicates
the hardware resource to be used to execute the specified command.

There isn't however any available API for obtaining such a service
reference that could be used further, effectively forcing the users
to always request a random service for DPIO operations.
(The DPIO driver holds internally an array mapping services to cpus,
and affine services can be indirectly requested by a couple of API
functions: dpaa2_io_service_register and dpaa2_io_service_rearm
use the cpu id provided by the user to select the corresponding
service)

This patch adds a function for selecting a DPIO service based on
the specified cpu id. If the user provides a "don't care" value
for the cpu, we revert to the default behavior and return the next
DPIO, taken in a round-robin fashion from a list of available
services.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Acked-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:47:23 +01:00
Sumit Pundir beac430353 Staging: vt6656: Fix unnecessary 'out of memory' message
This patch fixes one of the warnings as noted by checkpatch.pl related
to unnecessary 'out of memory' message.

This patch fixes the following checkpatch.pl error:

WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
2018-01-08 16:45:45 +01:00
Jia-Ju Bai 23cb746b5e staging: rtl8192u: Replace mdelay with msleep in rtl8192_usb_probe
rtl8192_usb_probe is not called in an interrupt handler
nor holding a spinlock.
The function mdelay in it can be replaced with msleep,
to avoid busy wait.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
2018-01-08 16:45:45 +01:00
Richard Sudaryono 357f862bd2 staging: comedi: adv_pci1760: fix typo in comments
Changed 'firware' to 'firmware'

Signed-off-by: Richard Sudaryono <richardsudaryono@gmail.com>
2018-01-08 16:45:45 +01:00
Shreeya Patel 97c6166001 Staging: rtlwifi: Remove unused variable and the code
Remove unused variable and also remove unused code
associated with initializing the unused variable.

Unused variable was detected using the following
semantic patch by coccinelle.

@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
2018-01-08 16:45:45 +01:00
Sidong Yang ab3080532e staging: vc05_services: fix checkpatch.pl errors
Fix some errors for wrong brace position reported by checkpatch.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:41:37 +01:00
Kishore KP afe65e430d staging: vc04_services: Prefer WARN_ON_ONCE instead of if condition followed by BUG.
Coccinelle suggested to use BUG_ON instead of if condition followed by BUG
but BUG_ON should be used in situations where integrity of the system is no
longer guaranteed. In this case, as suggested by Stefan Wahren, vchiq isn't
critical.
Since it is not critical, BUG_ON should be avoided.
Replaced if condition followed by BUG with WARN_ON_ONCE.

Signed-off-by: Kishore KP <kishore.p@techveda.org>
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:41:37 +01:00
Kishore KP 886654d7e3 staging: vc04_services: Fix platform_no_drv_owner.cocci warnings.
Removed .owner field initialization, platform core does it automatically.
Pointed out by Coccinelle.

Signed-off-by: Kishore KP <kishore.p@techveda.org>
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:41:37 +01:00
Andy Pusch 8f3614c5c6 Staging: wlan-ng: hfa384x_usb: fixed two line limit coding style issues
Fixed two coding style issues.

Signed-off-by: Andy Pusch <drag@black-pixel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:41:36 +01:00
Philippe Loctaux 9d4c0c9f6a Staging: vme: vme_user: fixed an alignment coding style issue
Fixed a coding style issue.

Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08 16:41:36 +01:00