Commit graph

47573 commits

Author SHA1 Message Date
Ioana Radulescu e202c82c90 staging: fsl-dpaa2/eth: Remove incorrect error path
Not having Rx hashing distribution enabled for an
interface is a valid configuration and shouldn't be
treated as an error.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-13 12:02:54 +02:00
Ioana Radulescu c433db403b staging: fsl-dpaa2/eth: Fix return type of ndo_start_xmit
ndo_start_xmit() returns a value of type netdev_tx_t. Update
our ndo function to use the correct type.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-13 12:02:54 +02:00
Ioana Radulescu 8dffaf8a17 staging: fsl-dpaa2/eth: Initialize variable before use
In dpni_get_irq_status(), status is both in and out parameter,
so initialize before use.
Issue found through static analysis tool.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-13 12:02:53 +02:00
Ioana Radulescu acbff8e31e staging: fsl-dpaa2/eth: Add "static" keyword where needed
Make a couple of locally used functions and structures static.
Issue found through static analysis tool.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-13 12:02:53 +02:00
Greg Kroah-Hartman 7bf1e44f86 Merge 4.12-rc5 into staging-next
We want the IIO fixes and other staging driver fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-12 08:20:47 +02:00
Linus Torvalds 21c9eb7ca3 Staging/IIO fixes for 4.12-rc5
These are mostly all IIO driver fixes, resolving a number of tiny
 issues.  There's also a ccree and lustre fix in here as well, both
 fix problems found in those codebases.
 
 All have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWTz0Fg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yneTgCgvf05mecm4Hw98dGUXyaRUe0K578An1Ten4bh
 sKVoFoxRlzQVF0KHUkQy
 =pJOF
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging/IIO fixes from Greg KH:
 "These are mostly all IIO driver fixes, resolving a number of tiny
  issues. There's also a ccree and lustre fix in here as well, both fix
  problems found in those codebases.

  All have been in linux-next with no reported issues"

* tag 'staging-4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: ccree: fix buffer copy
  staging/lustre/lov: remove set_fs() call from lov_getstripe()
  staging: ccree: add CRYPTO dependency
  iio: adc: sun4i-gpadc-iio: fix parent device being used in devm function
  iio: light: ltr501 Fix interchanged als/ps register field
  iio: adc: bcm_iproc_adc: swap primary and secondary isr handler's
  iio: trigger: fix NULL pointer dereference in iio_trigger_write_current()
  iio: adc: max9611: Fix attribute measure unit
  iio: adc: ti_am335x_adc: allocating too much in probe
  iio: adc: sun4i-gpadc-iio: Fix module autoload when OF devices are registered
  iio: adc: sun4i-gpadc-iio: Fix module autoload when PLATFORM devices are registered
  iio: proximity: as3935: fix iio_trigger_poll issue
  iio: proximity: as3935: fix AS3935_INT mask
  iio: adc: Max9611: checking for ERR_PTR instead of NULL in probe
  iio: proximity: as3935: recalibrate RCO after resume
2017-06-11 11:25:51 -07:00
Mauro Carvalho Chehab acc490bbb7 [media] atomisp: use correct dialect to disable warnings
There's a Macro that checks if gcc supports a warning before
disabling it. Use it, in order to avoid warnings when building
with older gcc versions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08 14:51:58 -03:00
David S. Miller 0bed865060 net: Fix build regression in rtl8723bs staging driver.
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_add_monitor_if’:
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2670:10: error: ‘struct net_device’ has no member named ‘destructor’
  mon_ndev->destructor = rtw_ndev_destructor;
          ^

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-08 11:51:59 -04:00
Mauro Carvalho Chehab 703ecba4db [media] staging: css2400/Makefile: don't include non-existing files
The atomisp css2400/Makefile includes a Makefile.common:

	include $(srctree)/$(src)/../Makefile.common

Well, this file doesn't exist at the Kernel tree :-)

So, don't include it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08 12:39:03 -03:00
Dmitry Torokhov d9d2401f59 greybus: hid: remove custom locking from gb_hid_open/close
Now that HID core enforces serialization of transport driver open/close
calls we can remove custom locking from greybus hid driver.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-06-08 13:56:10 +02:00
David S. Miller cf124db566 net: Fix inconsistent teardown and release of private netdev state.
Network devices can allocate reasources and private memory using
netdev_ops->ndo_init().  However, the release of these resources
can occur in one of two different places.

Either netdev_ops->ndo_uninit() or netdev->destructor().

The decision of which operation frees the resources depends upon
whether it is necessary for all netdev refs to be released before it
is safe to perform the freeing.

netdev_ops->ndo_uninit() presumably can occur right after the
NETDEV_UNREGISTER notifier completes and the unicast and multicast
address lists are flushed.

netdev->destructor(), on the other hand, does not run until the
netdev references all go away.

Further complicating the situation is that netdev->destructor()
almost universally does also a free_netdev().

This creates a problem for the logic in register_netdevice().
Because all callers of register_netdevice() manage the freeing
of the netdev, and invoke free_netdev(dev) if register_netdevice()
fails.

If netdev_ops->ndo_init() succeeds, but something else fails inside
of register_netdevice(), it does call ndo_ops->ndo_uninit().  But
it is not able to invoke netdev->destructor().

This is because netdev->destructor() will do a free_netdev() and
then the caller of register_netdevice() will do the same.

However, this means that the resources that would normally be released
by netdev->destructor() will not be.

Over the years drivers have added local hacks to deal with this, by
invoking their destructor parts by hand when register_netdevice()
fails.

Many drivers do not try to deal with this, and instead we have leaks.

Let's close this hole by formalizing the distinction between what
private things need to be freed up by netdev->destructor() and whether
the driver needs unregister_netdevice() to perform the free_netdev().

netdev->priv_destructor() performs all actions to free up the private
resources that used to be freed by netdev->destructor(), except for
free_netdev().

netdev->needs_free_netdev is a boolean that indicates whether
free_netdev() should be done at the end of unregister_netdevice().

Now, register_netdevice() can sanely release all resources after
ndo_ops->ndo_init() succeeds, by invoking both ndo_ops->ndo_uninit()
and netdev->priv_destructor().

And at the end of unregister_netdevice(), we invoke
netdev->priv_destructor() and optionally call free_netdev().

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-07 15:53:24 -04:00
Hans de Goede af822177d6 [media] staging: atomisp: Fix endless recursion in hmm_init
hmm_init calls hmm_alloc to set dummy_ptr, hmm_alloc calls
hmm_init when dummy_ptr is not yet set, which is the case in
the call from hmm_init, so it calls hmm_init again, this continues
until we have a stack overflow due to the recursion.

This commit fixes this by adding a separate flag for tracking if
hmm_init has been called. Not pretty, but it gets the job done,
eventually we should be able to remove the hmm_init call from
hmm_alloc.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:51:49 -03:00
Chen Guanqiao f1e627a41d [media] staging: atomisp: lm3554: fix sparse warnings(was not declared. Should it be static?)
Fix "symbol 'xxxxxxx' was not declared. Should it be static?" sparse warnings.

Signed-off-by: Chen Guanqiao <chen.chenchacha@foxmail.com>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:50:22 -03:00
Hans de Goede ef14aa3bc1 [media] staging: atomisp: Make ov2680 driver less chatty
There is no reason for all this printk spamming and certainly
not at an error log level.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:49:56 -03:00
Hans de Goede da3e18059b [media] staging: atomisp: Ignore errors from second gpio in ov2680 driver
As the existing comment in the driver indicates the sensor has only 1 pin,
but some boards may have 2 gpios defined and we toggle both as we we don't
know which one is the right one. However if the ACPI resources table
defines only 1 gpio (as expected) the gpio1_ctrl call will always fail,
causing the probing of the driver to file.

This commit ignore the return value of the gpio1_ctrl call, fixing this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:49:23 -03:00
Hans de Goede 22b2807dae [media] staging: atomisp: Add OVTI2680 ACPI id to ov2680 driver
Add OVTI2680 ACPI id to ov2680 driver

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:48:36 -03:00
Hans de Goede 6706e9008d [media] staging: atomisp: Add INT0310 ACPI id to gc0310 driver
Add INT0310 ACPI id to gc0310 driver

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:48:13 -03:00
Hans de Goede 42c6d864ac [media] staging: atomisp: Set step to 0 for mt9m114 menu control
menu controls are not allowed to have a step size, set step to 0 to
fix an oops from the WARN_ON in v4l2_ctrl_new_custom() triggering
because of this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:47:47 -03:00
Hans de Goede 797f91e641 [media] staging: atomisp: Do not call dev_warn with a NULL device
Do not call dev_warn with a NULL device, this silence the following 2
warnings:

[   14.392194] (NULL device *): Failed to find gmin variable gmin_V2P8GPIO
[   14.392257] (NULL device *): Failed to find gmin variable gmin_V1P8GPIO

We could switch to using pr_warn for dev == NULL instead, but as comments
in the source indicate, the check for these 2 special gmin variables with
a NULL device is a workaround for 2 specific evaluation boards, so
completely silencing the missing warning for these actually is a good
thing.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:47:17 -03:00
Hans de Goede 008d8e1005 [media] staging: atomisp: Fix calling efivar_entry_get() with unaligned arguments
efivar_entry_get has certain alignment requirements and the atomisp
platform code was not honoring these, causing an oops by triggering the
WARN_ON in arch/x86/platform/efi/efi_64.c: virt_to_phys_or_null_size().

This commit fixes this by using the members of the efivar struct embedded
in the efivar_entry struct we kzalloc as arguments to efivar_entry_get(),
which is how all the other callers of efivar_entry_get() do this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:46:46 -03:00
Alan Cox fc99349413 [media] atomisp: de-duplicate sh_css_mmu_set_page_table_base_index
Between the ISP2400 and ISP2401 code base this function moved file. The merge
of the drivers left us with two version in ifdefs. Resolve this down to a
single copy.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:46:00 -03:00
Alan Cox 4950cfecd1 [media] atomisp: remove sh_css_irq - it contains nothing
We won't be adding abstractions or moving them here so kill it.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:45:13 -03:00
Alan Cox 29a323ea90 [media] atomisp: Unify lut free logic
ISP2401 introduced a helper for this which we can use just as well on the
ISP2400 and remove some more noise differences.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:44:39 -03:00
Alan Cox b1c056e05b [media] atomisp: Unify load_preview_binaries for the most part
ISP2401 introduced a rather sensible change to cut through the structure
spaghetti. Adopt that for the ISP2400 as well. It makes no difference to the
actual code other than readability.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:44:09 -03:00
Alan Cox 0ef9e6e555 [media] atomisp: unify sh_css_hmm_buffer_record_acquire
The ISP2401 version of this function returns a pointer to the buffer, whilst
the ISP2400 version returns a boolean if a slot is found. We can trivially
unify the code to use the ISP2401 version.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:43:24 -03:00
Alan Cox 4a2fcc0c91 [media] atomisp: eliminate dead code under HAS_RES_MGR
This define is never set and these code paths are never used so they can go
away.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:42:37 -03:00
Dan Carpenter 9dff81436d [media] atomisp2: off by one in atomisp_s_input()
The isp->inputs[] array has isp->input_cnt elements which have been
initialized so this > should be >=.

This bug is harmless.  The check against ATOM_ISP_MAX_INPUTS prevents us
from reading beyond the end of the array.  The uninitialized elements
are zeroed out so we will end up returning -EINVAL a few lines later
because the .camera pointer is NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:42:03 -03:00
Alan Cox 94e23b6148 [media] atomisp2: tidy up confused ifdefs
The two drivers were machine merged and in this case the machine output was to
say the least not optimal.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:41:40 -03:00
Alan Cox f16595ae20 [media] atomisp2: remove HRT_UNSCHED
HRT_UNSCHED is never defined or set in the driver, so this is dead code that
can be retired, simplifying the code a bit further.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:40:58 -03:00
Alan Cox 2310ae5c12 [media] atomisp: remove NUM_OF_BLS
With the removal of the HAS_BL bootloader code the value of NUM_OF_BLS is an
invariant zero. So let's get rid of it.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:40:10 -03:00
Alan Cox 5c9f9d602e [media] atompisp: HAS_BL is never defined so lose it
Kill off the HAS_BL define and the code and includes it brackets. We never
define HAS_BL or use that functionality.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:39:42 -03:00
Juan Antonio Pedreira Martos 4518c3fe7c [media] staging: media: atomisp: fix non static symbol warnings
Fix a couple of sparse warnings:
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:59:14: warning: symbol 'repool_pgnr' was not declared. Should it be static?
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:387:6: warning: symbol 'punit_ddr_dvfs_enable' was not declared. Should it be static?

Mark these symbols as static, so they are no longer incorrectly exported.

Signed-off-by: Juan Antonio Pedreira Martos <juanpm1@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:39:12 -03:00
Paolo Cretaro e1b28f1326 [media] atomisp: use NULL instead of 0 for pointers
Fix warning issued by sparse: Using plain integer as NULL pointer

Signed-off-by: Paolo Cretaro <melko@frugalware.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:38:44 -03:00
Christoph Fanelsa 74058c596b [media] staging: media: cxd2099: Fix checkpatch issues
Fix checkpatch warnings of prefered using '%s..", __func__' as function
name in a string

Signed-off-by: Christoph Fanelsa <eddi1983@gmx.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:33:41 -03:00
Mauro Carvalho Chehab 42654ebad0 media fixes for v4.12-rc4
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJZNnBiAAoJEAhfPr2O5OEV9bwP/1bus9tAw3AT+HxRSIaFFX8+
 DMDmJ6nZ4WQJ4fI04tKkUjpl+G2ImDGshdGgLht/YpaJRd6KgPqV+zWrAVX5/0e1
 mLyhjaALuk5M//JbkxEP95SWBOZ6SCIWlV/5oQRTNI86kO0gISxoCAsbumKlSSUC
 qTFmbmPp9siFpS43eZjVcgYIbwFx75qvLTc1+JRvxa2VhtMB5d4xYnXSpxlCvduj
 NN14KiphBgCOvyMQsi4q3H6ma8EL0sEtaukqPzXOnz6GGAIUUbDA23APM5H0LIIZ
 kYhO9ooez4dz1094ex1zSS/uQq2ogCTv7ShQseddNbHhOFG7Aq30AXLMEWeHaNp1
 fFb28CY3CBpNaYfjePbqIs8KKg3JxmJGmCGgW65p40UGUo1Itbpci5MqN8BjQAI8
 Ks1rf+V4iYQTr4QmQJQqCyJCljrsQbGMKZ9I67pmqfbqDunlH43Zr88DEWPv3rbW
 qac6U1vh108UHE/1KRZFjzvo31ToP+f+AwyVTXVeIi6vba2gvC8ASCJnZ/nGtO74
 Eb/GR0DtqvYGE6sXohbMywZ+8wRR6CdRVDC4YotQwaoghwnH10WPLg3JahECVMu7
 MbDtVvUHjbJ18cqwCW+J01gcuQxH/8Lx07T9T+pUFFanPBT7phPiQ/UAEPL1e3XO
 e4nFwX9h78wISBdy8Yx7
 =+jBV
 -----END PGP SIGNATURE-----

Merge tag 'media/v4.12-2' into patchwork

media fixes for v4.12-rc4

* tag 'media/v4.12-2': (598 commits)
  [media] rc-core: race condition during ir_raw_event_register()
  [media] cec: drop MEDIA_CEC_DEBUG
  [media] cec: rename MEDIA_CEC_NOTIFIER to CEC_NOTIFIER
  [media] cec: select CEC_CORE instead of depend on it
  [media] rainshadow-cec: ensure exit_loop is intialized
  [media] atomisp: don't treat warnings as errors
  Linux 4.12-rc3
  x86/ftrace: Make sure that ftrace trampolines are not RWX
  x86/mm/ftrace: Do not bug in early boot on irqs_disabled in cpu_flush_range()
  selftests/ftrace: Add a testcase for many kprobe events
  kprobes/x86: Fix to set RWX bits correctly before releasing trampoline
  ftrace: Fix memory leak in ftrace_graph_release()
  ipv4: add reference counting to metrics
  net: ethernet: ax88796: don't call free_irq without request_irq first
  ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets
  sctp: fix ICMP processing if skb is non-linear
  net: llc: add lock_sock in llc_ui_bind to avoid a race condition
  PCI/msi: fix the pci_alloc_irq_vectors_affinity stub
  blk-mq: Only register debugfs attributes for blk-mq queues
  x86/timers: Move simple_udelay_calibration past init_hypervisor_platform
  ...

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 07:50:49 -03:00
Takashi Iwai 4c7aba46c9 Merge branch 'for-linus' into for-next
For applying more ALSA timer cleanups.
2017-06-07 10:25:30 +02:00
Gilad Ben-Yossef 26f4b1f7a8 staging: ccree: fix buffer copy
Fix a bug where the copying of scatterlist buffers incorrectly
ignored bytes to skip in a scatterlist and ended 1 byte short.

This fixes testmgr hmac and hash test failures currently obscured
by hash import/export not being supported.

Fixes: abefd6741d ("staging: ccree: introduce CryptoCell HW driver").

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:23:27 +02:00
Bo YU e5770b7bdb staging: speakup: alignment match open parens
I have aligned argument with parenthesis, so checkpatch no check also.

Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:17:31 +02:00
Bo YU 1f10145646 staging: speakup: in serialio.c no over 80 chars long
Fixed the checkpatch.pl warning:

WARNING: line over 80 characters

Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:17:30 +02:00
Bo YU 79de2d0e8d staging: speakup: add a space around '|'
Add a space around logical symbol '|' to wipe out checkpatch check

Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:17:30 +02:00
Bo YU f6089ae42f staging: speakup: add a missing blank line after declaration
Fixed checkpatch warning by adding a blank line after declare
expression

Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:17:30 +02:00
Daniel Micay 88a5b39b69 staging/rts5208: Fix read overflow in memcpy
Noticed by FORTIFY_SOURCE, this swaps memcpy() for strncpy() to zero-value
fill the end of the buffer instead of over-reading a string from .rodata.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
[kees: wrote commit log]
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:16:10 +02:00
Colin Ian King 372bd1eb84 staging: rtl8723bs: fix a couple of spelling mistakes
Replace cant with cannot, argumetns with arguments and
add line break to overly long DBG_871X statement.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:16:10 +02:00
Jia-Ju Bai 498c4b4e9c staging: rt5208: Fix a sleep-in-atomic bug in xd_copy_page
The driver may sleep under a spin lock, and the function call path is:
rtsx_exclusive_enter_ss (acquire the lock by spin_lock)
  rtsx_enter_ss
    rtsx_power_off_card
      xd_cleanup_work
        xd_delay_write
          xd_finish_write
            xd_copy_page
              wait_timeout
                schedule_timeout --> may sleep

To fix it, "wait_timeout" is replaced with mdelay in xd_copy_page.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:16:10 +02:00
Sudip Mukherjee ac66925108 staging: sm750fb: change default screen resolution
Update the default screen resolution and also use 24bpp for a better
screen performance.

Tested-by: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:16:10 +02:00
Adrian Stanciu 97b30bad76 staging: comedi: ni_labpc_isadma: fixed a comment coding style issue
Fixed a BLOCK_COMMENT_STYLE warning reported by checkpatch.pl script.

Signed-off-by: Adrian Stanciu <adrian.stanciu.pub@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:16:09 +02:00
Sean Young 614d651e1a [media] staging: remove todo and replace with lirc_zilog todo
The lirc_zilog driver is the last remaining lirc driver, so the existing
todo is no longer relevant.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:18:08 -03:00
Ricardo Silva da731edb5b [media] lirc_zilog: Fix unbalanced braces around if/else
Fix all checkpatch reported issues for:

 * CHECK: "braces {} should be used on all arms of this statement".
 * CHECK: "Unbalanced braces around else statement".

Make sure all if/else statements are balanced in terms of braces. Most
cases in code are, but a few were left unbalanced, so put them all
consistent with the recommended style.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:13:06 -03:00
Ricardo Silva d44e07c752 [media] lirc_zilog: Use sizeof(*p) instead of sizeof(struct P)
Fix all checkpatch reported issues for "CHECK: Prefer
kzalloc(sizeof(*<p>)...) over kzalloc(sizeof(struct <P>)...)".

Other similar case in the code already using recommended style, so make
it all consistent with the recommended practice.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:12:13 -03:00
Ricardo Silva 41a603f8d9 [media] lirc_zilog: Use __func__ for logging function name
Fix all checkpatch reported issues for "CHECK: Prefer using '"%s...",
__func__' to using '<func_name>', ..."

Use recommended style. Additionally, __func__ was already used in
similar cases throughout the code, so make it all consistent.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:11:48 -03:00
Ricardo Silva 28b671b4ba [media] lirc_zilog: Fix NULL comparisons style
Fix all checkpatch reported issues for "CHECK: Comparison to NULL could
be written...".

Do these comparisons using the recommended coding style and consistent
with other similar cases in the file, which already used the recommended
way.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:11:13 -03:00
Ricardo Silva 32ddcbb5b8 [media] lirc_zilog: Fix whitespace style checks
Fix style issues reported by checkpatch, affecting whitespace only:

 * CHECK: "Please don't use multiple blank lines".
   Two of these still triggering and left untouched because used for
   separating logical blocks (vars from functions, etc.).

 * CHECK: "spaces preferred around that '<operator>'".
   All fixed.

 * CHECK: "Alignment should match open parenthesis".
   All fixed except one on line 1161, left untouched for readability.

Move towards recommended coding style without compromising readability.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:10:46 -03:00
David Härdeman bd16168da8 [media] lirc_zilog: remove module parameter minor
Always let the kernel decide what minor the lirc chardev gets.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:03:39 -03:00
David Härdeman c3104e1b42 [media] lirc_dev: remove sampling kthread
There are no drivers which use this functionality.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:00:56 -03:00
David Härdeman 52e809f9fe [media] lirc_dev: remove pointless functions
drv->set_use_inc and drv->set_use_dec are already optional so we can
remove all dummy functions.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 08:59:28 -03:00
Mauro Carvalho Chehab f224c5768c [media] atomisp: don't treat warnings as errors
Several atomisp files use:
	 ccflags-y += -Werror

As, on media, our usual procedure is to use W=1, and atomisp
has *a lot* of warnings with such flag enabled,like:

./drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h:62:26: warning: 'DDR_BASE' defined but not used [-Wunused-const-variable=]

At the end, it causes our build to fail, impacting our workflow.

So, remove this crap. If one wants to force -Werror, he
can still build with it enabled by passing a parameter to
make.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-04 15:23:32 -03:00
Richard Porter 9f98c6e67f staging: ks7010: use le16_to_cpu() to access __le16 field
Fixes sparse warning:
drivers/staging/ks7010/ks_hostif.c:959:24: warning: restricted __le16
degrades to integer

Signed-off-by: Richard Porter <dick@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 16:54:19 +02:00
Colin Ian King 1d80d1bd17 staging: ccree: fix spelling mistake: "chanined" -> "chained"
Trivial fix to spelling mistake in SSI_LOG_ERR message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:17:42 +02:00
Colin Ian King 54f6f4deed staging: rtl8723bs: fix another spelling mistake
I found one more spelling mistake in a DBG_8192C debug message,
replace "avaliable" with "available", add some spacing between
text and a number and split overly long line

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:17:42 +02:00
Konrad Malkowski 66cd04714b staging: rtl8192e: all lines in dot11d.h are less than 80 chars long
This patch fixes the checkpoint.pl warning:

WARNING: line over 80 characters

Signed-off-by: Konrad Malkowski <konrad.malkowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:17:42 +02:00
edcarter 3137139a65 Staging: comedi: s626.c: fixed trailing */ style issue
Fixed coding style issue where trailing */ in block comments
were not on separate lines.

Signed-off-by: Elias Carter <edcarter@ualberta.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:17:42 +02:00
Gilad Ben-Yossef b52fb14072 staging: ccree: remove descriptor context definitions
Remove definitions of descriptor context which are not used
in the driver.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:26 +02:00
Gilad Ben-Yossef da38a83ba7 staging: ccree: remove last remnants of sblkcipher
The cipher code had some left overs of an attempt to support
synch. cipher API with the HW. Remove the code handling this.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:26 +02:00
Gilad Ben-Yossef d3eff5722c staging: ccree: remove last remnants of sash algo
The hash code had some left overs from a misguided attempt
to support shash API with the HW. Remove the code handling
this.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:26 +02:00
Gilad Ben-Yossef 087fabd1cd staging: ccree: fix wrong whitespace usage
Some of the register definition files had none
kernel coding style usage of tabs vs. spaces in macro
definitions. This patch fixes them.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:26 +02:00
Gilad Ben-Yossef ee15d16946 staging: ccree: remove spurious blank line
Remove spurious blank line from cc_regs.h

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:26 +02:00
Gilad Ben-Yossef 1c0cccd9aa staging: ccree: remove dead code
Remove some unused macro definitions from hash definitions.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef ef78342266 staging: ccree: drop no longer used macro
MSB64 macro is no longer used or needed. Drop it.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef 84d69a7b03 staging: ccree: use snake_case for hash enums
Hash enum were named using CamelCase, move over to snake_case.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef c928f1d7cb staging: ccree: remove unused struct
struct SepHashPrivateContext is not used anywhere in the code.
Remove it.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef ed7443911e staging: ccree: remove custom bitfield macros
With all users removed or re-factored to use the standard
kernel bit fields ops we can now drop the custom
bit field macros.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef 37a99c9831 staging: ccree: move request_mgr to generic bitfield ops
request_mgr was using custom bit field macros. move over to
standard kernel bitfield ops.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef 7f821f0c6f staging: ccree: remove cycle count debug support
The ccree driver had support for rough performance debugging
via cycle counting which has bit rotted and can easily be
replcaed with perf. Remove it from the driver.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef 841d1d806c staging: ccree: remove unused debug macros
The DUMP_SGL() and DUMP_MLLI_TABLE() debug macros were
defined but not used anywhere and the difference of their
definitions for debug vs. none debug indicated this has
not being used in a while.

Remove the dead code.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef b953295421 staging: ccree: move M/LLI defines to header file
A bunch of macros used to define M/LLI descriptors where
being defined in the C file. Move them over to private
include file where other relevant definitions are stored.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef c6f7f2f459 staging: ccree: refactor LLI access macros
The Linked List Item descriptors were being programmed via
a set of macros which suffer a few problems:
- Use of macros rather than inline leaves out parameter type
  checking and risks multiple macro parameter evaluation side
  effects.
- Implemented via hand rolled versions of bitfield operations.

This patch refactors LLI programming into a set of
of inline functions using generic kernel bitfield access
infrastructure, thus resolving the above issues and opening
the way later on to drop the hand rolled bitfield macros
once additional users are dropped in later patches in the
series.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef 13ddf62156 staging: ccree: remove 48 bit dma addr sim
Remove no longer needed code used to simulate 48 bit dma addresses
on 32 bit platforms for development purposes.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef 8b64e512de staging: ccree: refactor HW command FIFO access
The programming of the HW command FIFO in ccree was done via
a set of macros which suffer a few problems:
- Use of macros rather than inline leaves out parameter type
  checking and risks multiple macro parameter evaluation side
  effects.
- Implemented via hand rolled versions of bitfield operations.

This patch refactors the HW command queue access into a set
of inline functions using generic kernel bitfield access
infrastructure, thus resolving the above issues and opening
the way later on to drop the hand rolled bitfield macros
once additional users are dropped in later patches in the
series.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Gilad Ben-Yossef 6562e7db13 staging: ccree: replace bit shift with BIT macro
CC_CTX_SIZE was being defined using a hand rolled bit shift operation.
Replace with use of BIT macro.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-04 10:16:25 +02:00
Derek Robson ed5210cb07 Drivers: ccree: cc_hw_queue_defs.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:19 +09:00
Derek Robson f6858e91ee Drivers: ccree: cc_regs.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson ebe22ecce1 Drivers: ccree: hash_defs.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson f4e929bbd8 Drivers: ccree: ssi_aead.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson f5bd89b893 Drivers: ccree: ssi_aead.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson 2686444e5f Drivers: ccree: ssi_buffer_mgr.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson 84e8a6cf4c Drivers: ccree: ssi_buffer_mgr.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson ef5d7bd9a9 Drivers: ccree: ssi_cipher.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson f892b06826 Drivers: ccree: ssi_config.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson 250a00a7fc Drivers: ccree: ssi_driver.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson 3a82eb631f Drivers: ccree: ssi_fips.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson cbff760259 Drivers: ccree: ssi_fips.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson 7c3a293d43 Drivers: ccree: ssi_fips_data.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson f77aa70be3 Drivers: ccree: ssi_fips_ext.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Derek Robson 161d6dd8c8 Drivers: ccree: ssi_fips_ll.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:53:18 +09:00
Jia-Ju Bai ed99f0141b rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss
The driver may sleep under a spin lock, and the function call path is:
rtsx_exclusive_enter_ss (acquire the lock by spin_lock)
  rtsx_enter_ss
    rtsx_power_off_card
      sd_cleanup_work
        sd_stop_seq_mode
          sd_switch_clock
            sd_ddr_tuning
              sd_ddr_pre_tuning_tx
                sd_change_phase
                  wait_timeout
                    schedule_timeout --> may sleep

To fix it, "wait_timeout" is replaced with mdelay in sd_change_phase.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:52:00 +09:00
Jia-Ju Bai 385cab7c71 rts5208: Fix a sleep-in-atomic bug in sd_power_off_card3v3
The driver may sleep under a spin lock, and the function call path is:
rtsx_exclusive_enter_ss (acquire the lock by spin_lock)
  rtsx_enter_ss
    rtsx_power_off_card
      sd_power_off_card3v3
        wait_timeout
          schedule_timeout --> may sleep

To fix it, "wait_timeout" is replaced with mdelay in sd_power_off_card3v3.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:52:00 +09:00
Gilad Ben-Yossef a0eee1b6da staging: ccree: add parentheses to macro argument
Add parentheses around macro argument to guard against precedence
issues.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:45:06 +09:00
Gilad Ben-Yossef 33c73ae72e staging: ccree: fix comments formatting
A few of the comments in cc_crypto_ctx.h where not formatted
correctly. Format according to coding style guidelines.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:45:06 +09:00
Gilad Ben-Yossef 3e008c1744 staging: ccree: fix longer than 80 chars lines
Clip longer than 80 chars lines in header files worked
on in the patch set.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:45:04 +09:00
Gilad Ben-Yossef f9f28369a7 staging: ccree: remove spurious blank lines
Remove spurious blanks lines from cc_crypto_ctx.h file

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:45:00 +09:00
Mart Lubbers 9f5c6b7258 Staging: gdm724x: Change spaces to tabs
This patch fixes the following checkpatch.pl warning in gdm_usb.c:
WARNING: suspect code indent for conditional statements (8, 12)

Signed-off-by: Mart Lubbers <mart@martlubbers.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:38:26 +09:00
Gleb Fotengauer-Malinovskiy f7a320ffeb staging: android: uapi: drop definitions of removed ION_IOC_{FREE,SHARE} ioctls
This problem was found by strace ioctl list generator.

Fixes: 15c6098cfe ("staging: android: ion: Remove ion_handle and ion_client")
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:38:26 +09:00
Okash Khawaja 349190d56b staging: speakup: remove unused code
In spk_ttyio_release we read tty's index but never do anything with it.
The patch removes this dead code.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:38:25 +09:00
Okash Khawaja 011cca558b staging: speakup: check for null before calling TTY's flush_buffer
We should check the flush_buffer method of a tty for null before
invoking it. Some drivers such as usbserial don't implement
flush_buffer. This will be required for upcoming patches where we expand
spk_ttyio to support more than just ttyS*.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:38:25 +09:00
Nikola Jelic d0b112ac2a staging: lustre: in-place endianness functions
lib-move.c file has a lot of expressions in the form of:
v = le[32|64]_to_cpu(v);
This caused a lot of sparse warnings.
Replaced with:
le[32|64]_to_cpus(&v);

Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:32:41 +09:00
Nikola Jelic e4e5f9c6c7 staging: lustre: changed __u32 to __be32
Temporary variable is used only as __be32, for both assignments and reads,
but the type is inconsistent (__u32).

Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:32:41 +09:00
Nikola Jelic 78c486189d lustre: ko2iblnd: removed forced u32 casts after htonl
sockaddr_in.sin_addr.s_addr is __be32 integral type, so the (__force u32)
cast after the htonl call is unnecessary, and also detected by sparse:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2309:33: warning: incorrect type in assignment (different base types)
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:2381:30: warning: incorrect type in assignment (different base types)

Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:32:41 +09:00
Valentin Vidic 135e55f1d7 staging: lustre: cleanup le32 assignment to ldp_flags
Introduces a local var to collect flags and convert
them to le32.

Fixes the following sparse warnings:

drivers/staging/lustre/lustre/lmv/lmv_obd.c:2305:23: warning: invalid assignment: |=
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2305:23:    left side has type restricted __le32
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2305:23:    right side has type int
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2383:39: warning: invalid assignment: |=
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2383:39:    left side has type restricted __le32
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2383:39:    right side has type int

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:32:41 +09:00
Mathias Rav 82a52f8ee0 staging: lustre: lprocfs: Use seq_puts instead of seq_printf
Reported by checkpatch.pl: "WARNING: Prefer seq_puts to seq_printf".

Signed-off-by: Mathias Rav <mathiasrav@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:32:41 +09:00
Mathias Rav 8b23093269 staging: lustre: Use kstrtouint_from_user in ldlm_rw_uint
Clean up the helper functions used to implement "dump_granted_max" in
debugfs.

Replace the lprocfs_rd_uint() and lprocfs_wr_uint() generic callbacks
with a simpler, more direct implementation of ldlm_rw_uint_fops.

There's a slight change in lustre debugfs write semantics: Using kstrtox
causes EINVAL when the written number is followed by other (garbage)
characters, whereas previously the garbage would be ignored and such a
write would succeed.

Signed-off-by: Mathias Rav <mathiasrav@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:32:41 +09:00
Konrad Malkowski 93e7ea8ca0 staging: lustre: Replace printk_ratelimited with pr_warn_ratelimited
This patch fixes the checkpoint.pl warning:

WARNING: Prefer printk_ratelimited or pr_<level>_ratelimited to
printk_ratelimit

Signed-off-by: Konrad Malkowski <konrad.malkowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:32:41 +09:00
Oleg Drokin 0a33252e06 staging/lustre/lov: remove set_fs() call from lov_getstripe()
lov_getstripe() calls set_fs(KERNEL_DS) so that it can handle a struct
lov_user_md pointer from user- or kernel-space.  This changes the
behavior of copy_from_user() on SPARC and may result in a misaligned
access exception which in turn oopses the kernel.  In fact the
relevant argument to lov_getstripe() is never called with a
kernel-space pointer and so changing the address limits is unnecessary
and so we remove the calls to save, set, and restore the address
limits.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/6150
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3221
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:17:19 +09:00
Boris Brezillon 4a78cc644e mtd: nand: Make sure drivers not supporting SET/GET_FEATURES return -ENOTSUPP
A lot of drivers are providing their own ->cmdfunc(), and most of the
time this implementation does not support all possible NAND operations.
But since ->cmdfunc() cannot return an error code, the core has no way
to know that the operation it requested is not supported.

This is a problem we cannot address for all kind of operations with the
current design, but we can prevent these silent failures for the
GET/SET FEATURES operation by overloading the default
->onfi_{set,get}_features() methods with one returning -ENOTSUPP.

Reported-by: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
2017-05-30 08:59:26 +02:00
Stefan Wahren 57d14635f9 staging: vchiq_core: Replace remaining BUG_ON with WARN_ON
This replaces all remaining BUG_ON with WARN_ON. So in case of
a VCHIQ bug the system is still usable.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:04:13 +02:00
Stefan Wahren d1eab9dec6 staging: vchiq_core: Bail out in case of invalid tx_pos
Properly handle the error case in case of an invalid tx_pos.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:04:13 +02:00
Stefan Wahren 6f2370d260 staging: vchiq_core: Don't BUG if process is unexpected
Bail out properly if the process index doesn't match the remote insert.
We also drop the BUG in case the process index is at local insert,
so we can trigger the WARN_ON again some steps later.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:04:13 +02:00
Stefan Wahren 5d1a94bb28 staging: vchiq_core: Bail out if ref_count is unexpected
If the ref counter of service has an unexpected value then we better
bail out.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:04:13 +02:00
Stefan Wahren 6b8db0bce3 staging: vchiq_core: Bail out if service is NULL
In the unlikely case that service is NULL we should bail out instead
of calling BUG_ON(). The other BUG_ON calls will be fixed in separate
patches.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:04:13 +02:00
Stefan Wahren 00b9d0f560 staging: vchiq_core: Don't BUG if sending RESUME fails
VCHIQ suspend and resume isn't implemented, but even it was
there is no need to call BUG().

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:04:13 +02:00
Stefan Wahren 359afaccd9 staging: vchiq_core: Bailout if VCHIQ state is already initialized
In case VCHIQ state is already initialized we need to bailout
in order to aovid a memory leak.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:04:12 +02:00
Stefan Wahren 7c35c6af0c staging: vchiq_core: Simplify VCHIQ init
Since the ARM side of VCHIQ support only 1 state, we could simplify
the init code. This makes it possible to avoid BUG_ON and a theoretical
overflow of id.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:02:30 +02:00
Stefan Wahren 244156ca90 staging: vchiq_2835_arm: Use PAGE_MASK macro
Use the PAGE_MASK instead of open code it.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:02:30 +02:00
Stefan Wahren 025f69ade9 staging: vchiq_2835_arm: Handle vmalloc_to_page error case
In case vmalloc_to_page returns NULL create_pagelist must abort
imediatly.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:02:30 +02:00
Stefan Wahren 804980adb9 staging: vchiq_2835_arm: Fix function name cleaup_pagelistinfo
Assuming the intension of the function is to clean up, so fix the function
name accordingly.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:02:29 +02:00
Stefan Wahren b322396ce8 staging: vchiq_arm: Avoid multiline dereference
Reduce the indentation within vchiq_dump_service_use_state in order
to avoid a multiline derefernce.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:02:29 +02:00
Stefan Wahren 42a6bd8f77 staging: vchiq_arm: Fix variable names in comment
This comment was apparently forgotten in the correction of CamelCase.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:02:29 +02:00
Stefan Wahren 76262b2951 staging: vchiq_2835_arm: Remove unnecessary assignment to slot_mem_size
The variable slot_mem_size is assigned a value which is never used.
This issue has been found by CppCheck.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:02:29 +02:00
Stefan Wahren 158ef80a87 staging: vchiq_2835_arm: Reduce scope of i in free_pagelist
We can reduce the scope of the counting variable i. This has
been found by CppCheck.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:02:29 +02:00
Stefan Wahren d3de2bb882 staging: vchiq_core: Use return value of mutex_lock_killable directly
Instead of saving the return value of mutex_lock_killable in a
local variable we could use the value directly.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 17:02:29 +02:00
Juliana Rodrigues 5b29aaaa1e staging: rtl8188eu: removes comparison to null
This patch fixes multiple comparison to NULL checkpatch errors by
rewriting the conditional as a negation.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:59:32 +02:00
Juliana Rodrigues b2f98d02c7 staging: rtl8188eu: removed unnecessary blank lines
Removes numerous unnecessary blank lines in order to fix
checkpatch styling issues.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:59:32 +02:00
Juliana Rodrigues 3e63e934f7 staging: rtl8188eu: removed unnecessary parentheses
This patch removes numerous unnecessary parentheses in order
to fix checkpatch styling issues.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:59:32 +02:00
Juliana Rodrigues f6da172f21 staging: rtl8188eu: removed function names from strings
This patch fixes a checkpatch issue caused by using function
names inside strings. Those function names were replaced by
__func__.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:59:32 +02:00
Juliana Rodrigues ae94127b01 staging: rtl8188eu: add spaces around character
This patch solves a checkpatch issue caused by not using spaces
around an OR sign.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:59:32 +02:00
Juliana Rodrigues 31e6de0048 staging: rtl8188eu: fixes block comments subsequent lines
This patch adds * on block comments subsequent lines, which were
causing a checkpatch styling warning.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:57:21 +02:00
Juliana Rodrigues 74e1e498e8 staging: rtl8188eu: fix comments with lines over 80 characters
This patch fixes some checkpatch errors in which comments go over
80 characters per line.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:57:20 +02:00
Szilveszter Székely 9415b671a9 staging: rtl8192u: swap comparison to constant
Comparisons should place the constant on the right side of the test

This patch fixes coding style issues as reported by checkpatch.

Signed-off-by: Szilveszter Székely <szekelyszilv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:57:20 +02:00
Ioana Radulescu 1e5fa9e260 staging: fsl-dpaa2/eth: Map Tx buffers as bidirectional
WRIOP hardware may need to write to the hardware annotation
area of Tx buffers (e.g. frame status bits) and also to
the data area (e.g. L4 checksum in frame header).

Map these buffers as DMA_BIDIRECTIONAL, otherwise the
write transaction through SMMU will not be allowed.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:57:20 +02:00
Ioana Radulescu 08eb23974e staging: fsl-dpaa2/eth: Fix address translations
Use the correct mechanisms for translating a DMA-mapped IOVA
address into a virtual one. Without this fix, once SMMU is
enabled on Layerscape platforms, the Ethernet driver throws
IOMMU translation faults.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:57:20 +02:00
Derek Robson 3ddf70e15d Drivers: ccree: ssi_fips_local.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:43 +02:00
Derek Robson 1a3a8d2e86 Drivers: ccree: ssi_hash.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:43 +02:00
Derek Robson 77f34fc3f5 Drivers: ccree: ssi_hash.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:43 +02:00
Derek Robson fc3d47b3ec Drivers: ccree: ssi_ivgen.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:43 +02:00
Derek Robson 3dc178b164 Drivers: ccree: ssi_pm.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:43 +02:00
Derek Robson ff7c2e41d4 Drivers: ccree: ssi_pm_ext.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:43 +02:00
Derek Robson 5d19caf6e9 Drivers: ccree: ssi_pm_ext.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:42 +02:00
Derek Robson 1010faa482 Drivers: ccree: ssi_request_mgr.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:42 +02:00
Derek Robson 2f930981b8 Drivers: ccree: ssi_request_mgr.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:42 +02:00
Derek Robson 6dbd671c07 Drivers: ccree: ssi_sysfs.c - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:53:42 +02:00
Derek Robson d057b3b78d Drivers: ccree: ssi_sysfs.h - align block comments
Fixed block comment alignment, Style fix only
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:49:56 +02:00
Gennadii Altukhov ba3937d6a6 staging: ccree: fix cc_crypto_ctx.h white spaces
Fix checkpatch.pl reported checks: spaces preferred around '/' and '<<' in cc_crypto_ctx.h

Signed-off-by: Gennadii Altukhov <grinrag@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:49:56 +02:00
Marko Stankovic a135c4f6b5 staging: wilc1000: add missing blank line after struct declaration
Fix a missing blank line issue reported by checkpatch.pl

Signed-off-by: Marko Stankovic <dartnorris@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:41:38 +02:00
Marko Stankovic 15e7681a21 staging: wilc1000: remove excessive blank lines
Fix the multiple blank lines issue reported by checkpatch.pl

Signed-off-by: Marko Stankovic <dartnorris@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:41:38 +02:00
Nikola Jelic 126ef7760b staging: wlan-ng: hfa384x: fix several type issues.
There were several in-place conversions of 16 and 32-bit data, which caused
sparse to detect them. Changed them to the in situ versions, such as:
le16_to_cpu -> le16_to_cpus

Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:41:38 +02:00
Rishiraj Manwatkar 675b62d288 staging: fbtft: Fix to avoid precedence issues
Parentheses added to avoid operator precedence issues.

Signed-off-by: Rishiraj Manwatkar <manwatkar@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29 16:41:37 +02:00
Greg Kroah-Hartman ca9280d1f8 First set of new device support, features and cleanups for IIO in the 4.13 cycle
Two entirely new drivers in here plus the usual range of cleanups and features.
 
 New device support
 * ad5064
   - add ltc2631, ltc2633 and ltc2635 support.
 * bma180
   - trivial support for bma250e (new id)
 * hid-sensor-rotation
   - add relative orientation and geometric orientation support.
 * isl29028
   - add isl29030 support (its effectively the same part from a driver point of
   view)
 * maxim_thermocouple
   - add max31856 id.
 * meson-saradc
   - add meson8b SoC adc support.
 * ti-adc084s021
   - new driver and bindings.
 * ti-adc108s102
   - new driver and bindings.
 
 Staging graduations
 * isl29028
 
 Features
 * bma180
   - ACPI enumeration for BMA250E which is used in various x86 tablets.
 * hi8453
   - add raw access rather than only events.
 * hid-sensor-hub
   - Implement batch mode in which we can set a threshold on the amount of time
   between data coming from the fifos.  This is the first device to do this
   rather than use a watershed on the number of samples.
 * hts221
   - power management support
 * lsm6dsx
   - add system power management support.
 * rpr0521
   - sampling frequency read / write
 * stm32-trigger
   - add support for TRG02 triggers.
 * tsl2583
   - runtime power management support.
 
 Cleanups
 * core
   - inkern: fix a double unlock in iio_read_available_channel_raw when raw
   value doesn't appear to be raw (error path).
   - fixup accidental sizeof pointer in iio_device_add_mask_type.
 * docs
   - fix an accidental duplicated line in sysfs-bus-iio-meas-spec.
 * tools
   - use local include/uapi headers to ensure always up to date.
   - increase length of allowed trigger names.
 * ad9834
   - symbolic to octal permissions.
 * ade7753
   - symbolic to octal permissions.
   - fix indentation
 * ade7754
   - symbolic to octal permissions.
 * ade7758
   - symbolic to octal permissions.
 - ade7854
   - symbolic to octal permissions.
 * as3935
   - move out of storm check to given consistent results for raw and processed
   values.
 * bmp280
   - fix bme280 naming in Kconfig help.
 * hi8435
   - avoid garbage on event after enable.
   - add missing in_voltage_sensing_mode_available to list possible enum options.
   - handle the reset gpio with the obvious polarity rather than relying on
   DT to provide it correctly.
 * hid-sensors
   - fix a wrong error path scrubbing of return values.
 * hid-sensors-accel
   - drop static on a local variable
 * hid-sensors-rotation
   - Add missing scale and offset property parsing support.
 * ina2xx
   - Fix a bad use of GENMASK and some typos and whitespace issues.
 * isl29018
   - only declare the ACPI table when ACPI is enabled.
 * isl29028
   - fix proximity sleep times.
 * lsm6dsx
   - replace ifdef CONFIG_PM with __maybe_unused to avoid the complexity of
   dealing with the various PM config variables.
 * meson-saradc
   - mark meson_sar_adc_data static and const.
 * rcar-gyroadc
   - derive the interface clock speed from the fck clock on the basis they are
   the same actual clock.
   - drop the now unused if clock from the bindings.
 * rpr0521
   - disable sensor when marked as such rather than always enabling it.
   - poweroff if probe fails and we can talk to device.
   - make sure device powered off when it doesn't need to be on.
   - use sizeof rather than hardcoded size on value read.
   - whitespace fixup.
   - reorder channel numbers ready for buffered support which didn't quite
   make this pull request.
 * st-accel
   - fix platform data initialization to allow remove and reprobe.
 * st-pressure
   - fix platform data initialization to allow remove and reprobe.
 * tsl2x7x
   - S_IRUGO, S_IWUSR to octal values
   - rename driver for consistency with more recent drivers
   - drop FSF mailing address
   - replace DEVICE_ATTR macros with the shorter DEVICE_ATTR_RW form and
   relevant function renames.
 * zpa2326
   - report an error for consistency with other error paths.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAlkjSHkRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FojDqQ//TVibBBZ0GgA+MwjIMDCpYL6CW4l+Et5v
 bD1EThc+qf3jv9kWbBz6WgySj9koZeF/hc0GN7x8XF57TeF/8sXhtbZKQ0za0Ouf
 uKAfYNi7jtdA4UEFawYrFUGIZtgQlbll/DKj7x2yDZtwIge9QF61fzPehGpq0u3b
 IiNlNFQSTKXOHi5tobMXXdBFL90m6kqDZM5ZwAWtQoSu1xQTjCsxu/LMJAJ3H7rU
 KEptEhc80kAvGqflOvw/HMaU7O7SXAhW3sQnXM2ksnDScGZ+zNzLcoca1YfM73rv
 x3vM/XL93A6CcRQkzFUC5vbtVVl00BMI7G3PQTGDOWWPgUPksLVIzfJR9GOqNmIJ
 W3HVwQbDZPvAbubvFHlUBa9ys4cbcmwU9214S57DvzVEt+cvpdujjIZ2Ulw3sVqN
 3xB1P9kNlcYvmBBu6LbP5GTDEu+VEETTjwj3osyimi56Zt44pJhoT68D46SD34Zw
 i3LCMFbbdJzEK4UWsvoBKFsTPipXgOntYDXaMZbULjtmJ6PEw0feubQIpMwtF5iw
 4fGk/1Q6l//rItJlXZE9PPiEBbXZ856lk/KQn+9vRABCrFni+7HWf6aDvkjf14o0
 8W+P/kAcXOPrToN2+NnAbIh7c9PLYmFWJa7DvDnQ5Guy0GStlxG18QEMNAhf39/0
 j/xopB1g8MI=
 =XLVY
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.13a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First set of new device support, features and cleanups for IIO in the 4.13 cycle

Two entirely new drivers in here plus the usual range of cleanups and features.

New device support
* ad5064
  - add ltc2631, ltc2633 and ltc2635 support.
* bma180
  - trivial support for bma250e (new id)
* hid-sensor-rotation
  - add relative orientation and geometric orientation support.
* isl29028
  - add isl29030 support (its effectively the same part from a driver point of
  view)
* maxim_thermocouple
  - add max31856 id.
* meson-saradc
  - add meson8b SoC adc support.
* ti-adc084s021
  - new driver and bindings.
* ti-adc108s102
  - new driver and bindings.

Staging graduations
* isl29028

Features
* bma180
  - ACPI enumeration for BMA250E which is used in various x86 tablets.
* hi8453
  - add raw access rather than only events.
* hid-sensor-hub
  - Implement batch mode in which we can set a threshold on the amount of time
  between data coming from the fifos.  This is the first device to do this
  rather than use a watershed on the number of samples.
* hts221
  - power management support
* lsm6dsx
  - add system power management support.
* rpr0521
  - sampling frequency read / write
* stm32-trigger
  - add support for TRG02 triggers.
* tsl2583
  - runtime power management support.

Cleanups
* core
  - inkern: fix a double unlock in iio_read_available_channel_raw when raw
  value doesn't appear to be raw (error path).
  - fixup accidental sizeof pointer in iio_device_add_mask_type.
* docs
  - fix an accidental duplicated line in sysfs-bus-iio-meas-spec.
* tools
  - use local include/uapi headers to ensure always up to date.
  - increase length of allowed trigger names.
* ad9834
  - symbolic to octal permissions.
* ade7753
  - symbolic to octal permissions.
  - fix indentation
* ade7754
  - symbolic to octal permissions.
* ade7758
  - symbolic to octal permissions.
- ade7854
  - symbolic to octal permissions.
* as3935
  - move out of storm check to given consistent results for raw and processed
  values.
* bmp280
  - fix bme280 naming in Kconfig help.
* hi8435
  - avoid garbage on event after enable.
  - add missing in_voltage_sensing_mode_available to list possible enum options.
  - handle the reset gpio with the obvious polarity rather than relying on
  DT to provide it correctly.
* hid-sensors
  - fix a wrong error path scrubbing of return values.
* hid-sensors-accel
  - drop static on a local variable
* hid-sensors-rotation
  - Add missing scale and offset property parsing support.
* ina2xx
  - Fix a bad use of GENMASK and some typos and whitespace issues.
* isl29018
  - only declare the ACPI table when ACPI is enabled.
* isl29028
  - fix proximity sleep times.
* lsm6dsx
  - replace ifdef CONFIG_PM with __maybe_unused to avoid the complexity of
  dealing with the various PM config variables.
* meson-saradc
  - mark meson_sar_adc_data static and const.
* rcar-gyroadc
  - derive the interface clock speed from the fck clock on the basis they are
  the same actual clock.
  - drop the now unused if clock from the bindings.
* rpr0521
  - disable sensor when marked as such rather than always enabling it.
  - poweroff if probe fails and we can talk to device.
  - make sure device powered off when it doesn't need to be on.
  - use sizeof rather than hardcoded size on value read.
  - whitespace fixup.
  - reorder channel numbers ready for buffered support which didn't quite
  make this pull request.
* st-accel
  - fix platform data initialization to allow remove and reprobe.
* st-pressure
  - fix platform data initialization to allow remove and reprobe.
* tsl2x7x
  - S_IRUGO, S_IWUSR to octal values
  - rename driver for consistency with more recent drivers
  - drop FSF mailing address
  - replace DEVICE_ATTR macros with the shorter DEVICE_ATTR_RW form and
  relevant function renames.
* zpa2326
  - report an error for consistency with other error paths.
2017-05-29 15:53:42 +02:00
Alexey Khoroshilov 95264c8c6a staging: iio: ad7152: Fix deadlock in ad7152_write_raw_samp_freq()
ad7152_write_raw_samp_freq() is called by ad7152_write_raw() with
chip->state_lock held. So, there is unavoidable deadlock when
ad7152_write_raw_samp_freq() locks the mutex itself.

The patch removes unneeded locking.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Fixes: 6572389bcc ("staging: iio: cdc: ad7152: Implement
IIO_CHAN_INFO_SAMP_FREQ attribute")
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-05-28 15:45:46 +01:00
Takashi Iwai 9ce7b9cf64 staging: bcm2835-audio: Deliver indirect-PCM transfer error
Now that the indirect-PCM transfer helper gives back an error, we
should return the error from ack callbacks.

Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-25 23:34:47 +02:00
Aliza Minkov 13253d808d dgnc: fix multiple blank lines coding style problem
According to the coding-style documentation, functions in source files
should be separated with one blank line. Redundant blank lines were
removed from this source file, in accordance with coding-style
documentation.

Signed-off-by: Aliza Minkov <minkov.al@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:56:45 +02:00
Marko Stankovic 7959c3314c staging: vt6655: align function parameters to open parenthesis
Alignment styles are used interchangeably, align parameters to open
parenthesis and fix issues reported by checkpatch.pl

Signed-off-by: Marko Stankovic <dartnorris@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:56:45 +02:00
Rui Teng fc0f0bd612 drivers/staging/speakup: fix indent coding style problem in spk_ttyio.c
This is a patch to the spk_ttyio.c file which fixes up the indent error
reported by the checkpatch.pl tool.

Signed-off-by: Rui Teng <rui.teng@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:56:45 +02:00
Marko Stankovic 5c60befe6d staging: vt6655: remove unnecessary blank lines
Fix unnecessary blank lines issues reported by checkpatch.pl

Signed-off-by: Marko Stankovic <dartnorris@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:56:45 +02:00
Marko Stankovic 3621014af3 staging: vt6655: replace NULL comparison with '!' operator
Fix comparison to NULL issues reported by checkpatch.pl

Signed-off-by: Marko Stankovic <dartnorris@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:56:45 +02:00
Marko Stankovic 5b5d636221 staging: vt6655: add spaces around '%' operator
Fix checkpatch issue by adding spaces around the '%' operator

Signed-off-by: Marko Stankovic <dartnorris@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:56:44 +02:00
Paolo Cretaro 7e4e3bca89 staging: android: ion: set init function as static
Fix warning issued by sparse:
symbol 'ion_device_create' was not declared. Should it be static?

Signed-off-by: Paolo Cretaro <melko@frugalware.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:56:44 +02:00
Dan Carpenter e45423d76f staging: speakup: signedness bug in spk_ttyio_in_nowait()
On most of the common arches char is signed so it can't ever == 0xff.
Let's fix this by making it a u8.

Fixes: 6b9ad1c742 ("staging: speakup: add send_xchar, tiocmset and input functionality for tty")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:56:32 +02:00
Sameer Wadgaonkar d70dd24521 staging: unisys: visorbus: remove channel_addr check in handle_command
Removed a check for physaddr=0 in handle_command() function in
visorchipset.c.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:14 +02:00
Sameer Wadgaonkar d36c4857cb staging: unisys: visorbus: add comment to explain polling logic in controlvm_periodic_work
Added a comment to explain polling frequency variation logic in
controlvm_periodic_logic() in visorchipset.c.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:14 +02:00
Sameer Wadgaonkar 172f4c367c staging: unisys: include: renamed structure spar_io_channel_protocol in iochannel.h to match driver namespace
Renamed structure spar_io_channel_protocol to visor_io_channel and
changed "visor bus" to "visorbus" in a comment in visornic_main.c
and visorhba_main.c.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:14 +02:00
Sameer Wadgaonkar 68646323cd staging: unisys: include: renamed #defines in iochannel.h to match driver namespace
Renamed #defines
* ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE to
		VISOR_VHBA_CHANNEL_SIGNATURE
* ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE to
		VISOR_VNIC_CHANNEL_SIGNATURE
* ULTRA_VSWITCH_CHANNEL_PROTOCOL_SIGNATURE to
		VISOR_VSWITCH_CHANNEL_SIGNATURE
* ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID to
		VISOR_VHBA_CHANNEL_VERSIONID
* ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID to
		VISOR_VNIC_CHANNEL_VERSIONID
* ULTRA_VSWITCH_CHANNEL_PROTOCOL_VERSIONID to
		VISOR_VSWITCH_CHANNEL_VERSIONID
* SPAR_VHBA_CHANNEL_OK_CLIENT to VISOR_VHBA_CHANNEL_OK_CLIENT
* SPAR_VNIC_CHANNEL_OK_CLIENT to VISOR_VNIC_CHANNEL_OK_CLIENT

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar c75ebe5e30 staging: unisys: include: renamed #defines in channel.h to match driver namespace
Renamed #defines
* ULTRA_CHANNEL_PROTOCOL_SIGNATURE to
		VISOR_CHANNEL_SIGNATURE
* SPAR_CHANNEL_SERVER_READY to
		VISOR_CHANNEL_SERVER_READY
* ULTRA_VALID_CHANNELCLI_TRANSITION
		VISOR_VALID_CHANNELCLI_TRANSITION
* ULTRA_CLIERRORBOOT_THROTTLEMSG_DISABLED to
		VISOR_CLIERRORBOOT_THROTTLEMSG_DISABLED
* ULTRA_CLIERRORBOOT_THROTTLEMSG_NOTATTACHED to
		VISOR_CLIERRORBOOT_THROTTLEMSG_NOTATTACHED
* ULTRA_CLIERRORBOOT_THROTTLEMSG_BUSY to
		VISOR_CLIERRORBOOT_THROTTLEMSG_BUSY
* ULTRA_IO_DRIVER_ENABLES_INTS to
		VISOR_DRIVER_ENABLES_INTS
* ULTRA_IO_CHANNEL_IS_POLLING to
		VISOR_CHANNEL_IS_POLLING
* ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS to
		VISOR_IOVM_OK_DRIVER_DISABLING_INTS
* ULTRA_IO_DRIVER_DISABLES_INTS to
		VISOR_DRIVER_DISABLES_INTS
* ULTRA_IO_DRIVER_SUPPORTS_ENHANCED_RCVBUF_CHECKING to
		VISOR_DRIVER_ENHANCED_RCVBUF_CHECKING
* ULTRA_CHANNEL_ENABLE_INTS to
		VISOR_CHANNEL_ENABLE_INTS
* SPAR_VHBA_CHANNEL_PROTOCOL_UUID to VISOR_VHBA_CHANNEL_UUID
* SPAR_VHBA_CHANNEL_PROTOCOL_UUID_STR to
		VISOR_VHBA_CHANNEL_UUID_STR
* SPAR_VNIC_CHANNEL_PROTOCOL_UUID to VISOR_VNIC_CHANNEL_UUID
* SPAR_VNIC_CHANNEL_PROTOCOL_UUID_STR to
		VISOR_VNIC_CHANNEL_UUID_STR
* SPAR_SIOVM_UUID to VISOR_SIOVM_UUID

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar 315dfc84d1 staging: unisys: include: renamed function spar_check_channel in channel.h to match driver namespace
Renamed function spar_check_channel() to visor_check_channel().

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar bac41a2f68 staging: unisys: visorinput: removed enum in ultrainputreport.h to match driver namespace
Removed enum ultra_inputaction in ultrainputreport.h and changed
elements to #defnes.

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar c2093c804c staging: unisys: visorinput: renamed structures in ultrainputreport.h to match driver namespace
Renamed structures
* ultra_inputactivity to visor_inputactivity
* ultra_inputreport to visor_inputreport

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar 785542c660 staging: unisys: visorinput: renamed #defines in visorinput.c to match driver namespace
Renamed #defines
* SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID to
		VISOR_KEYBOARD_CHANNEL_UUID
* SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID_STR to
		VISOR_KEYBOARD_CHANNEL_UUID_STR
* SPAR_MOUSE_CHANNEL_PROTOCOL_UUID to
		VISOR_MOUSE_CHANNEL_UUID
* SPAR_MOUSE_CHANNEL_PROTOCOL_UUID_STR to
		VISOR_MOUSE_CHANNEL_UUID_STR

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar d3ad6e69ca staging: unisys: visorbus: renamed enum in controlvmchannel.h to match driver namespace
Renamed enum and its members
* ultra_chipset_feature to visor_chipset_feature
* ULTRA_CHIPSET_FEATURE_REPLY to VISOR_CHIPSET_FEATURE_REPLY
* ULTRA_CHIPSET_FEATURE_PARA_HOTPLUG to
		VISOR_CHIPSET_FEATURE_PARA_HOTPLUG

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar 545f091389 staging: unisys: visorbus: renamed structures in controlvmchannel.h to match driver namespace
Renamed structures
* spar_segment_state to visor_segment_state
* efi_spar_indication to efi_visor_indication
* spar_controlvm_channel_protocol to visor_controlvm_channel
* spar_controlvm_parameters_header to
		visor_controlvm_parameters_header

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar c5a28902b4 staging: unisys: visorbus: renamed #defines in controlvmchannel.h to match driver namespace
Renamed #defines
* SPAR_CONTROLVM_CHANNEL_PROTOCOL_UUID to
		VISOR_CONTROLVM_CHANNEL_UUID
* ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE to
		VISOR_CONTROLVM_CHANNEL_SIGNATURE
* ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID to
		VISOR_CONTROLVM_CHANNEL_VERSIONID
* SPAR_CONTROLVM_CHANNEL_OK_CLIENT to
		VISOR_CONTROLVM_CHANNEL_OK_CLIENT

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar a27ded9272 staging: unisys: visorbus: renamed #defines in visorchipset.c to match driver namespace
Renamed #defines
* UNISYS_SPAR_LEAF_ID to UNISYS_VISOR_LEAF_ID
* UNISYS_SPAR_ID_EBX to UNISYS_VISOR_ID_EBX
* UNISYS_SPAR_ID_ECX to UNISYS_VISOR_ID_ECX
* UNISYS_SPAR_ID_EDX to UNISYS_VISOR_ID_EDX

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar 2b8ec7da96 staging: unisys: visorbus: renamed #define in visorchannel.c to match driver namespace
Renamed SPAR_CONSOLEVIDEO_CHANNEL_PROTOCOL_GUID to
VISOR_CONSOLEVIDEO_CHANNEL_GUID and renamed const
spar_video_guid to visor_video_guid

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar 55c71ebaf6 staging: unisys: visorbus: renamed structures in vbuschannel.h to match driver namespace
Renamed structures
* ultra_vbus_deviceinfo to visor_vbus_deviceinfo
* spar_vbus_headerinfo to visor_vbus_headerinfo
* spar_vbus_channel_protocol to visor_vbus_channel

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:13 +02:00
Sameer Wadgaonkar 734721746e staging: unisys: visorbus: renamed #defines in vbuschannel.h to match driver namespace
Renamed #defines:
* SPAR_VBUS_CHANNEL_PROTOCOL_UUID to VISOR_VBUS_CHANNEL_UUID
* SPAR_VBUS_CHANNEL_PROTOCOL_SIGNATURE to
		VISOR_VBUS_CHANNEL_SIGNATURE
* SPAR_VBUS_CHANNEL_PROTOCOL_VERSIONID to
		VISOR_VBUS_CHANNEL_VERSIONID

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Sameer Wadgaonkar 8b0a6cfa7f staging: unisys: visorbus: renamed functions like my_device_* to match driver namespace
Renamed functions
* my_device_create() to visorbus_device_create()
* my_device_changestate() to visorbus_device_changestate()
* my_device_destroy() to visorbus_device_destroy()

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Sameer Wadgaonkar 451072e3f0 staging: unisys: visorbus: renamed function initiate_chipset_device_pause_resume to match driver namespace
Renamed function initiate_chipset_device_pause_resume() to
visorchipset_initiate_device_pause_resume().

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Sameer Wadgaonkar c0b44136c8 staging: unisys: visorbus: renamed functions like chipset_device_* to match driver namespace
Renamed functions
* chipset_device_create() to visorchipset_device_create()
* chipset_device_destroy() to visorchipset_device_destroy()
* chipset_device_pause() to visorchipset_device_pause()
* chipset_device_resume() to visorchipset_device_resume()

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Sameer Wadgaonkar 4f96c7308e staging: unisys: visorbus: renamed functions like chipset_bus_* to match driver namespace
Renamed functions
* chipset_bus_create() to visorchipset_bus_create()
* chipset_bus_destroy() to visorchipset_bus_destroy()

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Sameer Wadgaonkar 9e78fd35df staging: unisys: visorbus: renamed functions like *_bus_instance to match driver namespace
Renamed functions
* create_bus_instance() to visorbus_create_instance()
* remove_bus_instance() to visorbus_remove_instance()

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Sameer Wadgaonkar f8b5a21feb staging: unisys: visorbus: renamed functions like device_*_response to match driver namespace
Renamed functions
* device_create_response() to visorbus_device_create_response()
* device_destroy_response() to visorbus_device_destroy_response()
* device_pause_response() to visorbus_device_pause_response()
* device_resume_response() to visorbus_device_resume_response()

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Sameer Wadgaonkar 63847f17f7 staging: unisys: visorbus: renamed functions like bus_*_response to match driver namespace
Renamed functions bus_create_response() to visorbus_create_response()
and bus_destroy_response() to visorbus_destroy_response().

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Sameer Wadgaonkar ec17cb8a6c staging: unisys: visorbus: renamed functions bus_create, bus_destroy and bus_configure to match driver namespace
Renamed the functions bus_create() to visorbus_create(),
bus_destroy() to visorbus_destroy() and bus_configure() to
visorbus_configure

Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Jon Frisch 603a1989c6 staging: unisys: visorbus: rename typ to cr_type
This patch renames enum crash_obj_type typ to cr_type.

Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:53:12 +02:00
Logan Gunthorpe 4f5d986592 staging: ccree: Cleanup: remove references to page_link
This is a layering violation so we replace it with calls to
sg_page. This is a prep patch for replacing page_link and this
is one of the very few uses outside of scatterlist.h.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Stephen Bates <sbates@raithlin.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:49:23 +02:00
Branislav Katreniak c2b21f688a staging: ccree: fix checkpatch no space before tabs
Fixes checkpatch warning:
WARNING: please, no space before tabs

Signed-off-by: Branislav Katreniak <brano@ksp.sk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:37:52 +02:00
Raphaël Beamonte 6aec6c7a47 drivers: staging: ccree: ISO C forbids casting to and from non-scalar
Fixes the following sparse warnings:
drivers/staging/ccree/ssi_hash.c:2447:24: warning: cast to non-scalar
drivers/staging/ccree/ssi_hash.c:2447:24: warning: cast from non-scalar
drivers/staging/ccree/ssi_hash.c:2448:28: warning: cast to non-scalar
drivers/staging/ccree/ssi_hash.c:2448:28: warning: cast from non-scalar

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 18:37:52 +02:00
Arnd Bergmann 3d51b95626 staging: ccree: add CRYPTO dependency
A rare randconfig build error shows up when we have CONFIG_CRYPTO=m
in combination with a built-in CCREE driver:

crypto/hmac.o: In function `hmac_update':
hmac.c:(.text.hmac_update+0x28): undefined reference to `crypto_shash_update'
crypto/hmac.o: In function `hmac_setkey':
hmac.c:(.text.hmac_setkey+0x90): undefined reference to `crypto_shash_digest'
hmac.c:(.text.hmac_setkey+0x154): undefined reference to `crypto_shash_update'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_setkey':
ssi_cipher.c:(.text.ssi_blkcipher_setkey+0x350): undefined reference to `crypto_shash_digest'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_exit':
ssi_cipher.c:(.text.ssi_blkcipher_exit+0xd4): undefined reference to `crypto_destroy_tfm'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_blkcipher_init':
ssi_cipher.c:(.text.ssi_blkcipher_init+0x1b0): undefined reference to `crypto_alloc_shash'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_ablkcipher_free':
ssi_cipher.c:(.text.ssi_ablkcipher_free+0x48): undefined reference to `crypto_unregister_alg'
drivers/staging/ccree/ssi_cipher.o: In function `ssi_ablkcipher_alloc':
ssi_cipher.c:(.text.ssi_ablkcipher_alloc+0x138): undefined reference to `crypto_register_alg'
ssi_cipher.c:(.text.ssi_ablkcipher_alloc+0x274): undefined reference to `crypto_blkcipher_type'

We actually need to depend on both CRYPTO and CRYPTO_HW here to avoid the
problem, since CRYPTO_HW is a bool symbol and by itself that does not
force CCREE to be a loadable module when the core cryto support is modular.

Fixes: 50cfbbb7e6 ("staging: ccree: add ahash support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-By: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 14:44:25 +02:00
Greg Kroah-Hartman 639e1c739b Merge 4.12-rc2 into staging-next
We want the staging tree fixes in here as well to handle the merge
issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-22 08:58:50 +02:00
Surender Polsani 52325ff42a staging: iio: light: Replace symbolic permissions as per coding style
Fixed the following checkpatch.pl warnings:
octal permissions are more preferable than symbolic permissions

Replaced DEVICE_ATTR family macros with DEVICE_ATTR_RW family
as suggested by Greg K-H. Changed attributes and function
names where ever required to satisfy internal macro definitions
like __ATTR__RW().

Signed-off-by: Surender Polsani <surenderpolsani@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-05-21 15:06:09 +01:00
Mauro Carvalho Chehab 4c9ef4f150 [media] atomisp: disable several warnings when W=1
The atomisp currently produce hundreds of warnings when W=1.

It is a known fact that this driver is currently in bad
shape, and there are lot of things to be done here.

We don't want to be bothered by those "minor" stuff for now,
while the driver doesn't receive a major cleanup. So,
disable those warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 08:57:05 -03:00
Manny Vindiola 54221e7248 [media] atomisp: fix missing blank line coding style issue in atomisp_tpg.c
This is a patch to the atomisp_tpg.c file that fixes up a missing
blank line warning found by the checkpatch.pl tool

Signed-off-by: Manny Vindiola <mannyv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:57:41 -03:00
Dan Carpenter c32e3d1b49 [media] atomisp: putting NULs in the wrong place
We're putting the NUL terminators one space beyond where they belong.
This doesn't show up in testing because all but the callers put a NUL in
the correct place themselves.  LOL.  It causes a static checker warning
about buffer overflows.

Fixes: a49d25364d ("staging/atomisp: Add support for the Intel IPU v2")

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:57:35 -03:00
Dan Carpenter d1fec5bdeb [media] atomisp: one char read beyond end of string
We should verify that "ix < max_len" before we test whether we have
reached the NUL terminator.

Fixes: a49d25364d ("staging/atomisp: Add support for the Intel IPU v2")

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:57:29 -03:00
Hans de Goede 02d978318b [media] atomisp: Fix -Werror=int-in-bool-context compile errors
With gcc-7.1.1 I was getting the following compile error:

error: ‘*’ in boolean context, suggest ‘&&’ instead

The problem is the definition of CEIL_DIV:
 #define CEIL_DIV(a, b)       ((b) ? ((a) + (b) - 1) / (b) : 0)

Which when called as: CEIL_DIV(x, y * z) triggers this error, note
we cannot do as the error suggests since b is evaluated multiple times.

This commit fixes these compile errors.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:57:21 -03:00
Guru Das Srinagesh c2c611b7b4 [media] atomisp: Make undeclared symbols static
Fix sparse warnings: "symbol not declared; should it be static?"

Signed-off-by: Guru Das Srinagesh <gurooodas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:57:14 -03:00
Avraham Shukron 8c7e9a7381 [media] atomisp: fix coding style warnings
Fix for warnings reported by checkpatch.pl:
 - Multiline comment style
 - Bare "unsigned"
 - Missing blank line after declarations
 - Un-needed braces around single-statement branch

Signed-off-by: Avraham Shukron <avraham.shukron@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:57:07 -03:00
Avraham Shukron b739d0247a [media] atomisp: fixed coding style errors
Fix for error (not warnings) reported by checkpatch.pl
Specifically:
 - missing whitespace around "=" and after ","
 - indentation with spaces instead of tabs
 - lines starting with a whitespace

This patch does not affect the compiled code in any way.

Signed-off-by: Avraham Shukron <avraham.shukron@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:57:01 -03:00
Valentin Vidic 76d041f276 [media] atomisp: drop unused qos variable
Fixes a sparse warning:

drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c:35:5: warning: symbol 'qos' was not declared. Should it be static?

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:56:55 -03:00
Avraham Shukron c6cfe6edd6 [media] atomisp: fixed sparse warnings
Added "static" storage class to 4 not-declared functions

Signed-off-by: Avraham Shukron <avraham.shukron@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-19 06:56:48 -03:00
Fabrizio Perria cc6a612ab8 [media] atomisp: Fix unnecessary initialization of static
Fix checkpatch warning: removed unnecessary initialization of
static variable "skip_fwload" to 0 in source atomisp_v4l2.c

Signed-off-by: Fabrizio Perria <fabrizio.perria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:56:43 -03:00
Guru Das Srinagesh 86675eccd1 [media] atomisp: use logical AND, not bitwise
Fixes sparse warning "dubious: x & !y" in logical expression.

Signed-off-by: Guru Das Srinagesh <gurooodas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:56:37 -03:00
Joe Perches 158aeefcb8 [media] atomisp: Add __printf validation and fix fallout
__printf validation adds format and argument validation.

Fix the various broken format/argument mismatches.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 06:56:31 -03:00
Arnd Bergmann 0687090acf staging: greybus: mark PM functions as __maybe_unused
Enabling the arche platform for compile testing showed a harmless
warning with CONFIG_PM=n:

drivers/staging/greybus/arche-platform.c:632:12: error: 'arche_platform_resume' defined but not used [-Werror=unused-function]
drivers/staging/greybus/arche-platform.c:618:12: error: 'arche_platform_suspend' defined but not used [-Werror=unused-function]

This marks the functions as __maybe_unused to shut up the warnings.

Fixes: 2eccd4aa19 ("staging: greybus: enable compile testing of arche driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 16:07:08 +02:00
Archit Taneja df794cfbb9 staging: android: ion: Avoid calling free_duped_table() twice
Currently, the duplicated sg table is freed in the detach() and
the error path of map_dma_buf() ion's dma_buf_ops.

If a call to dma_buf_map_attachment() fails, the importer is
expected to call dma_buf_detach() to remove the attachment. This
will result in us trying to free the duped sg table twice.

Don't call free_duped_table() in ion_map_dma_buf() to avoid this.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 15:59:38 +02:00
Archit Taneja 83d952ee0f staging: android: ion: Remove ION_FLAG_CACHED_NEEDS_SYNC
The flag ION_FLAG_CACHED_NEEDS_SYNC isn't used anymore. Remove it.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 15:59:38 +02:00
Archit Taneja e60a40c316 staging: android: ion: Remove unused members from ion_buffer
A few members in ion_buffer struct are unused after features
like page faulting, ion_handle and ion_client were removed.
Remove these members and the leftover references to them.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 15:59:38 +02:00
Janusz Lisiecki 16bd2c482c staging: ks7010: avoid CamelCase: receiveDTIMs
Replace CamelCase variable name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 15:59:37 +02:00
Juan Manuel Torres Palma 26d701a85d staging: vt6656: remove unnecesary blank lines
Fix style in rxtx.c, removing extra empty blank lines.

Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 15:59:37 +02:00
Juan Manuel Torres Palma 9df81ce975 staging: vt6656: remove multiple assignments
Fix style in rxtx.c, breaking all multiple assignments in different
lines.

Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 15:59:37 +02:00
Matej Dujava c975045656 staging: sm750fb: fix length of lines, function calls and declaration
This patch breaks lines that are longer than 80 characters and joins
together those, that are too short and can be placed at one.

Function calls and declarations are updated to fit kernel code style.

Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 15:57:25 +02:00
Mauro Carvalho Chehab dd8245f445 [media] atomisp: don't treat warnings as errors
Several atomisp files use:
	 ccflags-y += -Werror

As, on media, our usual procedure is to use W=1, and atomisp
has *a lot* of warnings with such flag enabled,like:

./drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h:62:26: warning: 'DDR_BASE' defined but not used [-Wunused-const-variable=]

At the end, it causes our build to fail, impacting our workflow.

So, remove this crap. If one wants to force -Werror, he
can still build with it enabled by passing a parameter to
make.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-18 05:44:00 -03:00
Arnd Bergmann b72d745120 staging: fsl-dpaa2/eth: add ETHERNET dependency
The new driver cannot link correctly when the netdevice infrastructure
is disabled:

ERROR: "netdev_info" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined!
ERROR: "skb_to_sgvec" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined!
ERROR: "napi_disable" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined!
ERROR: "napi_schedule_prep" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined!
ERROR: "__napi_schedule_irqoff" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined!
ERROR: "netif_carrier_on" [drivers/staging/fsl-dpaa2/ethernet/fsl-dpaa2-eth.ko] undefined!

This adds a dependency on NETDEVICES and ETHERNET.

Fixes: 0352d1d852 ("staging: fsl-dpaa2/eth: Add APIs for DPNI objects")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 14:23:31 +02:00
Rui Miguel Silva 50b7c322cf staging: typec: fusb302: refactor resume retry mechanism
The i2c functions need to test the pm_suspend state and do, if needed, some
retry before i2c operations. This code was repeated 4x.

To isolate this, create a new function to check suspend state and call it in
every need place.

As at it, move the error message from pr_err to dev_err.

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: Yueyao Zhu <yueyao.zhu@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 14:23:31 +02:00
Rui Miguel Silva f0d39a179b staging: typec: fusb302: reset i2c_busy state in error
Fix reset of i2c_busy flag if an error occurs during the i2c block read.

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: Yueyao Zhu <yueyao.zhu@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 14:23:31 +02:00
Okash Khawaja 1c5973675c staging: speakup: flush tty buffers and ensure hardware flow control
This patch fixes the issue where TTY-migrated synths would take a while
to shut up after hitting numpad enter key. When calling synth_flush,
even though XOFF character is sent as high priority, data buffered in
TTY layer is still sent to the synth. This patch flushes that buffered
data when synth_flush is called.

It also tries to ensure that hardware flow control is enabled, by
setting CRTSCTS using tty's termios.

Reported-by: John Covici <covici@ccs.covici.com>
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 14:19:41 +02:00
Okash Khawaja 470790eefe staging: speakup: migrate apollo, ltlk, audptr, decext, dectlk and spkout
This patch simply uses the changes introduced in previous patches and migrates
apollo, ltlk, audptr, decext, spkout and dectlk. Migrations are straightforward
function pointer updates.

Signed-off by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 14:19:41 +02:00
Okash Khawaja 6b9ad1c742 staging: speakup: add send_xchar, tiocmset and input functionality for tty
This patch adds further TTY-based functionality, specifically implementation
of send_xchar and tiocmset methods, and input. send_xchar and tiocmset
methods simply delegate to corresponding TTY operations.

For input, it implements the receive_buf2 callback in tty_ldisc_ops of
speakup's ldisc. If a synth defines read_buff_add method then receive_buf2
simply delegates to that and returns.

For spk_ttyio_in, the data is passed from receive_buf2 thread to
spk_ttyio_in thread through spk_ldisc_data structure. It has following
members:

- char buf: represents data received
- struct semaphore sem: used to signal to spk_ttyio_in thread that data
	is available to be read without having to busy wait
- bool buf_free: this is used in comination with mb() calls to syncronise
	the two threads over buf

receive_buf2 only writes to buf if buf_free is true. The check for buf_free
and writing to buf are separated by mb() to ensure that spk_ttyio_in has read
buf before receive_buf2 writes to it. After writing, it ups the semaphore to
signal to spk_ttyio_in that there is now data to read.

spk_ttyio_in waits for data to read by downing the semaphore. Thus when
signalled by receive_buf2 thread above, it reads from buf and sets buf_free
to true. These two operations are separated by mb() to ensure that
receive_buf2 thread finds buf_free to be true only after buf has been read.
After that spk_ttyio_in calls tty_schedule_flip for subsequent data to come
in through receive_buf2.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 14:19:41 +02:00
Okash Khawaja bd697e2996 staging: speakup: migrate acntsa, bns, dummy and txprt to ttyio
This changes the above five synths to TTY-based comms. They were chosen as a
first pass because their serial comms are straightforward, i.e. they don't use
serial input and don't do internal port knocking.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 14:19:41 +02:00
Okash Khawaja 1ab92da32e staging: speakup: add tty-based comms functions
This adds spk_ttyio.c file. It contains a set of functions which implement
those methods in spk_synth struct which relate to sending bytes out using
serial comms. Implementations in this file perform the same function but
using TTY subsystem instead. Currently synths access serial ports, directly
poking standard ISA ports by trying to steal them from serial driver. Some ISA
cards actually need this way of doing it, but most other synthesizers don't,
and can actually work by using the proper TTY subsystem through a new N_SPEAKUP
line discipline. So this adds the methods for drivers to switch to accessing
serial ports through the TTY subsystem, whenever appropriate.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 14:05:42 +02:00
Jandy Gou caaba6775e staging: fbtft: fix sparse warning
fix the following sparse warning:
 drivers/staging/fbtft/fbtft-io.c:74:29: warning: incorrect type in assignment
 (different base types) drivers/staging/fbtft/fbtft-io.c:74:29:    expected
 unsigned long long [unsigned] [long] [long long] [usertype] <noident>
 drivers/staging/fbtft/fbtft-io.c:74:29:    got restricted __be64 [usertype]
 <noident>

Signed-off-by: Jandy Gou <gouqingsong@goodix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:56:36 +02:00
Haim Daniel e3b5fde7eb drivers/staging: refactor dgnc tty registration.
-remove duplicate tty allocation code for serial and printer drivers.
-add missing tty c_ispeed and c_ospeed initialization to 9600.
-fix sparse warning: too long initializer-string for array of char.

This patch was only unit tested due to lack of the actual hardware.

Signed-off-by: Haim Daniel <haimdaniel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:55:23 +02:00
Remco Verhoef 052181bb25 staging: rtl8188eu: fix indentation error
Fixes a 'code indent should use tabs where possible' checkpatch code
style error by changing whitespace into tabs.

Signed-off-by: Remco Verhoef <remco@dutchcoders.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:53:23 +02:00
Ricardo Silva 9d15662175 staging: vme: Use BIT macro for bit definitions
Use the BIT(n) macro instead of '(1 << n)' in definitions where the bit
semantics clearly applies.

Fixes true positive "Prefer using the BIT macro" checks reported by
checkpatch.

Some of these checks are still triggering on definitions using
'(1 << n)', namely for PIO2_CNTR_SC_DEV1, PIO2_CNTR_RW_LSB and
PIO2_CNTR_MODE1. Leave them be, as the context there is more of a
"multi-bit field value" ((val << n), where for some cases 'val' happens
to be 1) rather than a "single bit" (1 << n), so keeping the value as is
in the code makes it more readable that using a combination of BIT
macros.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:53:23 +02:00
Ammly Fredrick d7206352fc Staging: rtl8723bs: core: rtw_mlme: Fix spelling issues
Fixed spelling warnings produced by scripts/checkpatch.pl

Signed-off-by: Ammly Fredrick <ammlyf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:53:23 +02:00
Janusz Lisiecki 95dddaa9d1 staging: ks7010: avoid CamelCase: local variables in ks_hostif.c
Replace CamelCase local variables' name with underscores to comply
with the standard kernel coding style.
Changed:
- LinkSpeed
- TransmittedFrameCount
- ReceivedFragmentCount
- FailedCount
- FCSErrorCount

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:53:23 +02:00
Pushkar Jambhlekar f14868defb drivers/staging/ccree: Replacing spaces by tab
Fixing 'checkpatch.pl' ERROR: code indent should use tabs where possible

Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:39:17 +02:00
Johan Hovold 2eccd4aa19 staging: greybus: enable compile testing of arche driver
Add Arche platform-driver config option and allow the driver to be
compile tested also without the out-of-tree usb3613 driver.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:39:16 +02:00
Johan Hovold 1e029b8361 staging: greybus: arche: remove timesync remains
Remove the remaining timesync bits that were left in the arche platform
driver and which prevented the driver from being compiled.

Fixes: bdfb95c4ba ("staging: greybus: remove timesync protocol support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16 13:39:16 +02:00
Malcolm Priestley 0e3e19cbd8 staging: rtl8192e: _rtl92e_dm_check_edca_turbo remove peername message.
This kinda reports this as if it was an error message.

Now that bssid is reported at associate remove this piece of code
serves no purpose as there is no code for peers so remove it.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 13:29:02 +02:00
Malcolm Priestley 95b80b30e1 staging: rtl8192e: Let user know mac address associated with.
User cannot tell which mac address(BSIDD) associated with so add
this to info message.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 13:29:02 +02:00
Malcolm Priestley ad3cafd7b4 staging: rtl8192e: HTSetConnectBwMode message replace with debug.
The flag status of bCurBW40MHz is printed as info and is
only useful as debug message.

Replace with netdev_dbg in line with rest of driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 13:29:01 +02:00
Malcolm Priestley 6b675ad8b3 staging: rtl8192e: print alg name as debug.
alg name will be printed a number times during a connection it
is only really useful as a debug message.

Change to netdev_dbg.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 13:29:01 +02:00
Malcolm Priestley 8f931dcd0c staging: rtl8192e: Remove RX: IEEE802.1X EAPOL frame! warning.
RX will receive countless EAPOL frames over the life of the connection.

A number of conditional calls to rtllib_is_eapol_frame are made in this function.

So this call serves no purpose other than to spam logs with false warning that
it is indeed a EAPOL frame, remove it.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 13:29:01 +02:00
Brett Hitchcock 814f3be22e staging: fsl-mc: Fix code alignment style issues
Fixing recommendation from checkpatch.pl:
"CHECK: Alignment should match open parenthesis"

Signed-off-by: Brett Hitchcock <bretth256@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 12:51:20 +02:00
Aleksey Kurbatov ef6cf365ca staging: rtl8712: use octal permissions
Using octal permissions instead of symbolic ones is preferred.

Signed-off-by: Aleksey Kurbatov <alkbt@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 12:51:20 +02:00
Suniel Mahesh 55031da457 staging: rtl8192u: Fix type mismatch warnings reported by sparse
Mk16_le() is an inline function returning le16_to_cpu()
which is causing type mismatch warnings. Removed Mk16_le() and
replaced it with le16_to_cpu() with appropriate argument type as
suggested by Greg K-H.

Signed-off-by: Suniel Mahesh <suniel.spartan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 12:51:20 +02:00
Riccardo Marotti 7d4c9787b7 Staging: rtl8192u: ieee80211: ieee80211_module.c: fix style issue
Fixed a brace coding style issue, found via checkpatch.

Signed-off-by: Riccardo Marotti <riccardo.marotti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 12:51:20 +02:00
Sucha Supittayapornpong e0f6aae87b staging: vt6655: Add identifier names to function definition
This patch fixes the checkpatch.pl warnings:

WARNING: function definition argument 'struct vnt_private *' should also have an identifier name
+void CARDvSetRSPINF(struct vnt_private *, u8);

Identifiers priv and bb_type, added to CARDvSetRSPINF definition,
are the names used in the function declaration.

Signed-off-by: Sucha Supittayapornpong <sucha.cpe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 12:49:23 +02:00
Thibaut SAUTEREAU a6fce69fa3 staging: wlan-ng: convert endianness in situ for prism2sta
Fix several sparse warnings about casts to restricted
little-endian by using in situ conversions.

Signed-off-by: Thibaut SAUTEREAU <thibaut.sautereau@telecom-sudparis.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 12:47:55 +02:00
Thibaut SAUTEREAU b1bb2e33ae staging: wlan-ng: convert endianness in situ for prism2fw
Fix several sparse warnings about casts to restricted
little-endian.

Signed-off-by: Thibaut SAUTEREAU <thibaut.sautereau@telecom-sudparis.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 12:47:55 +02:00
Michael Mera 6bbd04c653 staging: speakup: fix unnecessary long line
Fix checkpatch message:
WARNING: line over 80 characters

Change "bit mask" for "bitmask" to have a line shorter than 80 characters.

Signed-off-by: Michael Mera <dev@michaelmera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 12:44:20 +02:00
Tiago Koji Castro Shibata c53e5c2817 drivers/staging/speakup: Align block comments at *
Fix checkpatch.pl "WARNING: Block comments should align the * on each line"

Signed-off-by: Tiago Koji Castro Shibata <tiago.shibata@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 12:44:20 +02:00