summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-18iio: imu: adis16460: fix variable signednessAlexandru Ardelean
Caught via static-analysis checker: ``` drivers/iio/imu/adis16460.c 152 static int adis16460_set_freq(struct iio_dev *indio_dev, int val, int val2) 153 { 154 struct adis16460 *st = iio_priv(indio_dev); 155 unsigned int t; ^^^^^^^^^^^^^^ 156 157 t = val * 1000 + val2 / 1000; 158 if (t <= 0) ^^^^^^ Unsigned is not less than zero. ``` The types of `val` && `val2` are obtained from the IIO `write_raw` hook, so userspace can provide negative values, which can cause weird behavior after conversion to unsigned. This patch changes the sign of variable `t` so that -EINVAL will be returned for negative values as well. Fixes: db6ed4d23dd1 ("iio: imu: Add support for the ADIS16460 IMU") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-18iio: accel: kxcjk1013: Improve comments on KIOX010A and KIOX020A ACPI idsHans de Goede
The KIOX010A and KIOX020A ACPI ids go hand in hand, they are used in yoga style 2-in-1s, with KIOX010A indicating the KXCJ91008 sensor in the display of the 2-in-1 and KIOX020A indicating the KXCJ91008 sensor in the base. Improve the existing comment on the "KIOX010A" kx_acpi_match table entry to make clear we are talking about a yoga-style (360 degree hinges) device here and add a similar comment to the "KIOX020A" entry. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-15staging: sm750fb: fix odd license textGreg Kroah-Hartman
There is some "confusing" license text in some of the sm750fb driver files. After discussing it with the company, it turns out to have been a mistake and these lines can be safely removed. The files are all to be licensed under the GPLv2 license. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: linux-fbdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20190815123009.16499-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: erofs: correct all misused ENOTSUPPGao Xiang
As Chao pointed out [1], ENOTSUPP is used for NFS protocol only, we should use EOPNOTSUPP instead... [1] https://lore.kernel.org/lkml/108ee2f9-75dd-b8ab-8da7-b81c17bafbf6@huawei.com/ Reported-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190814103705.60698-3-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: erofs: differentiate unsupported on-disk formatGao Xiang
For some specific fields, use EOPNOTSUPP instead of EIO for values which look sane but aren't supported right now. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190814103705.60698-2-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: erofs: introduce EFSCORRUPTED and more logsGao Xiang
Previously, EROFS uses EIO to indicate that filesystem is corrupted as well. However, as Pavel said [1], other filesystems tend to use EUCLEAN(EFSCORRUPTED) instead, let's follow what others do right now. Also, add some more prints to the syslog. [1] https://lore.kernel.org/lkml/20190813114821.GB11559@amd/ Suggested-by: Pavel Machek <pavel@denx.de> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190814103705.60698-1-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: comedi: usbduxsigma: remove redundant assignment to variable fx2delayColin Ian King
Variable fx2delay is being initialized with a value that is never read and fx2delay is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190815105314.5756-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: rtl8192u: fix up indentation of a statementColin Ian King
There is a statement that is indented one level too deeply, remove the extraneous tab. Addresses-Coverity: ("Identation does not match nesting level") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190815084034.13885-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: gasket: apex: Make structure apex_desc constantNishka Dasgupta
Static structure apex_desc, of type gasket_driver_desc, is used only as an argument to the functions gasket_register_device() and gasket_unregister_device(). In the definitions of both these functions, their parameter is declared as const. Hence make apex_desc itself constant to protect it from modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190815054924.643-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15staging: erofs: removing an extra call to iloc() in fill_inode()Pratik Shinde
in fill_inode() we call iloc() twice.Avoiding the extra call by storing the result. Signed-off-by: Pratik Shinde <pratikshinde320@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Cc: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190813203840.13782-1-pratikshinde320@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: do not force user to bring interface downIoana Ciornei
Link settings can be changed only when the interface is down. Disable and re-enable the interface, if necessary, behind the scenes so that we do not force users to an if down/up sequence. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-11-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: register_netdev only when readyIoana Ciornei
The register_netdev() call should be made only when ready to process any user request on the interface. Move the call to be the last one issued in the probe sequence. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-10-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: reword error messageIoana Ciornei
In the current state, the dpaa2-ethsw driver supports only one bridge per DPSW object. Reword the error message so that this information is much more clear. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-9-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove redundant VLAN checkIoana Ciornei
The ethsw_add_vlan() function is already called only when the VLAN is not yet configured on the switch. Remove the redundant check. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-8-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove unnecessary memsetIoana Ciornei
The ethtool core already zeroes the memory before calling .get_ethtool_stats() thus making the memset unnecessary. Remove it. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-7-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: use bool when encoding learning/flooding stateIoana Ciornei
Use a bool instead of an u8 in ethsw_set_learning() and ethsw_port_set_flood() to encode an binary type property. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-6-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove debug messageIoana Ciornei
Since ethtool will be loud enough if the .set_link_ksettings() callback fails, remove the debug messages which do not add additional information. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-5-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: add line terminator to all formatsIoana Ciornei
Add the '\n' line terminator to the string formats missing it. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-4-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: enable switch ports only on dev_openIoana Ciornei
At probe time, only the DPSW object should be enabled without the associated ports, which will get enabled on dev_open. Remove the ethsw_open() and ethsw_stop() functions and replace them only with dpsw_enable()/_disable(). Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-3-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove IGMP default addressIoana Ciornei
Do not add an IGMP multicast address by default since we do not support Rx/Tx ar the moment. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-2-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8723bs: remove redundant assignment to retColin Ian King
Variable ret is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190813124838.1317-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14Staging: rtl8712: rtl8712_recv: fixed 80 character length warningMerwin Trever Ferrao
When the checkpatch.pl script was run, it showed lines with length more than 80 characters in rtl8712_recv.c file. Fixed by breaking it up into two lines within 80 characters. Signed-off-by: Merwin Trever Ferrao <merwintf@gmail.com> Link: https://lore.kernel.org/r/20190813065806.GA23606@IoT-COE Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: r8712_dump_aggr_xframe(): Change type to voidNishka Dasgupta
Change return type of r8712_dump_aggr_xframe from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-4-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: r8712_xmitframe_aggr_1st(): Change return type to voidNishka Dasgupta
Change return type of r8712_xmitframe_aggr_1st from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-3-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: r8712_append_mpdu_unit(): Change return typeNishka Dasgupta
Change return type of r8712_append_mpdu_unit from u8 to void and remove its return statement as it always returns only _SUCCESS. Modify call sites to simply call this function instead of checking its return value, and execute all the statements in the if-block for when the function returns _SUCCESS. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8712: xmitframe_addmic(): Change return values and typeNishka Dasgupta
Change return values of xmitframe_addmic from _SUCCESS and _FAIL to 0 and -ENOMEM respectively. Modify call sites to check for non-zero values instead of _FAIL. Also change return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: rtl8723bs: Remove debugging information exposed via procfsKai-Heng Feng
The procfs provides many useful information for debugging, but it may be too much for normal usage, routines like proc_get_sec_info() reports various security related information. So let's remove it. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20190813042426.13733-1-kai.heng.feng@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: erofs: xattr.c: avoid BUG_ONGao Xiang
Kill all the remaining BUG_ON in EROFS: - one BUG_ON was used to detect xattr on-disk corruption, proper error handling should be added for it instead; - the other BUG_ONs are used to detect potential issues, use DBG_BUGON only in (eng) debugging version. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190813023054.73126-3-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: erofs: remove incomplete cleancacheGao Xiang
cleancache was not fully implemented in EROFS. In addition, it's tend to remove the whole cleancache in related attempt [1]. [1] https://lore.kernel.org/linux-fsdevel/20190527103207.13287-3-jgross@suse.com/ Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190813023054.73126-2-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: erofs: inline erofs_inode_is_data_compressed()Gao Xiang
As a helper in erofs_fs.h, erofs_inode_is_data_compressed() should be inlined. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190813023054.73126-1-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14iio:light:noa1305: Fix missing break statement.Jonathan Cameron
This got caught by the implicit fall through detection but is a bug rather than missing marking. Reported-by: 0-DAY kernel test infrastructure Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Fixes: 741172d18e8a ("iio: light: noa1305: Add support for NOA1305") Link: https://lore.kernel.org/r/20190813133851.14345-1-Jonathan.Cameron@huawei.com Cc: Gustavo Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12Merge tag 'iio-for-5.4a' of ↵Greg Kroah-Hartman
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 5.4 cycle Note includes a merge from i3c tree to get support needed for stm_lsm6dsx driver support for l3c devices. Done from immutable branch. A counter subsystem patche in here as well. Alongside the new device support (which is always good), Chuhong's work on using devres managed APIs has cleaned up a number of drivers. New device support * adis16460 - New driver based on ADIS framework which needed addition of support for cs_change_delay. Includes device tree binding. * cros_ec - Support fo the veyron-minnie which uses an older interface. * lsm6dsx - Support for LSM6DSTR-C gyro + magnetometer sensor (new IDs mainly) - Support for ISM330DHCX acc + gyro sensor (extensive rework needed!) * Maxim 5432 - New driver support MAX5432-MAX5435 family of potentiometers. * noa1305 - New driver for this ON Semiconductor Ambient light sensor. Features and cleanups * tree wide - Drop error prints after platform_get_irq as already prints errors internally if any occur. * docs - Document mounting matrix. - Fix a missing newline at end of file. * ad2s1210 - Switch to device managed APIs for all of probe and drop explicit remove. * ad7192 - Add of_device_id array to explicity handling DT bindings. * ad7606 - Lots of rework leading to support for software configure modes in ad7616 parts. - Debugfs register access support. * am2315 - Switch to device managed APIs for all of probe and drop explicit remove. * apds9960 - Typo in module description. * cm36651 - Convert to i2c_new_dummy_device. - Swithc to device managed APIs for all of probe adn drop explicit remove. * cros_ec - Calibscale support for accel, gyro and magnetometer. - Tidy up some error codes to return the error from the stack rather than -EIO. - Determine protocol version. - Add a sign vector to the core to fix sensor rotation if necessary. Cannot just be done with mount matrix as already in use in many devices. - Tidy up INFO_SCALE being in both the separate and shared lists. - Drop a lot of dplicate code from the cros-ec-accel-legacy driver and use the core provided code instead. - Make frequency range available to userspace. * counter / ftm-quaddec - Switch to device managed APIs for all of probe adn drop explicit remove. * hdc100x - Switch to device managed APIs for all of probe and drop explicit remove. * hi8435 - Use gpiod_set_value_cansleep as we don't care here and there is a board out there where it needs to sleep. - Switch to device managed APIs for all of probe and drop explict remove. * hp03 - Convert to i2c_new_dummy_device. * maxim thermocouple - Switch to device managed APIs for all of probe and drop explicit remove. * mmc35240 - Fix typo in constant naming. * mpu6050 - Use devm_add_action_or_reset in place of explicit error handling. - Make text in Kconfig more explicit about which parts are supported. * mxc4005 - Switch to device managed APIs for all of probe and drop explicit remove. * pms7003 - Convert device tree bindings to yaml. - Add a MAINTAINERS entry * sc27xx - Introduce a local struct device *dev pointer to avoid lots of deref. - Use devm_add_action_or_reset in place of explicit error handling. * sca3000 - Typo fix in naming. * si1145 - Switch to device managed APIs for all of probe and drop explicit remove. * st_sensors - Lots of rework to enable switch to regmap. - Regmap conversion at the end. - Tidy up some inconsistencies in buffer setup ops. - Tidy up an oddity by dropping get_irq_data_ready function in favour of direct access. - Stop allocating buffer in buffer enable in favour of just embedding a large enough constant size buffer in the iio_priv accessed structure. * st_lsm6dsx - l3c device support (LSM6DSO and LSM6DSR) - tidy up irq return logic which was strangely written. - fix up an ABI quirk where this driver used separate scale attributes, even though they were always shared by type. * stk33xx - Device tree bindings include manufacturer ID. * stm32-adc - Add control for supply to analog switches including DT bindings. * stm32 timer - Drop the quadrature mode support. Believed there were no users so take this opportunity to drop this unwanted ABI. * tsl2772 - Switch to device mangage APIs for all of probe and drop explicit remove. - Use regulator_bulk_* APIs to reduce repitition. * veml6070 - Convert to i2c_new_dummy_device. * tag 'iio-for-5.4a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (84 commits) iio: hi8435: Drop hi8435_remove() by using devres for remaining elements iio: hi8435: Use gpiod_set_value_cansleep() iio:st_sensors: remove buffer allocation at each buffer enable iio: imu: inv_mpu6050: be more explicit on supported chips iio: light: noa1305: Add support for NOA1305 dt-bindings: Add binding document for NOA1305 iio: remove get_irq_data_ready() function pointer and use IRQ number directly iio: imu: st_lsm6dsx: make IIO_CHAN_INFO_SCALE shared by type iio: tsl2772: Use regulator_bulk_() APIs iio: tsl2772: Use devm_iio_device_register iio: tsl2772: Use devm_add_action_or_reset for tsl2772_chip_off iio: tsl2772: Use devm_add_action_or_reset iio: Remove dev_err() usage after platform_get_irq() iio: light: si1145: Use device-managed APIs iio:pressure: preenable/postenable/predisable fixup for ST press buffer iio:magn: preenable/postenable/predisable fixup for ST magn buffer iio:gyro: preenable/postenable/predisable fixup for ST gyro buffer iio:accel: preenable/postenable/predisable fixup for ST accel buffer dt-bindings: iio: imu: st_lsm6dsx: add ism330dhcx device bindings iio: imu: st_lsm6dsx: add support to ISM330DHCX ...
2019-08-12staging: rtl8192u: fix spacing errorsStephen Brennan
Used checkpatch's --fix-inplace option for types SPACING, OPEN_BRACE, ELSE_AFTER_BRACE. Manually edited the resulting changes to correct for mistaken fixes and complete fixes that were only partially applied. Signed-off-by: Stephen Brennan <stephen@brennan.io> Link: https://lore.kernel.org/r/20190811225120.7308-1-stephen@brennan.io Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_construct_txaggr_cmd_hdr(): Change return typeNishka Dasgupta
Change return type of r8712_construct_txaggr_cmd_hdr from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-8-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_construct_txaggr_cmd_desc(): Change return typeNishka Dasgupta
Change return type of r8712_construct_txaggr_cmd_desc from u8 to void (and remove its return statement) as it always returns _SUCCESS and its return value is never stored, checked or otherwise used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-7-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_xmit_direct(): Change return typeNishka Dasgupta
Change return type of r8712_xmit_direct from int to void as its return value is never used. Remove return statement accordingly. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-6-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_free_xmitbuf(): Change return typeNishka Dasgupta
Change return type of r8712_free_xmitbuf from int to void (and remove its return values) as its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-5-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: make_wlanhdr(): Change return values and typeNishka Dasgupta
Change return values of make_wlanhdr from _SUCCESS/_FAIL to 0/-EINVAL. Modify call site to check for non-zero return values instead of _FAIL. Change return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-4-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: r8712_update_attrib(): Change return values and typeNishka Dasgupta
Change return values of r8712_update_attrib from _SUCCESS and _FAIL to 0 and -ENOMEM or -EINVAL respectively. Modify call site to check for the new failure conditions. Also modify the return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: rtl8712: _r8712_init_xmit_priv(): Change return values and typeNishka Dasgupta
Change the return values in _r8712_init_xmit_priv from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Change return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190809052353.5308-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: wilc1000: return kernel error codes from wilc_wlan_stopAdham Abozaeid
return -EIO for bus failures, 0 otherwise. Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Link: https://lore.kernel.org/r/20190809182510.22443-3-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12staging: wilc1000: Don't reset WILC CPU disgracefullyAdham Abozaeid
Send abort request to WILC from wilc_wlan_stop instead of resetting the CPU. The abort request was being sent from wilc_wlan_cleanup after the CPU was reset which wasn't the correct order. The abort request handler in the chip will take care of resetting the CPU. Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Link: https://lore.kernel.org/r/20190809182510.22443-2-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12Merge 5.3-rc4 into staging-nextGreg Kroah-Hartman
We need the iio/staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-11Linux 5.3-rc4Linus Torvalds
2019-08-11Merge tag 'dax-fixes-5.3-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull dax fixes from Dan Williams: "A filesystem-dax and device-dax fix for v5.3. The filesystem-dax fix is tagged for stable as the implementation has been mistakenly throwing away all cow pages on any truncate or hole punch operation as part of the solution to coordinate device-dma vs truncate to dax pages. The device-dax change fixes up a regression this cycle from the introduction of a common 'internal per-cpu-ref' implementation. Summary: - Fix dax_layout_busy_page() to not discard private cow pages of fs/dax private mappings. - Update the memremap_pages core to properly cleanup on behalf of internal reference-count users like device-dax" * tag 'dax-fixes-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: mm/memremap: Fix reuse of pgmap instances with internal references dax: dax_layout_busy_page() should not unmap cow pages
2019-08-11Merge tag 'ntb-5.3-bugfixes' of git://github.com/jonmason/ntbLinus Torvalds
Pull NTB fix from Jon Mason: "Bug fix for NTB MSI kernel compile warning" * tag 'ntb-5.3-bugfixes' of git://github.com/jonmason/ntb: NTB/msi: remove incorrect MODULE defines
2019-08-11iio: hi8435: Drop hi8435_remove() by using devres for remaining elementsAndrey Smirnov
Convert the remainder of hi8435_probe() to use devres and get rid of hi8435_remove(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: linux-iio@vger.kernel.org Cc: Chris Healy <cphealy@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-11iio: hi8435: Use gpiod_set_value_cansleep()Andrey Smirnov
Use gpiod_set_value_cansleep() instead of gpiod_set_value() to support the case when reset pin is connected to a GPIO expander. See ZII VF610 SCU4 AIB for one such example. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: linux-iio@vger.kernel.org Cc: Jonathan Cameron <jic23@kernel.org> Cc: Chris Healy <cphealy@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-11iio:st_sensors: remove buffer allocation at each buffer enableDenis Ciocca
This patch is removing the buffer allocation at each buffer enable. We just allocate enough memory in the main structure during probe to cover maximum size needed (that anyway is pretty small) [16bytes]. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-10Merge tag 'riscv/for-v5.3-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Paul Walmsley: "A few minor RISC-V updates for v5.3-rc4: - Remove __udivdi3() from the 32-bit Linux port, converting the only upstream user to use do_div(), per Linux policy - Convert the RISC-V standard clocksource away from per-cpu data structures, since only one is used by Linux, even on a multi-CPU system - A set of DT binding updates that remove an obsolete text binding in favor of a YAML binding, fix a bogus compatible string in the schema (thus fixing a "make dtbs_check" warning), and clarifies the future values expected in one of the RISC-V CPU properties" * tag 'riscv/for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: dt-bindings: riscv: fix the schema compatible string for the HiFive Unleashed board dt-bindings: riscv: remove obsolete cpus.txt RISC-V: Remove udivdi3 riscv: delay: use do_div() instead of __udivdi3() dt-bindings: Update the riscv,isa string description RISC-V: Remove per cpu clocksource