Valentin Vidic [Fri, 5 May 2017 05:27:41 +0000 (07:27 +0200)]
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>
Mathias Rav [Fri, 19 May 2017 02:49:22 +0000 (22:49 -0400)]
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>
Mathias Rav [Fri, 19 May 2017 02:49:21 +0000 (22:49 -0400)]
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>
Konrad Malkowski [Fri, 26 May 2017 03:01:20 +0000 (23:01 -0400)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:26 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:25 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:24 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:23 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:22 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:21 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:20 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:19 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:18 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:17 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:16 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:15 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:14 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:13 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:12 +0000 (00:26 +0200)]
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>
Stefan Wahren [Thu, 25 May 2017 22:26:11 +0000 (00:26 +0200)]
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>
Juliana Rodrigues [Sat, 27 May 2017 01:02:03 +0000 (22:02 -0300)]
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>
Juliana Rodrigues [Sat, 27 May 2017 01:01:26 +0000 (22:01 -0300)]
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>
Juliana Rodrigues [Sat, 27 May 2017 01:00:54 +0000 (22:00 -0300)]
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>
Juliana Rodrigues [Sat, 27 May 2017 01:00:22 +0000 (22:00 -0300)]
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>
Juliana Rodrigues [Sat, 27 May 2017 00:59:48 +0000 (21:59 -0300)]
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>
Juliana Rodrigues [Sat, 27 May 2017 00:58:35 +0000 (21:58 -0300)]
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>
Juliana Rodrigues [Thu, 25 May 2017 18:30:27 +0000 (15:30 -0300)]
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>
Szilveszter Székely [Thu, 25 May 2017 18:26:06 +0000 (19:26 +0100)]
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>
Ioana Radulescu [Wed, 24 May 2017 12:13:28 +0000 (07:13 -0500)]
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>
Ioana Radulescu [Wed, 24 May 2017 12:13:27 +0000 (07:13 -0500)]
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>
Derek Robson [Wed, 24 May 2017 04:43:39 +0000 (16:43 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:43:26 +0000 (16:43 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:43:11 +0000 (16:43 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:42:57 +0000 (16:42 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:42:41 +0000 (16:42 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:42:24 +0000 (16:42 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:42:08 +0000 (16:42 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:41:49 +0000 (16:41 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:41:27 +0000 (16:41 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:41:11 +0000 (16:41 +1200)]
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>
Derek Robson [Wed, 24 May 2017 04:40:32 +0000 (16:40 +1200)]
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>
Gennadii Altukhov [Fri, 26 May 2017 09:28:47 +0000 (11:28 +0200)]
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>
Marko Stankovic [Thu, 25 May 2017 17:28:31 +0000 (19:28 +0200)]
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>
Marko Stankovic [Thu, 25 May 2017 17:28:30 +0000 (19:28 +0200)]
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>
Nikola Jelic [Tue, 23 May 2017 21:02:45 +0000 (23:02 +0200)]
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>
Rishiraj Manwatkar [Sat, 20 May 2017 06:33:17 +0000 (06:33 +0000)]
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>
Greg Kroah-Hartman [Mon, 29 May 2017 13:53:42 +0000 (15:53 +0200)]
Merge tag 'iio-for-4.13a' of git://git./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.
Aliza Minkov [Thu, 25 May 2017 13:46:45 +0000 (16:46 +0300)]
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>
Marko Stankovic [Tue, 23 May 2017 22:25:24 +0000 (00:25 +0200)]
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>
Rui Teng [Tue, 23 May 2017 02:04:15 +0000 (10:04 +0800)]
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>
Marko Stankovic [Mon, 22 May 2017 23:19:44 +0000 (01:19 +0200)]
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>
Marko Stankovic [Mon, 22 May 2017 23:19:43 +0000 (01:19 +0200)]
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>
Marko Stankovic [Sat, 20 May 2017 16:50:37 +0000 (18:50 +0200)]
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>
Paolo Cretaro [Thu, 18 May 2017 21:59:41 +0000 (23:59 +0200)]
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>
Dan Carpenter [Fri, 19 May 2017 21:27:18 +0000 (00:27 +0300)]
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:
6b9ad1c742bf ("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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:59 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:58 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:57 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:56 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:55 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:54 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:53 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:52 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:51 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:50 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:49 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:48 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:47 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:46 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:45 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:44 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:43 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:42 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:41 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:40 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:39 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:38 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:37 +0000 (16:17 -0400)]
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>
Sameer Wadgaonkar [Fri, 19 May 2017 20:17:36 +0000 (16:17 -0400)]
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>
Jon Frisch [Fri, 19 May 2017 20:17:35 +0000 (16:17 -0400)]
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>
Logan Gunthorpe [Wed, 24 May 2017 21:59:05 +0000 (15:59 -0600)]
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>
Branislav Katreniak [Thu, 18 May 2017 20:28:33 +0000 (22:28 +0200)]
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>
Raphaël Beamonte [Tue, 23 May 2017 18:53:14 +0000 (20:53 +0200)]
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>
Greg Kroah-Hartman [Mon, 22 May 2017 06:58:50 +0000 (08:58 +0200)]
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>
Linus Torvalds [Mon, 22 May 2017 02:30:23 +0000 (19:30 -0700)]
Linux 4.12-rc2
Linus Torvalds [Mon, 22 May 2017 01:26:54 +0000 (18:26 -0700)]
x86: fix 32-bit case of __get_user_asm_u64()
The code to fetch a 64-bit value from user space was entirely buggered,
and has been since the code was merged in early 2016 in commit
b2f680380ddf ("x86/mm/32: Add support for 64-bit __get_user() on 32-bit
kernels").
Happily the buggered routine is almost certainly entirely unused, since
the normal way to access user space memory is just with the non-inlined
"get_user()", and the inlined version didn't even historically exist.
The normal "get_user()" case is handled by external hand-written asm in
arch/x86/lib/getuser.S that doesn't have either of these issues.
There were two independent bugs in __get_user_asm_u64():
- it still did the STAC/CLAC user space access marking, even though
that is now done by the wrapper macros, see commit
11f1a4b9755f
("x86: reorganize SMAP handling in user space accesses").
This didn't result in a semantic error, it just means that the
inlined optimized version was hugely less efficient than the
allegedly slower standard version, since the CLAC/STAC overhead is
quite high on modern Intel CPU's.
- the double register %eax/%edx was marked as an output, but the %eax
part of it was touched early in the asm, and could thus clobber other
inputs to the asm that gcc didn't expect it to touch.
In particular, that meant that the generated code could look like
this:
mov (%eax),%eax
mov 0x4(%eax),%edx
where the load of %edx obviously was _supposed_ to be from the 32-bit
word that followed the source of %eax, but because %eax was
overwritten by the first instruction, the source of %edx was
basically random garbage.
The fixes are trivial: remove the extraneous STAC/CLAC entries, and mark
the 64-bit output as early-clobber to let gcc know that no inputs should
alias with the output register.
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: stable@kernel.org # v4.8+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 21 May 2017 22:25:46 +0000 (15:25 -0700)]
Clean up x86 unsafe_get/put_user() type handling
Al noticed that unsafe_put_user() had type problems, and fixed them in
commit
a7cc722fff0b ("fix unsafe_put_user()"), which made me look more
at those functions.
It turns out that unsafe_get_user() had a type issue too: it limited the
largest size of the type it could handle to "unsigned long". Which is
fine with the current users, but doesn't match our existing normal
get_user() semantics, which can also handle "u64" even when that does
not fit in a long.
While at it, also clean up the type cast in unsafe_put_user(). We
actually want to just make it an assignment to the expected type of the
pointer, because we actually do want warnings from types that don't
convert silently. And it makes the code more readable by not having
that one very long and complex line.
[ This patch might become stable material if we ever end up back-porting
any new users of the unsafe uaccess code, but as things stand now this
doesn't matter for any current existing uses. ]
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 21 May 2017 19:06:44 +0000 (12:06 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs
Pull misc uaccess fixes from Al Viro:
"Fix for unsafe_put_user() (no callers currently in mainline, but
anyone starting to use it will step into that) + alpha osf_wait4()
infoleak fix"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
osf_wait4(): fix infoleak
fix unsafe_put_user()
Linus Torvalds [Sun, 21 May 2017 18:52:00 +0000 (11:52 -0700)]
Merge branch 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull scheduler fix from Thomas Gleixner:
"A single scheduler fix:
Prevent idle task from ever being preempted. That makes sure that
synchronize_rcu_tasks() which is ignoring idle task does not pretend
that no task is stuck in preempted state. If that happens and idle was
preempted on a ftrace trampoline the machine crashes due to
inconsistent state"
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/core: Call __schedule() from do_idle() without enabling preemption
Linus Torvalds [Sun, 21 May 2017 18:45:26 +0000 (11:45 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
"A set of small fixes for the irq subsystem:
- Cure a data ordering problem with chained interrupts
- Three small fixlets for the mbigen irq chip"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq: Fix chained interrupt data ordering
irqchip/mbigen: Fix the clear register offset calculation
irqchip/mbigen: Fix potential NULL dereferencing
irqchip/mbigen: Fix memory mapping code
Al Viro [Mon, 15 May 2017 01:47:25 +0000 (21:47 -0400)]
osf_wait4(): fix infoleak
failing sys_wait4() won't fill struct rusage...
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Sun, 21 May 2017 17:08:42 +0000 (13:08 -0400)]
fix unsafe_put_user()
__put_user_size() relies upon its first argument having the same type as what
the second one points to; the only other user makes sure of that and
unsafe_put_user() should do the same.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Jan Kiszka [Wed, 17 May 2017 15:28:17 +0000 (17:28 +0200)]
iio: adc: Add support for TI ADC108S102 and ADC128S102
This is an upstream port of an IIO driver for the TI ADC108S102 and
ADC128S102. The former can be found on the Intel Galileo Gen2 and the
Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is
included.
Due to the lack of regulators under ACPI, we hard-code the voltage
provided to the VA pin of the ADC to 5 V, the value used on Galileo and
IOT2000. For DT usage, the regulator "vref-supply" provides this
information. Note that DT usage has not been tested.
Original author: Bogdan Pricop <bogdan.pricop@emutex.com>
Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel:
Todor Minchev <todor@minchev.co.uk>.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Lorenzo Bianconi [Fri, 19 May 2017 20:11:36 +0000 (22:11 +0200)]
iio: imu: st_lsm6dsx: substitute ifdef CONFIG_PM with __maybe_unused macro
Get rid of #ifdef CONFIG_PM by adding __maybe_unused macro to
st_lsm6dsx_suspend and st_lsm6dsx_resume function declarations
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Hans de Goede [Tue, 16 May 2017 12:51:59 +0000 (14:51 +0200)]
iio: accel: bma180: Add ACPI enumeration support for BMA250E
Some x86 tablets use the BMA250E accelerometer, add support for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Hans de Goede [Tue, 16 May 2017 12:51:58 +0000 (14:51 +0200)]
iio: accel: bma180: Add support for BMA250E
The BMA250E adds a new fifo mode and is fully backwards compatible
with the BMA250, but with a different chip-id.
This commit adds support for it by adjusting the chip-id check and
otherwise treating it as a regular BMA250.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Mikko Koivunen [Thu, 18 May 2017 12:12:56 +0000 (15:12 +0300)]
iio: light: rpr0521 channel numbers reordered
Move proximity channel from last to first in structs to avoid confusion
later with buffered triggers. Proximity data output is first in rpr0521
register map.
Signed-off-by: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Acked-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Mikko Koivunen [Thu, 18 May 2017 12:12:55 +0000 (15:12 +0300)]
iio: light: rpr0521 proximity offset read/write
Add sysfs read/write proximity offset feature. Offset is read/write from
sensor registers. Values are proximity raw 10-bit values. After applying
offset value, output values will be (measured_raw - offset_value). Output
values are unsigned so offset value doesn't make output negative.
Signed-off-by: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Acked-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Mikko Koivunen [Thu, 18 May 2017 12:12:54 +0000 (15:12 +0300)]
iio: light: rpr0521 sample_frequency read/write
Add sysfs read/write sample frequency.
Signed-off-by: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Acked-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Mikko Koivunen [Thu, 18 May 2017 12:12:53 +0000 (15:12 +0300)]
iio: light: rpr0521 whitespace fixes
Just whitespace change, no functional changes.
Signed-off-by: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Acked-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>