[PATCH v2 3/4] staging: iio: adt7316: fix the dac read calculation

2018-12-22 Thread Jeremy Fertic
The calculation of the current dac value is using the wrong bits of the dac lsb register. Create two macros to shift the lsb register value into lsb position, depending on whether the dac is 10 or 12 bit. Initialize data to 0 so, with an 8 bit dac, the msb register value can be bitwise ORed with

[PATCH v2 2/4] staging: iio: adt7316: fix handling of dac high resolution option

2018-12-22 Thread Jeremy Fertic
The adt7316/7 and adt7516/7 have the option to output voltage proportional to temperature on dac a and/or dac b. The default dac resolution in this mode is 8 bits with the dac high resolution option enabling 10 bits. None of these settings affect dacs c and d. Remove the "1 (12 bits)" output from

[PATCH v2 0/4] staging: iio: adt7316: dac fixes

2018-12-22 Thread Jeremy Fertic
Changes in v2: - Patches 1-2: reworded commit messages and added Fixes tags - Patches 3-4: added Fixes tags Jeremy Fertic (4): staging: iio: adt7316: fix dac_bits assignment staging: iio: adt7316: fix handling of dac high resolution option staging: iio: adt7316: fix the dac read

[PATCH v2 4/4] staging: iio: adt7316: fix the dac write calculation

2018-12-22 Thread Jeremy Fertic
The lsb calculation is not masking the correct bits from the user input. Subtract 1 from (1 << offset) to correctly set up the mask to be applied to user input. The lsb register stores its value starting at the bit 7 position. adt7316_store_DAC() currently assumes the value is at the other end of

[PATCH v2 1/4] staging: iio: adt7316: fix dac_bits assignment

2018-12-22 Thread Jeremy Fertic
The value of dac_bits is used in adt7316_show_DAC() and adt7316_store_DAC(), and it should be either 8, 10, or 12 bits depending on the device in use. The driver currently only assigns a value to dac_bits in adt7316_store_da_high_resolution(). The purpose of the dac high resolution option is not

[PATCH] rtlwifi: rtl8822b: fix a missing check of alloc_skb

2018-12-22 Thread Kangjie Lu
__netdev_alloc_skb() return NULl when it fails. skb_put() further uses it even when the allocation fails, leading to NULL pointer dereference. The fix inserts a check for the return value of __netdev_alloc_skb(). Signed-off-by: Kangjie Lu --- drivers/staging/rtlwifi/rtl8822be/fw.c | 2 ++ 1

[PATCH] binderfs: implement "max" mount option

2018-12-22 Thread Christian Brauner
Since binderfs can be mounted by userns root in non-initial user namespaces some precautions are in order. First, a way to set a maximum on the number of binder devices that can be allocated per binderfs instance and second, a way to reserve a reasonable chunk of binderfs devices for the initial

Re: [PATCH 03/11] staging: iio: adt7316: fix dac_bits assignment

2018-12-22 Thread Jonathan Cameron
On Mon, 17 Dec 2018 14:30:59 -0700 Jeremy Fertic wrote: > On Sun, Dec 16, 2018 at 11:37:56AM +, Jonathan Cameron wrote: > > On Tue, 11 Dec 2018 17:54:55 -0700 > > Jeremy Fertic wrote: > > > > > The only assignment to dac_bits is in adt7316_store_da_high_resolution(). > > > This function

Re: [PATCH v2 6/6] dt-bindings: iio: adc: Add docs for AD7606 ADC

2018-12-22 Thread Jonathan Cameron
On Mon, 17 Dec 2018 14:23:40 +0200 Stefan Popa wrote: > Document support for AD7606 Analog to Digital Converter. > > Signed-off-by: Stefan Popa > Reviewed-by: Rob Herring Applied to the togreg branch of iio.git and pushed out as testing for this to be mostly ignored. Thanks, Jonathan >

Re: [PATCH v2 5/6] staging: iio: adc: ad7606: Move out of staging

2018-12-22 Thread Jonathan Cameron
On Mon, 17 Dec 2018 14:23:39 +0200 Stefan Popa wrote: > Move ad7606 ADC driver out of staging and into the mainline. > > Signed-off-by: Stefan Popa Obviously the license detail change in patch 2 made this 'amusing' to apply. I think I got it in right, but please check I didn't mess it up.

Re: [PATCH v2 4/6] staging: iio: adc: ad7606: Misc style fixes (no functional change)

2018-12-22 Thread Jonathan Cameron
On Mon, 17 Dec 2018 14:23:38 +0200 Stefan Popa wrote: > * Placed includes in alphabetical order > * Added brackets around num and mask through out for AD760X_CHANNEL > * Used single line comments where needed > * Removed extra lines and spaces > > Signed-off-by: Stefan Popa Applied. Thanks,

Re: [PATCH v2 3/6] staging: iio: adc: ad7606: Add support for threaded irq

2018-12-22 Thread Jonathan Cameron
On Mon, 17 Dec 2018 14:23:37 +0200 Stefan Popa wrote: > This patch replaces the use of a polling ring buffer with a threaded > interrupt. > > Enabling the buffer sets the CONVST signal to high. When the rising edge > of the CONVST is applied, BUSY signal goes logic high and transitions low > at

Re: [PATCH v2 2/6] staging: iio: adc: ad7606: Use SPDX identifier

2018-12-22 Thread Jonathan Cameron
On Mon, 17 Dec 2018 14:23:36 +0200 Stefan Popa wrote: > This patch replaces the license text at the top of ad7606 driver files > and instead adds SPDX GPL-2.0 license identifier. > > Signed-off-by: Stefan Popa > --- > drivers/staging/iio/adc/ad7606.c | 5 ++--- >

Re: [PATCH v2 1/6] staging: iio: adc: ad7606: Simplify the Kconfing menu

2018-12-22 Thread Jonathan Cameron
On Mon, 17 Dec 2018 14:23:35 +0200 Stefan Popa wrote: > There is no point in having three menu entries that can be selected > individually. Instead, the SPI and parallel interfaces should select > AD7606. > > Signed-off-by: Stefan Popa I think this looks right, but I've gotten these wrong too

Re: [PATCH] Staging: iio: ad7192: replaced bool in struct

2018-12-22 Thread Jonathan Cameron
On Fri, 21 Dec 2018 15:26:26 -0800 Amir Mahdi Ghorbanian wrote: > Replaced bool in struct with unsigned int bitfield to conserve space and > more clearly define size of varibales > > Signed-off-by: Amir Mahdi Ghorbanian Hi Amir, I'm a bit in two minds on this one. It's not a size critical

Re: [PATCH v2] staging: iio: adc: ad7280a: fix codestyle in ad7280_event_handler

2018-12-22 Thread Jonathan Cameron
On Tue, 18 Dec 2018 01:06:01 +0300 Sergey Efimochkin wrote: > staging: iio: adc: ad7280a: fix codestyle in ad7280_event_handler > Signed-off-by: Sergey Efimochkin Hi, I wouldn't say this is a real improvement on readability. If you are really determined to 'fix it', then I would suggest

Re: [PATCH v2] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE

2018-12-22 Thread kbuild test robot
/0day-ci/linux/commits/Yangtao-Li/staging-rtlwifi-convert-to-DEFINE_SHOW_ATTRIBUTE/20181222-085444 config: x86_64-randconfig-r0-12221938 (attached as .config) compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 reproduce: # save the attached .config to linux build tree make ARCH=x86_64

[PATCH v4 4/4] staging: greybus: arche-platform: Switch to the gpio descriptor interface

2018-12-22 Thread Nishad Kamdar
Use the gpiod interface instead of the deprecated old non-descriptor interface. Signed-off-by: Nishad Kamdar --- Changes in v4: - Move 'gpio_desc *svc_sysboot' below the reset flag as it is more logical to have reset flag below reset gpio. - Remove a few unnecessary line breaks. Changes

[PATCH v4 3/4] staging: greybus: arche-apb-ctrl.c: Switch to the gpio descriptor interface

2018-12-22 Thread Nishad Kamdar
Use the gpiod interface instead of the deprecated old non-descriptor interface. Signed-off-by: Nishad Kamdar --- Changes in v4: - Use gpiod_set_raw_value() for deassert_reset() and assert_reset() as gpiod_set_value() will change the sematics of these calls by taking any gpio flags into

[PATCH v4 2/4] staging: greybus: gpio: Use gpiochip_get_data() in place of gpio_chip_to_gb_gpio_controller()

2018-12-22 Thread Nishad Kamdar
This patch drops gpio_chip_to_gb_gpio_controller(), and uses gpiochip_get_data() to retrieve the container of struct gpio_chip. Signed-off-by: Nishad Kamdar --- Changes in v4: - Introduce this change as a new patch. --- drivers/staging/greybus/gpio.c | 28 +--- 1 file

[PATCH v4 1/4] staging: greybus: gpio: switch GPIO portions to use GPIOLIB_IRQCHIP

2018-12-22 Thread Nishad Kamdar
Convert the GPIO driver to use the GPIO irqchip library GPIOLIB_IRQCHIP instead of reimplementing the same. Signed-off-by: Nishad Kamdar --- Changes in v4: - Remove changes related to conversion to gpiochip_get_data() to include it as a new patch. - Remove the 'struct irq_chip' field from

[PATCH v4 0/4] greybus: gpio: Switch to the gpio descriptor interface

2018-12-22 Thread Nishad Kamdar
This patch series converts uses of the old GPIO API to the GPIO descriptor API. It also converts the GPIO driver to use the GPIO irqchip library GPIOLIB_IRQCHIP instead of repimplementing the same. Changes in v4: - Changes mentioned in individual patches of the set. Changes in v3: - Combines

Re: [PATCH v3 3/3] staging: greybus: arche-platform: Switch to the gpio descriptor interface

2018-12-22 Thread Nishad Kamdar
On Tue, Dec 18, 2018 at 12:50:56PM +0100, Johan Hovold wrote: > On Thu, Nov 22, 2018 at 10:39:24PM +0530, Nishad Kamdar wrote: > > Use the gpiod interface instead of the deprecated > > old non-descriptor interface. > > > > Signed-off-by: Nishad Kamdar > > --- > > Changes in v2: > > - Move

Re: [PATCH v3 2/3] staging: greybus: arche-apb-ctrl.c: Switch to the gpio descriptor interface

2018-12-22 Thread Nishad Kamdar
On Tue, Dec 18, 2018 at 12:35:40PM +0100, Johan Hovold wrote: > On Thu, Nov 22, 2018 at 10:38:18PM +0530, Nishad Kamdar wrote: > > Use the gpiod interface instead of the deprecated old non-descriptor > > interface. > > > > Signed-off-by: Nishad Kamdar > > --- > > Changes in v2: > > - Resolved

Re: [PATCH v3 1/3] staging: greybus: gpio: switch GPIO portions to use GPIOLIB_IRQCHIP

2018-12-22 Thread Nishad Kamdar
On Tue, Dec 18, 2018 at 12:10:34PM +0100, Johan Hovold wrote: > On Thu, Nov 22, 2018 at 10:37:16PM +0530, Nishad Kamdar wrote: > > Convert the GPIO driver to use the GPIO irqchip library > > GPIOLIB_IRQCHIP instead of reimplementing the same. > > > > Signed-off-by: Nishad Kamdar > > --- > >

[PATCH][next] media: staging: intel-ipu3: fix unsigned comparison with < 0

2018-12-22 Thread Colin King
From: Colin Ian King The comparison css->pipes[pipe].bindex < 0 is always false because bindex is an unsigned int. Fix this by using a signed integer for the comparison. Detected by CoverityScan, CID#1476023 ("Unsigned compared against 0") Fixes: f5f2e4273518 ("media: staging/intel-ipu3: Add

[PATCH 1/2] staging: gs_fpgaboot: add SPDX identifiers

2018-12-22 Thread Michael Straube
This satisfies a checkpatch warning and is the preferred method for notating the license. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Michael Straube --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 12 +---

[PATCH 2/2] staging: gs_fpgaboot: cleanup alignment issue - style

2018-12-22 Thread Michael Straube
Cleanup alignment issue reported by checkpatch. CHECK: Alignment should match open parenthesis Signed-off-by: Michael Straube --- drivers/staging/gs_fpgaboot/io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/gs_fpgaboot/io.c

[PATCH] staging: wilc1000: fix memory leak in wilc_add_rx_gtk

2018-12-22 Thread Gustavo A. R. Silva
In case *mode* happens to be different than WILC_AP_MODE and WILC_STATION_MODE, gtk_key is not released, hence leanding to a memory leak. So, in this case it is safer to release gtk_key just before returning to callers. Addresses-Coverity-ID: 1476020 ("Resource leak") Signed-off-by: Gustavo A. R.

[PATCH] staging: goldfish: remove GPL boiler plate text

2018-12-22 Thread Michael Straube
The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. There is a SPDX identifier line in goldfish_audio.c. Remove the GPL boiler plate text to reduce file size. Signed-off-by: Michael Straube --- drivers/staging/goldfish/goldfish_audio.c |

Re: [PATCH net-next] staging: octeon: fix build failure with XFRM enabled

2018-12-22 Thread Sergei Shtylyov
Hello! On 21.12.2018 23:57, Florian Westphal wrote: skb->sp doesn't exist anymore in the next-next tree, so mips defconfig It's net-next. :-) no longer builds. Use helper instead to reset the secpath. Not even compile tested. Cc: Greg Kroah-Hartman Reported-by: Guenter Roeck Fixes: