summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-12-08iio:dac:ad5686: Add AD5310R supportStefan Popa
The AD5310R is a single channel DAC with 10-bit precision, which is part of the same family as AD5311R, except that it uses the spi interface instead of i2c. The device has a built-in 2.5V reference which is enabled by default. Another important difference is that the SPI write command operation is 16 bits long. The first four bits represent the command, while the remaining 12 bits are for data. In the control reg, DB9 and DB10 are used for power-down modes, while DB8 is the REF bit. In order to accommodate this change, a new regmap type was defined and checked accordingly. Because AD5310R does not have a readback register, the read_raw operation will return "Operation is not supported". Datasheet: Link: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5310R_5311R.pdf Signed-off-by: Stefan Popa <stefan.popa@analog.com> Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-08Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0"Jeremy Fertic
This reverts commit 00426e99789357dbff7e719a092ce36a3ce49d94. i2c_smbus_read_byte() returns 0 when a byte with the value 0 is read from the device. This is a valid read so revert the check for 0. Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-08dt-bindings: iio: accel: use a generic node name for lis302Lubomir Rintel
The example should follow the practice or using a generic node name instead of the precise programming model, as recommended by the DTSpec. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-08iio: core: check 'info' value before registering the deviceAndi Shyti
When the 'info' structure inside indio_dev is left uninitialized, a segmentation fault occurs. Check the 'info' value before using it and if it is equal to NULL, return with -EINVAL. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-02staging: iio: adc: ad7280a: fix overwrite of the returned valueSlawomir Stepien
The ret returned from ad7280_chain_setup() is needed to initialize the slave_num. Don't overwrite it with call to devm_add_action_or_reset(). Fixes: cc9c58ef6e06 ("staging: iio: adc: ad7280a: use devm_* APIs") Signed-off-by: Slawomir Stepien <sst@poczta.fm> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01staging: iio: adc: ad7280a: check for devm_kasprint() failureNicholas Mc Guire
devm_kasprintf() may return NULL on failure of internal allocation thus the assignments to attr.name are not safe if not checked. On error ad7280_attr_init() returns a negative return so -ENOMEM should be OK here (passed on as return value of the probe function). To make the error case more readable a temporary iio_attr is introduced and the code refactored. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Fixes: 2051f25d2a26 ("iio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System2") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01iio: humidity: hts221: add entry in MAINTAINERS fileLorenzo Bianconi
Add entry for hts221 temperature/humidity driver in MAINTAINERS file Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01iio: magnetometer: ak8975: Add the "AKM9911" ACPI HIDStephan Gerhold
This HID is used on the ASUS MeMO Pad 7 (ME176C) tablet. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01staging:iio:ad2s90: Move out of stagingMatheus Tavares
Move ad2s90 resolver driver out of staging to the main tree. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Victor Colombo <victorcolombo@gmail.com> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01staging:iio:ad2s90: Add comment to device state mutexVictor Colombo
Fix the checkpatch.pl issue: "CHECK: struct mutex definition without comment". Signed-off-by: Victor Colombo <victorcolombo@gmail.com> Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01staging:iio:ad2s90: Replace license text w/ SPDX identifierMatheus Tavares
This patch removes the license boilerplate text at the top of ad2s90.c and, instead, adds the SPDX GPL-2.0 license identifier, which solves the checkpatch.pl warning: "WARNING: Missing or malformed SPDX-License-Identifier tag in line 1". Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01dt-bindings:iio:resolver: Add docs for ad2s90Matheus Tavares
This patch adds the device tree binding documentation for the ad2s90 resolver-to-digital converter. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01staging:iio:ad2s90: Add max frequency check at probeAlexandru Ardelean
This patch adds a max frequency check at the beginning of ad2s90_probe function so that when it is set to a value above 0.83Mhz, dev_err is called with an appropriate message and -EINVAL is returned. The defined limit is 0.83Mhz instead of 2Mhz, which is the chip's max frequency as specified in the datasheet, because, as also specified in the datasheet, a 600ns delay is expected between the application of a logic LO to CS and the application of SCLK. Since the delay is not implemented in the spi code, to satisfy it, SCLK's period should be at most 2 * 600ns, so the max frequency should be 1 / (2 * 6e-7), which gives roughly 830000Hz. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01staging:iio:ad2s90: Remove spi setup that should be done via dtMatheus Tavares
The ad2s90 driver currently sets some spi settings (max_speed_hz and mode) at ad2s90_probe. Since the maximum frequency is a required element in DT binding for spi slave devices and because the spi mode for the device can be either (0,0) or (1,1), these settings should be handled via device tree, not in the driver's code. This patch removes them from the probe function. Note: The way in which the mentioned spi settings need to be specified on the ad2s90's node of a device tree will be documented in the future patch "dt-bindings:iio:resolver: Add docs for ad2s90". Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-01staging:iio:ad2s90: Add device tree supportMatheus Tavares
This patch adds device tree support to ad2s90 with standard device tree id table. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: imu: st_lsm6dsx: do not use a fixed read len in read_oneshotLorenzo Bianconi
Generalize st_lsm6dsx_shub_read_oneshot in order to not use a fixed read length and take into account iio channel realbits for single read operations Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: hid-sensor-hub: clean up indentation, remove extraneous tabColin Ian King
The statement is indented too much by one level, fix this by removing the extraneous tab. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: adc: stm32-adc: switch off running adc when going to low powerFabrice Gasnier
Switch off ADC when going to low power mode, in case it has been left running in buffer mode. Then re-enable it when resuming. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: adc: stm32-adc: add power management supportFabrice Gasnier
Add support for runtime PM & sleep. Move all regulator and clock management to dedicated HW start/stop routines. Then rely on (runtime) PM OPS to call them. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: adc: stm32-adc: move self-calibration to prepare routineFabrice Gasnier
Move self-calibration routine to prepare routine. - This is precursor patch to ease power management handling. - This also allow to factorize few error cases (error handling). Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-IDHans de Goede
Various 2-in-1's use KIOX010A and KIOX020A as HIDs for 2 KXCJ91008 accelerometers. The KIOX010A HID is for the one in the base and the KIOX020A for the accelerometer in the keyboard. Since userspace does not have a way yet to deal with (or ignore) the accelerometer in the keyboard, this commit just adds the KIOX010A HID for now so that display rotation will work. Related: https://github.com/hadess/iio-sensor-proxy/issues/166 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: potentiometer: Add driver for Microchip MCP41xxx/42xxxChris Coffey
This patch adds driver support for the Microchip MCP41xxx/42xxx family of digital potentiometers: DEVICE Wipers Positions Resistance (kOhm) MCP41010 1 256 10 MCP41050 1 256 50 MCP41100 1 256 100 MCP42010 2 256 10 MCP42050 2 256 50 MCP42100 2 256 100 Datasheet: http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf Signed-off-by: Chris Coffey <cmc@babblebit.net> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25dt-bindings: iio: potentiometer: Add Microchip MCP41xxx/42xxxChris Coffey
This patch adds device tree documentation for the Microchip MCP41xxx/42xxx family of digital potentiometers. Signed-off-by: Chris Coffey <cmc@babblebit.net> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25Staging: iio: adt7316: Change the name from irq_flags to irq_typeShreeya Patel
Most of the drivers in IIO uses irq_type as the name for storing the interrupt type and hence change the name from irq_flags to irq_type for maintaining the consistency. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25Staging: iio: adt7316: Switch irq_flags to a local variableShreeya Patel
There is no need to store irq_flags into the structure as it is always set to the same thing. Hence switch irq_flags to a local variable. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25Staging: iio: adt7316: Use device tree data to set ldac_pinShreeya Patel
Make the driver use device tree instead of the platform data. Hence, use devm_gpiod_get_optional function to get the data from device tree for ldac-pin and accordingly make the needed changes in the driver. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25Staging: iio: adt7316: Add of_device_id tableShreeya Patel
When the kernel starts up, it kicks off compiled-in drivers that match “compatible” entries it finds in the device tree. At a later stage (when /lib/modules is available), all kernel modules that match “compatible” entries in the device tree are loaded. But if there is no dt table then there should be a fall back path with which desired kernel modules can be loaded. Hence, add of_device_id table in the i2c driver to be able to use when there is no dt table. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: adc: meson-saradc: fix internal clock namesMartin Blumenstingl
Before this patch we are registering the internal clocks (for example on Meson8b, where the SAR ADC IP block implements the divider and gate clocks) with the following names: - /soc/cbus@c1100000/adc@8680#adc_div - /soc/cbus@c1100000/adc@8680#adc_en This is bad because the common clock framework uses the clock to create a directory in <debugfs>/clk. With such name, the directory creation (silently) fails and the debugfs entry ends up being created at the debugfs root. With this change, the new clock names are: - c1108680.adc#adc_div - c1108680.adc#adc_en This matches the clock naming scheme used in the PWM, Ethernet and MMC drivers. It also fixes the problem with debugfs. The idea is shamelessly taken from commit b96e9eb62841c5 ("pwm: meson: Fix mux clock names"). Fixes: 3921db46a8c5bc ("iio: Convert to using %pOF instead of full_name") Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: adc: meson-saradc: check for devm_kasprintf failureNicholas Mc Guire
devm_kasprintf() may return NULL on failure of internal allocation thus the assignments to init.name are not safe if not checked. On error meson_sar_adc_clk_init() returns negative values so -ENOMEM in the (unlikely) failure case of devm_kasprintf() should be fine here. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25staging: iio: ad5933: add device tree supportMarcelo Schmitt
Add a of_device_id struct variable and subsequent call to MODULE_DEVICE_TABLE macro to complete device tree support. Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-25iio: accel: kxcjk-1013: Add the "KXJ2109" ACPI HIDStephan Gerhold
This HID is used on the ASUS MeMO Pad 7 (ME176C) tablet. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-23staging: vboxvideo: Rename uint32_t type to u32Ricardo Reis Marques Silva
Issue found by checkpatch. CHECK: Prefer kernel type 'u32' over 'uint32_t' +static const uint32_t vbox_cursor_plane_formats[] = { CHECK: Prefer kernel type 'u32' over 'uint32_t' +static const uint32_t vbox_primary_plane_formats[] = { CHECK: Prefer kernel type 'u32' over 'uint32_t' + const uint32_t *formats; Signed-off-by: Ricardo Reis Marques Silva <ricardormsilva93@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: rtl8188eu: remove variable from rtl8188eu_xmit_tasklet()Michael Straube
The local variable ret is only used to test the return value of the call to rtl8188eu_xmitframe_complete(). Use the function directly in the if test and remove the variable ret. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: rtl8188eu: cleanup declarations in usb_ops_linux.cMichael Straube
Replace tabs with spaces and/or remove spaces in declarations to cleanup whitespace. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: rtl8188eu: add spaces around '>>' and '&'Michael Straube
Add spaces around '>>' and '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: rtl8188eu: remove unnecessary parenthesesMichael Straube
Remove unnecessary parentheses in usb_ops_linux.c. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: rtl8188eu: correct spelling mistake in a commentMichael Straube
Correct spelling mistake in a comment reported by checkpatch. checksumed -> checksummed Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: rtl8188eu: remove braces from single if else statementMichael Straube
Remove braces from single line if else statement. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: rtl8188eu: cleanup line ending with a '('Michael Straube
Cleanup line ending with a '(' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: rtl8188eu: use __func__ in usb_ops_linux.cMichael Straube
Use __func__ instead of hardcoded function names. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: rename strange variable names in z_erofs_vle_frontendGao Xiang
Previously, 2 members called `initial' and `cachedzone_la' are used for applying caching policy (whether the workgroup is at either end), which are hard to understand, rename them to `backmost' and `headoffset'. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: decompress asynchronously if PG_readahead page at firstGao Xiang
For the case of nr_to_read == lookahead_size, it is better to decompress asynchronously as well since no page will be needed immediately. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: locked before registering for all new workgroupsGao Xiang
Let's make sure that the one registering a workgroup will also take the primary work lock at first for two reasons: 1) There's no need to introduce such a race window (and consequently overhead) between registering and locking, other tasks could break in by chance, and the race seems unnecessary (no benefit at all); 2) It's better to take the primary work when a workgroup is registered to apply the cache managed policy, for example, if some other tasks break in, it could turn into the in-place decompression rather than use as the cached decompression. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: separate into init_once / alwaysGao Xiang
`z_erofs_vle_workgroup' is heavily generated in the decompression, for example, it resets 32 bytes redundantly for 64-bit platforms even through Z_EROFS_VLE_INLINE_PAGEVECS + Z_EROFS_CLUSTER_MAX_PAGES, default 4, pages are stored in `z_erofs_vle_workgroup'. As an another example, `struct mutex' takes 72 bytes for our kirin 64-bit platforms, it's unnecessary to be reseted at first and be initialized each time. Let's avoid filling all `z_erofs_vle_workgroup' with 0 at first since most fields are reinitialized to meaningful values later, and pagevec is no need to initialized at all. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: add a full barrier in erofs_workgroup_unfreezeGao Xiang
Just like other generic locks, insert a full barrier in case of memory reorder. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'Gao Xiang
There are two minor issues in the current freeze interface: 1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK, therefore fix the incorrect conditions; 2) For SMP platforms, it should also disable preemption before doing atomic_cmpxchg in case that some high priority tasks preempt between atomic_cmpxchg and disable_preempt, then spin on the locked refcount later. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: atomic_cond_read_relaxed on ref-locked workgroupGao Xiang
It's better to use atomic_cond_read_relaxed, which is implemented in hardware instructions to monitor a variable changes currently for ARM64, instead of open-coded busy waiting. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: fix race when the managed cache is enabledGao Xiang
When the managed cache is enabled, the last reference count of a workgroup must be used for its workstation. Otherwise, it could lead to incorrect (un)freezes in the reclaim path, and it would be harmful. A typical race as follows: Thread 1 (In the reclaim path) Thread 2 workgroup_freeze(grp, 1) refcnt = 1 ... workgroup_unfreeze(grp, 1) refcnt = 1 workgroup_get(grp) refcnt = 2 (x) workgroup_put(grp) refcnt = 1 (x) ...unexpected behaviors * grp is detached but still used, which violates cache-managed freeze constraint. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: fix the definition of DBG_BUGONGao Xiang
It's better not to positively BUG_ON the kernel, however developers need a way to locate issues as soon as possible. DBG_BUGON is introduced and it could only crash when EROFS_FS_DEBUG (EROFS developping feature) is on. It is helpful for developers to find and solve bugs quickly by eng builds. Previously, DBG_BUGON is defined as ((void)0) if EROFS_FS_DEBUG is off, but some unused variable warnings as follows could occur: drivers/staging/erofs/unzip_vle.c: In function `init_alway:': drivers/staging/erofs/unzip_vle.c:61:33: warning: unused variable `work' [-Wunused-variable] struct z_erofs_vle_work *const work = ^~~~ Fix it to #define DBG_BUGON(x) ((void)(x)). Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23staging: erofs: fix `trace_erofs_readpage' positionGao Xiang
`trace_erofs_readpage' was designed for .readpage() interface hook in order to trace the detailed synchronized read rather than the internal implementation `z_erofs_do_read_page' which both .readpage() and .readpages() use. It seems the tracepoint was placed to a wrong place by mistake and it should be moved to the right place. Fixes: 284db12cfda3 ("staging: erofs: add trace points for reading zipped data") Reviewed-by: Chen Gong <gongchen4@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>