Jonathan Cameron [Sun, 13 Oct 2019 15:48:32 +0000 (16:48 +0100)]
iio: adc: rcar-gyroadc: use devm_platform_ioremap_resource
Avoids some local boilerplate.
Suggested by coccinelle.
CHECK drivers/iio/adc/rcar-gyroadc.c
drivers/iio/adc/rcar-gyroadc.c:495:1-11: WARNING: Use devm_platform_ioremap_resource for priv -> regs
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Jonathan Cameron [Sun, 13 Oct 2019 15:32:34 +0000 (16:32 +0100)]
iio: adc: lpc18xx: use devm_platform_ioremap_resource
Avoid local boilerplate.
Identified by coccinelle
CHECK drivers/iio/adc/lpc18xx_adc.c
drivers/iio/adc/lpc18xx_adc.c:137:1-10: WARNING: Use devm_platform_ioremap_resource for adc -> base
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Cc: Joachim Eastwood <manabian@gmail.com>
Jonathan Cameron [Sun, 13 Oct 2019 15:27:16 +0000 (16:27 +0100)]
iio: adc: ingenic: Use devm_platform_ioremap_resource
Replaces local boilerplate. Identified by coccinelle.
CHECK drivers/iio/adc/ingenic-adc.c
drivers/iio/adc/ingenic-adc.c:449:1-10: WARNING: Use devm_platform_ioremap_resource for adc -> base
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Cc: Artur Rojek <contact@artur-rojek.eu>
Jonathan Cameron [Sun, 13 Oct 2019 12:15:38 +0000 (13:15 +0100)]
iio: adc: mt6577_auxdac: use devm_platform_ioremap_resource
Reduces boilerplate. Identified by coccinelle
CHECK drivers/iio/adc/mt6577_auxadc.c
drivers/iio/adc/mt6577_auxadc.c:257:1-18: WARNING: Use devm_platform_ioremap_resource for adc_dev -> reg_base
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Zhiyong Tao <zhiyong.tao@mediatek.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Jonathan Cameron [Sun, 13 Oct 2019 11:37:05 +0000 (12:37 +0100)]
iio: adc: aspeed: use devm_platform_ioremap_resource
Reduces boilerplate.
Identified by: Coccinelle / coccicheck
CHECK drivers/iio/adc/aspeed_adc.c
drivers/iio/adc/aspeed_adc.c:189:1-11: WARNING: Use devm_platform_ioremap_resource for data -> base
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Rick Altherr <raltherr@google.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
iio: imu: adis: assign value only if return code zero in read funcs
The inline read functions in the ADIS library don't check the return value
of the `adis_read_reg()` function and assign the value of `tmp` regardless.
Fix this by checking if return value is zero and only then assigning the
value of `tmp`.
No known case of the callers of this function incorrectly using the
value, but best to stop any potential risk here.
Not suitable for stable due to no known actual bugs caused by this
issue.
Fixes: 57a1228a06b7a ("iio:imu:adis: Add support for 32bit registers") Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
iio: imu: adis16480: assign bias value only if operation succeeded
This was found only after the whole thing with the inline functions, but
the compiler actually found something. The value of the `bias` (in
adis16480_get_calibbias()) should only be set if the read operation was
successful.
No actual known problem occurs as users of this function all
ultimately check the return value. Hence probably not stable material.
Fixes: 2f3abe6cbb6c9 ("iio:imu: Add support for the ADIS16480 and similar IMUs") Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
iio: imu: adis: check ret val for non-zero vs less-than-zero
The ADIS library functions return zero on success, and negative values for
error. Positive values aren't returned, but we only care about the success
value (which is zero).
This change is mostly needed so that the compiler won't make any inferences
about some about values being potentially un-initialized. This only
triggers after making some functions inline, because the compiler can
better follow return paths.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
iio: imu: adis16480: check ret val for non-zero vs less-than-zero
The ADIS library functions return zero on success, and negative values for
error. Positive values aren't returned, but we only care about the success
value (which is zero).
This change is mostly needed so that the compiler won't make any inferences
about some about values being potentially un-initialized. This only
triggers after making some functions inline, because the compiler can
better follow return paths.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
iio: imu: adis16460: check ret val for non-zero vs less-than-zero
The ADIS library functions return zero on success, and negative values for
error. Positive values aren't returned, but we only care about the success
value (which is zero).
This change is mostly needed so that the compiler won't make any inferences
about some about values being potentially un-initialized. This only
triggers after making some functions inline, because the compiler can
better follow return paths.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
iio: imu: adis16400: check ret val for non-zero vs less-than-zero
The ADIS library functions return zero on success, and negative values for
error. Positive values aren't returned, but we only care about the success
value (which is zero).
This change is mostly needed so that the compiler won't make any inferences
about some about values being potentially un-initialized. This only
triggers after making some functions inline, because the compiler can
better follow return paths.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
iio: gyro: adis16136: check ret val for non-zero vs less-than-zero
The ADIS library functions return zero on success, and negative values for
error. Positive values aren't returned, but we only care about the success
value (which is zero).
This change is mostly needed so that the compiler won't make any inferences
about some about values being potentially un-initialized. This only
triggers after making some functions inline, because the compiler can
better follow return paths.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
The iio_triggered_buffer_postenable() hook should be called first to
attach the poll function and the iio_triggered_buffer_predisable() hook
should be called last in the predisable hook.
This change updates the driver to attach/detach the poll func in the
correct order.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
iio: dln2-adc: fix iio_triggered_buffer_postenable() position
The iio_triggered_buffer_postenable() hook should be called first to
attach the poll function. The iio_triggered_buffer_predisable() hook is
called last (as is it should).
This change moves iio_triggered_buffer_postenable() to be called first. It
adds iio_triggered_buffer_predisable() on the error paths of the postenable
hook.
For the predisable hook, some code-paths have been changed to make sure
that the iio_triggered_buffer_predisable() hook gets called in case there
is an error before it.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
staging: rts5208: Eliminate the use of Camel Case in file sd.h
Cleans up checks of "Avoid CamelCase" in file sd.h
Even though the constant "DCM_LOW_FREQUENCY_MODE_SET" is defined and never used,
it's useful to keep it because it documents the device.
Davidlohr Bueso [Wed, 30 Oct 2019 14:49:16 +0000 (07:49 -0700)]
drivers/staging/exfat: Replace binary semaphores for mutexes
At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal
than semaphores; it's also a nicer interface for mutual exclusion,
which is why they are encouraged over binary semaphores, when possible.
For both v_sem and z_sem, their semantics imply traditional lock
ownership; that is, the lock owner is the same for both lock/unlock
operations. Therefore it is safe to convert.
Merge tag 'iio-for-5.5b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Second set of IIO + counter new device support, features etc for the 5.5 cycle.
Note two merge commits in here, both for immutable branches based
of 5.4-rc1.
1. Ti eqep driver because of some file moves in precursor patches.
I suspect no one else will pull this one.
2. ab8500 refactor as changes in power supply, hwmon and mfd trees.
This may come via numerous trees as well as IIO.
Counter subsystem related
* ti eqep
- New device support with bindings.
- Includes prior file move to reflect more general use of ti-pwmss.
* Counter core
- simplify count_read and count_write callbacks + document change.
- fix a typo in docs.
Various subsystems related
* AB8500
- ab8500_btemp driver converted to be an IIO consumer driver.
- ab8500_charger driver converted to be an IIO consumer driver.
- ab8500_fg fuel gauge driver converted to be an IIO consumer driver.
- ab8500 hwmon driver converted to be an IIO consumer driver.
- mfd bindings augmented with the adc channels to make the above work.
- drop original mfd driver.
New device support
* ab8500
- new ADC driver used by the above other subystems via the IIO consumer
interface.
* adux1020 photometric sensor
- new driver and dt bindings.
* fxos877cq
- new driver for this simple(ish) IMU with DT bindings.
* intel_mrfld_adc
- new driver for the ADC found on Intel Merrifield platforms.
* ltc2983
- new driver for this multi-sensor type temperature interface.
Includes complex DT bindings.
* max1027
- support for 12 bit devices, max1227, max1229 and max1231 + add to trivial
bindings.
* st_lsm6dsx
- support for the LSM6DS0 6 axis MEMs sensor.
Note different from the LSM6DSO which the driver already supports *sigh*
- support for the LSM6DSRX 6 axis MEMs sensor.
Features and cleanups
* ad7303
- replace use of core mlock with a local lock with cleanly defined scope.
* ad9834
- add a check for devm_clk_get failing.
* at91-sama5d2
- tidy up a 0 as NULL warning.
* bmp280
- endian type tidy ups.
- use bulk regulator ops for a small reduction in code.
- use devm_add_action... to simplify error path handling.
* exynos
- drop stray semicolon.
- use devm_platform_ioremap_resource to reduce boilerplate.
* hx711
- various tricks to improve the frequency of read out possible.
* max1027
- debugfs support.
- make interrupts optional.
- reset at probe to get clean state.
- refactors to allow addition of new device support.
* maxim thermocouple
- drop an unneeded semicolon.
* mb1232
- yaml binding conversion.
* mcp320x
- tidy up an endian types in cast warning.
* meson_saradc
- use devm_platform_ioremap_resource to reduce boilerplate.
* mpu3050
- make a poison value explicity big endian to supress a warning.
* pulsedlight v2
- endian type tidy ups.
* sgp30
- drop an excess semicolon.
* sps30
- make truncation explicit with masking to clean up a warning.
* st sensors
- drop gpio include as none of these support gpios.
* st_lsm6dsx
- tidy up some alignment issues.
- refactors to allow addition of new device support.
* allow varients of irq related reg definitions.
* avoid accessing active-low, open-drain regs if not provided.
* allow varients of bdu/boot and reset regs.
* allow for enabling or disabling wakeup sources through platform
data (seems someone still uses this).
- enable wake-up events for LSM6DS0
- use the drdy mask to avoid some invalid samples during initial start
of sensor.
- Add support to trim the timestamp.
* stm32_adc
- kernel-doc fixes.
* stm32_dac
- power management support.
* stmpe-adc
- Fix endian type of local variable.
* twl4030
- use false / true instead of 0 / 1 for booleans.
* xilinx-xadc
- use devm_platform_ioremap_resouce to reduce boilerplate.
* zpa2326
- reorganise buffer handling setup to be more consistent.
Fixes (mostly recent additions)
* cpcap-adc
- Fix mising IRQF_ONESHOT that would cause warnings to be printed.
* st_lsm6dsx
- Sanity check the read_fifo pointer is set.
- use locked read and update functions to prevent some races.
- avoid accessing enable_reg if not provided.
- take a lock to prevent a race in updating the config.
- kernel-doc fixes.
- document wakeup-source property in dt binding.
- fix lsm9ds1 gyro gain definitions.
* tag 'iio-for-5.5b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (73 commits)
dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsrx device bindings
iio: imu: st_lsm6dsx: add support to LSM6DSRX
iio: st: Drop GPIO include
iio: adc: hx711: optimize performance in read cycle
iio: adc: stm32-adc: fix kernel-doc warnings
iio: pressure: zpa2326: fix iio_triggered_buffer_postenable position
iio: chemical: sgp30: drop excess semicolon
iio: adc: twl4030: Use false / true instead of 0 / 1 with booleans
dt-bindings: iio: Add ltc2983 documentation
iio: temperature: Add support for LTC2983
iio: pressure: bmp280: use devm action and remove labels from probe
iio: pressure: bmp280: use bulk regulator ops
iio: imu: Add support for the FXOS8700 IMU
dt-bindings: iio: imu: add fxos8700 imu binding
staging: iio: ad9834: add a check for devm_clk_get
iio: adc: xilinx-xadc: use devm_platform_ioremap_resource
iio: temp: maxim thermocouple: Drop unneeded semi colon.
iio: adc: cpcap-adc: Fix missing IRQF_ONESHOT as only threaded handler.
iio: adc: meson_saradc: use devm_platform_ioremap_resource
iio: adc: exynos: use devm_platform_ioremap_resource
...
Javier F. Arias [Wed, 30 Oct 2019 03:04:19 +0000 (22:04 -0500)]
staging: emxx_udc: Fix invalid reference error
This patch fixes an invalid reference error by moving the code that
is executed when a queue element is found, into the loop. Also, it
removes an unnecessary test that now checks if the element is not
present in the queue.
Issue found by Coccinelle.
Adham Abozaeid [Mon, 28 Oct 2019 18:40:26 +0000 (18:40 +0000)]
staging: wilc1000: check if device is initialzied before changing vif
When killing hostapd, the interface is closed which deinitializes the
device, then change virtual interface is called.
This change checks if the device is initialized before sending the
interface change command to the device
Michael Straube [Sun, 27 Oct 2019 13:06:03 +0000 (14:06 +0100)]
staging: rtl8188eu: remove return variable from rtw_init_bcmc_stainfo
Remove variable res, that is used to store the return value, from
rtw_init_bcmc_stainfo. Instead return _FAIL or _SUCCESS directly
and remove the now unneeded exit label.
Linus Torvalds [Sun, 27 Oct 2019 11:14:40 +0000 (07:14 -0400)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
"Two fixes for the VMWare guest support:
- Unbreak VMWare platform detection which got wreckaged by converting
an integer constant to a string constant.
- Fix the clang build of the VMWAre hypercall by explicitely
specifying the ouput register for INL instead of using the short
form"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/cpu/vmware: Fix platform detection VMWARE_PORT macro
x86/cpu/vmware: Use the full form of INL in VMWARE_HYPERCALL, for clang/llvm
Linus Torvalds [Sun, 27 Oct 2019 11:04:22 +0000 (07:04 -0400)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner:
"A small set of fixes for time(keeping):
- Add a missing include to prevent compiler warnings.
- Make the VDSO implementation of clock_getres() POSIX compliant
again. A recent change dropped the NULL pointer guard which is
required as NULL is a valid pointer value for this function.
- Fix two function documentation typos"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
posix-cpu-timers: Fix two trivial comments
timers/sched_clock: Include local timekeeping.h for missing declarations
lib/vdso: Make clock_getres() POSIX compliant again
Linus Torvalds [Sun, 27 Oct 2019 10:59:34 +0000 (06:59 -0400)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Thomas Gleixner:
"A set of perf fixes:
kernel:
- Unbreak the tracking of auxiliary buffer allocations which got
imbalanced causing recource limit failures.
- Fix the fallout of splitting of ToPA entries which missed to shift
the base entry PA correctly.
- Use the correct context to lookup the AUX event when unmapping the
associated AUX buffer so the event can be stopped and the buffer
reference dropped.
tools:
- Fix buildiid-cache mode setting in copyfile_mode_ns() when copying
/proc/kcore
- Fix freeing id arrays in the event list so the correct event is
closed.
- Sync sched.h anc kvm.h headers with the kernel sources.
- Link jvmti against tools/lib/ctype.o to have weak strlcpy().
- Fix multiple memory and file descriptor leaks, found by coverity in
perf annotate.
- Fix leaks in error handling paths in 'perf c2c', 'perf kmem', found
by a static analysis tool"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/aux: Fix AUX output stopping
perf/aux: Fix tracking of auxiliary trace buffer allocation
perf/x86/intel/pt: Fix base for single entry topa
perf kmem: Fix memory leak in compact_gfp_flags()
tools headers UAPI: Sync sched.h with the kernel
tools headers kvm: Sync kvm.h headers with the kernel sources
tools headers kvm: Sync kvm headers with the kernel sources
tools headers kvm: Sync kvm headers with the kernel sources
perf c2c: Fix memory leak in build_cl_output()
perf tools: Fix mode setting in copyfile_mode_ns()
perf annotate: Fix multiple memory and file descriptor leaks
perf tools: Fix resource leak of closedir() on the error paths
perf evlist: Fix fix for freed id arrays
perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
Linus Torvalds [Sun, 27 Oct 2019 10:55:55 +0000 (06:55 -0400)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
"Two fixes for interrupt controller drivers:
- Skip IRQ_M_EXT entries in the device tree when initializing the
RISCV PLIC controller to avoid a double init attempt.
- Use the correct ITS list when issuing the VMOVP synchronization
command so the operation works only on the ITS instances which are
associated to a VM"
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
irqchip/gic-v3-its: Use the exact ITSList for VMOVP
Linus Torvalds [Sun, 27 Oct 2019 10:41:52 +0000 (06:41 -0400)]
Merge tag '5.4-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French:
"Seven cifs/smb3 fixes, including three for stable"
* tag '5.4-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: Fix cifsInodeInfo lock_sem deadlock when reconnect occurs
CIFS: Fix use after free of file info structures
CIFS: Fix retry mid list corruption on reconnects
cifs: Fix missed free operations
CIFS: avoid using MID 0xFFFF
cifs: clarify comment about timestamp granularity for old servers
cifs: Handle -EINPROGRESS only when noblockcnt is set
Linus Torvalds [Sat, 26 Oct 2019 23:43:12 +0000 (19:43 -0400)]
Merge tag 'mips_fixes_5.4_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Paul Burton:
"A few MIPS fixes:
- Fix VDSO time-related function behavior for systems where we need
to fall back to syscalls, but were instead returning bogus results.
- A fix to TLB exception handlers for Cavium Octeon systems where
they would inadvertently clobber the $1/$at register.
- A build fix for bcm63xx configurations.
- Switch to using my @kernel.org email address"
* tag 'mips_fixes_5.4_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
MIPS: tlbex: Fix build_restore_pagemask KScratch restore
MIPS: bmips: mark exception vectors as char arrays
mips: vdso: Fix __arch_get_hw_counter()
MAINTAINERS: Use @kernel.org address for Paul Burton
Linus Torvalds [Sat, 26 Oct 2019 20:36:47 +0000 (16:36 -0400)]
Merge tag 'staging-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fix from Greg KH:
"Here is a single staging driver fix, for the wlan-ng driver, that
resolves a reported issue.
It is been in linux-next for a while with no reported issues"
* tag 'staging-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: wlan-ng: fix exit return when sme->key_idx >= NUM_WEPKEYS
Linus Torvalds [Sat, 26 Oct 2019 19:17:54 +0000 (15:17 -0400)]
Merge tag 'char-misc-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull binder fix from Greg KH:
"This is a single binder fix to resolve a reported issue by Jann. It's
been in linux-next for a while with no reported issues"
* tag 'char-misc-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
binder: Don't modify VMA bounds in ->mmap handler
Linus Torvalds [Sat, 26 Oct 2019 19:14:55 +0000 (15:14 -0400)]
Merge tag 'usb-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are a number of small USB driver fixes for 5.4-rc5.
More "fun" with some of the misc USB drivers as found by syzbot, and
there are a number of other small bugfixes in here for reported
issues.
All have been in linux-next for a while with no reported issues"
* tag 'usb-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: cdns3: Error out if USB_DR_MODE_UNKNOWN in cdns3_core_init_role()
USB: ldusb: fix read info leaks
USB: serial: ti_usb_3410_5052: clean up serial data access
USB: serial: ti_usb_3410_5052: fix port-close races
USB: usblp: fix use-after-free on disconnect
usb: udc: lpc32xx: fix bad bit shift operation
usb: cdns3: Fix dequeue implementation.
USB: legousbtower: fix a signedness bug in tower_probe()
USB: legousbtower: fix memleak on disconnect
USB: ldusb: fix memleak on disconnect
Linus Torvalds [Sat, 26 Oct 2019 19:06:58 +0000 (15:06 -0400)]
Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
"A few driver fixes for the I2C subsystem"
* 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: stm32f7: remove warning when compiling with W=1
i2c: stm32f7: fix a race in slave mode with arbitration loss irq
i2c: stm32f7: fix first byte to send in slave mode
i2c: mt65xx: fix NULL ptr dereference
i2c: aspeed: fix master pending state handling
Linus Torvalds [Sat, 26 Oct 2019 18:59:51 +0000 (14:59 -0400)]
Merge tag 'for-linus-2019-10-26' of git://git.kernel.dk/linux-block
Pull block and io_uring fixes from Jens Axboe:
"A bit bigger than usual at this point in time, mostly due to some good
bug hunting work by Pavel that resulted in three io_uring fixes from
him and two from me. Anyway, this pull request contains:
- Revert of the submit-and-wait optimization for io_uring, it can't
always be done safely. It depends on commands always making
progress on their own, which isn't necessarily the case outside of
strict file IO. (me)
- Series of two patches from me and three from Pavel, fixing issues
with shared data and sequencing for io_uring.
- Lastly, two timeout sequence fixes for io_uring (zhangyi)
- Two nbd patches fixing races (Josef)
- libahci regulator_get_optional() fix (Mark)"
* tag 'for-linus-2019-10-26' of git://git.kernel.dk/linux-block:
nbd: verify socket is supported during setup
ata: libahci_platform: Fix regulator_get_optional() misuse
nbd: handle racing with error'ed out commands
nbd: protect cmd->status with cmd->lock
io_uring: fix bad inflight accounting for SETUP_IOPOLL|SETUP_SQTHREAD
io_uring: used cached copies of sq->dropped and cq->overflow
io_uring: Fix race for sqes with userspace
io_uring: Fix broken links with offloading
io_uring: Fix corrupted user_data
io_uring: correct timeout req sequence when inserting a new entry
io_uring : correct timeout req sequence when waiting timeout
io_uring: revert "io_uring: optimize submit_and_wait API"
Samuil Ivanov [Wed, 23 Oct 2019 20:58:55 +0000 (23:58 +0300)]
Staging: qlge: Rewrite two while loops as simple for loops
This is a task from the TODO list of qlge driver:
- some "while" loops could be rewritten with simple "for"
The change is in functions ql_wait_reg_rdy and ql_wait_cfg in qlge_main.c.
The while loops are basically count based
(they decrement on each iteration),
and it makes more sense to be a for loop construction instead.
Tim Collier [Fri, 25 Oct 2019 08:41:24 +0000 (09:41 +0100)]
staging: wlan-ng: correct parameter alignment in hfa384x.h
Realign parameter in function declaration to fix checkpatch.pl warning
that parameter needed to be aligned with the opening parenthesis of
the declaration.
Tim Collier [Fri, 25 Oct 2019 08:41:22 +0000 (09:41 +0100)]
staging: wlan-ng: remove unnecessary casts from prism2usb.c
usb_get_intfdata returns a void pointer. It is not necessary to
explicitly cast to the desired type and removing the casts is
consistent with most use of usb_get_intfdata.
Michael Straube [Sat, 26 Oct 2019 12:11:35 +0000 (14:11 +0200)]
staging: rtl8188eu: reduce indentation level in rtw_alloc_stainfo
Remove else-arm from if-else statement. Move the else code out of the
if-else and skip it by adding goto exit to the if block. The exit label
was directly after the else-arm, so there is no change in behaviour.
Reduces indentation level and clears a line over 80 characters
checkpatch warning.
Michael Straube [Sat, 26 Oct 2019 12:11:33 +0000 (14:11 +0200)]
staging: rtl8188eu: remove ternary operator
Instead of using ternary operator to set variable res, use the value
of variable match (or the negation) directly to simplify the code and
improve readability.
Michael Straube [Sat, 26 Oct 2019 12:11:32 +0000 (14:11 +0200)]
staging: rtl8188eu: convert rtw_access_ctrl to return bool
Function rtw_access_ctrl returns boolean values, so change the return
type to bool. Also convert the local variables that are used for the
return value from u8 to bool.
Michael Straube [Sat, 26 Oct 2019 12:11:31 +0000 (14:11 +0200)]
staging: rtl8188eu: rename array bcast_addr
Rename array bcast_addr to be more consistent in variable naming.
In other places in this file buffers for broadcast addresses are
named bc_addr as well.
Jérôme Pouiller [Thu, 17 Oct 2019 09:40:06 +0000 (09:40 +0000)]
staging: wfx: fix CONFIG_MMC=m with CONFIG_WFX=y
If CONFIG_MMC=m and CONFIG_WFX=y, compilation complains with undefined
references:
drivers/staging/wfx/main.o: In function `wfx_core_init': /linux/drivers/staging/wfx/main.c:488: undefined reference to `sdio_register_driver'
drivers/staging/wfx/main.o: In function `wfx_core_exit': /linux/drivers/staging/wfx/main.c:496: undefined reference to `sdio_unregister_driver'
drivers/staging/wfx/main.o:(.debug_addr+0x1a8): undefined reference to `sdio_register_driver'
drivers/staging/wfx/main.o:(.debug_addr+0x6f0): undefined reference to `sdio_unregister_driver'
Indeed, symbols sdio_* are not present in kernel image.
This patch disallows CONFIG_WFX=y if CONFIG_MMC=m.
This solution impacts users who want to use SPI bus with configuration:
CONFIG_WFX=y + CONFIG_SPI=y + CONFIG_MMC=m. However, I think this is a
twisted case. So, I think it won't be missed.