Re: [PATCH] staging: pi433: fix race condition in pi433_open

2018-06-18 Thread Hugo Lefeuvre
Hi Dan, > We need to decrement device->users-- on the error paths as well. > This function was already slightly broken with respect to counting the > users, but let's not make it worse. > > I think it's still a tiny bit racy because it's not an atomic type. Oh right, I missed that. I'll fix it

Re: Do Qualcomm drivers use DMA buffers for request_firmware_into_buf()?

2018-06-18 Thread Luis R. Rodriguez
On Thu, Jun 07, 2018 at 11:06:11AM -0700, Bjorn Andersson wrote: > On Thu 07 Jun 09:23 PDT 2018, Ard Biesheuvel wrote: > > > On 7 June 2018 at 18:18, Bjorn Andersson wrote: > > > On Wed 06 Jun 13:32 PDT 2018, Luis R. Rodriguez wrote: > > > > > >> On Fri, Jun 01, 2018 at 09:23:46PM +0200, Luis R.

[PATCH] staging:iio:adc:ad7816: Backward resources cleanups in probe

2018-06-18 Thread Karim Eshapa
Backward cleanups for all resources allocated in probing in case of failure at any regestering or allocation step. Signed-off-by: Karim Eshapa --- drivers/staging/iio/adc/ad7816.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git

[PATCH] staging: board: drop refcount in success case

2018-06-18 Thread Nicholas Mc Guire
mbers") --- Problem located with an experimental coccinelle script Patch was compile-tested with: x86_64_defconfig + STAGING=y, STAGING_BOARD=y Patch is against 4.18-rc1 (localversion-next is next-20180618) drivers/staging/board/board.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drive

[PATCH v3] staging:iio:accel:adis16240: sign extend function replace hard code duplication

2018-06-18 Thread Karim Eshapa
Use sign_extend32 kernel function instead of code duplication, Safe also for 16 bit. and remove declaration of bits variable not needed. Signed-off-by: Karim Eshapa --- drivers/staging/iio/accel/adis16240.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git

[PATCH] staging: android/vsoc: stop using 'timespec'

2018-06-18 Thread Arnd Bergmann
The timespec structure suffers from the y2038 overflow and should not be used. This changes handle_vsoc_cond_wait() to use ktime_t directly. Signed-off-by: Arnd Bergmann --- drivers/staging/android/vsoc.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH] staging: rtl8723bs: remove get_monotonic_boottime()

2018-06-18 Thread Arnd Bergmann
get_monotonic_boottime() is deprecated because it uses the old 'timespec' structure. This replaces one of the last callers with a call to ktime_get_boottime, which also simplifies it a bit by avoiding a double conversion. Signed-off-by: Arnd Bergmann ---

Re: [PATCH] staging: rtsx: remove rtsx_trace() and related code

2018-06-18 Thread Dan Carpenter
> @@ -117,7 +112,6 @@ static int ms_transfer_data(struct rtsx_chip *chip, u8 > trans_mode, > enum dma_data_direction dir; > > if (!buf || !buf_len) { > - rtsx_trace(chip); > return STATUS_FAIL; > } > You're introducing a bunch of checkpatch.pl

Credit Suisse Bank London Dringend

2018-06-18 Thread Credit Suisse Bank London,England.
Guten Tag, wie geht es dir heute? Ich habe Ihre E-Mail-Adresse von Ihrem Länderverzeichnis erhalten und beschlossen, Sie bezüglich dieses Geschäftsvorschlags zu kontaktieren. Ich bin Mr.Chris Williams von der Investment Banking Abteilung der Credit Suisse Bank, One Cabot Square, London E14

[PATCH v3 5/5] staging: use BIT_ULL for NL80211_STA_INFO_* attribute types

2018-06-18 Thread Omer Efrat
The BIT macro uses unsigned long which some architectures handle as 32 bit and therefore might cause macro's shift to overflow when used on a value equals or larger than 32 (NL80211_STA_INFO_RX_DURATION and afterwards). Since 'filled' member in station_info changed to u64, BIT_ULL macro should be

Re: [PATCH v3 5/5] staging: use BIT_ULL for NL80211_STA_INFO_* attribute types

2018-06-18 Thread Greg KH
On Mon, Jun 18, 2018 at 04:11:51PM +0300, Kalle Valo wrote: > Greg KH writes: > > > On Mon, Jun 18, 2018 at 10:29:43AM +0300, Kalle Valo wrote: > >> Greg KH writes: > >> > >> > On Sun, Jun 17, 2018 at 01:07:36PM +0300, Omer Efrat wrote: > >> >> The BIT macro uses unsigned long which some

Re: [PATCH v3 5/5] staging: use BIT_ULL for NL80211_STA_INFO_* attribute types

2018-06-18 Thread Kalle Valo
Greg KH writes: > On Mon, Jun 18, 2018 at 10:29:43AM +0300, Kalle Valo wrote: >> Greg KH writes: >> >> > On Sun, Jun 17, 2018 at 01:07:36PM +0300, Omer Efrat wrote: >> >> The BIT macro uses unsigned long which some architectures handle as 32 bit >> >> and therefore might cause macro's shift to

[PATCH] staging: fbtft: Add missing blank line after function definition

2018-06-18 Thread Jay Buddhabhatti
Reslove checkpatch warnings by adding missing blank line after function definition. Signed-off-by: Jay Buddhabhatti --- drivers/staging/fbtft/fb_s6d1121.c | 1 + drivers/staging/fbtft/fb_ssd1289.c | 1 + drivers/staging/fbtft/fb_st7735r.c | 1 + 3 files changed, 3 insertions(+) diff --git

Re: [PATCH] staging: fbtft: Add missing blank line after function definition

2018-06-18 Thread Greg KH
On Mon, Jun 18, 2018 at 04:57:41PM +0530, Jay Buddhabhatti wrote: > Reslove checkpatch warnings by adding missing blank line after > function definition. > > Signed-off-by: Jay Buddhabhatti > --- > drivers/staging/fbtft/fb_s6d1121.c | 1 + > drivers/staging/fbtft/fb_ssd1289.c | 1 + >

Re: [PATCH] staging: pi433: fix race condition in pi433_open

2018-06-18 Thread Dan Carpenter
On Sun, Jun 17, 2018 at 10:24:00PM -0400, Hugo Lefeuvre wrote: > Whenever pi433_open and pi433_remove execute concurrently, a race > condition potentially resulting in use-after-free might happen. > > Let T1 and T2 be two kernel threads. > > 1. T1 executes pi433_open and stops before

INVESTMENT

2018-06-18 Thread RICHARD LAWRENCE
Hello We are international business advisors operating with the European Community. At this moment, we have a mandate from one of our international client seeking offshore investment in any suitable country with flexible tax laws. If you are interested, kindly contact us for more information on

[PATCH v5 10/18] staging: mt7621-gpio: update kerneldoc for state containers

2018-06-18 Thread Sergio Paracuellos
Update kernel doc for mtk_data and also remove no needed documentation for mtk_gc which is clear enough to don't need it. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git

[PATCH v5 09/18] staging: mt7621-gpio: remove no more necessary PIN_MASK macro

2018-06-18 Thread Sergio Paracuellos
PIN_MASK macro was being used because of the fact we were only using one interrupt controller for all of the gpio chips. This has been changed to use one per gpio chip and each has 32 irqs. Because of this this macro is not needed anymore. Use BIT macro instead. Signed-off-by: Sergio Paracuellos

[PATCH v5 15/18] staging: mt7621-gpio: set different names for each gpio_chip and irq_chip

2018-06-18 Thread Sergio Paracuellos
Currently the driver defines 3 gpiochips, one for each bank. /sys/class/gpio/gpiochip416/label:1e000600.gpio /sys/class/gpio/gpiochip448/label:1e000600.gpio /sys/class/gpio/gpiochip480/label:1e000600.gpio Unfortunately they all have the same label Interrupts from /proc/interrupt show the same

[PATCH v5 07/18] staging: mt7621-gpio: implement high level and low level irqs

2018-06-18 Thread Sergio Paracuellos
This chip support high level and low level interrupts. Those have to be implemented also to get a complete and clean driver. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 47 --- 1 file changed, 37 insertions(+), 10 deletions(-)

[PATCH v5 14/18] staging: mt7621-gpio: avoid one level indentation in interrupt handler

2018-06-18 Thread Sergio Paracuellos
There is no need to check for 'pending' before loop over the interrupts using 'for_each_set_bit' if nothing is set the return values will be the same so just avoid this check avoiding also one level intentation and improving readability. Signed-off-by: Sergio Paracuellos ---

[PATCH v5 11/18] staging: mt7621-gpio: align indentation for all defines

2018-06-18 Thread Sergio Paracuellos
There was two remaining defines which weren't properly aligned with the rest. Align them improving readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v5 18/18] staging: mt7621-gpio: avoid use banks in device tree

2018-06-18 Thread Sergio Paracuellos
Banks shouldn't be defined in DT if number of resources per bank is not variable. We actually know that this SoC has three banks so take that into account in order to don't overspecify the device tree. Device tree will only have one node making it simple. Update device tree, binding doc and code

[PATCH v5 13/18] staging: mt7621-gpio: avoid to set up irqs if not defined in dts

2018-06-18 Thread Sergio Paracuellos
If there is no interrupt defined in the dts 'irq_of_parse_and_map' returns 0 and we should't set up interrupts for each gpio chip in that case. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 42 --- 1 file changed, 22 insertions(+),

[PATCH v5 16/18] staging: mt7621-gpio: avoid long line in a comment

2018-06-18 Thread Sergio Paracuellos
Checkpatch script is complaining about a comment line which exceeds 80 characteres. Just silence it. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c

[PATCH v5 17/18] staging: mt7621-gpio: update Kconfig with SoC details

2018-06-18 Thread Sergio Paracuellos
Kconfig is using a generic 'Mediatek GPIO Support' in description and help which is not specific at all about the current SoC which is MT7621. Update it. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v5 06/18] staging: mt7621-gpio: add kerneldoc for state data containers

2018-06-18 Thread Sergio Paracuellos
This commit adds kerneldoc for the two data containers in order to better understanding of its existence. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 18 ++ 1 file changed, 18 insertions(+) diff --git

[PATCH v5 12/18] staging: mt7621-gpio: avoid check for NULL in 'to_mediatek_gpio' calls

2018-06-18 Thread Sergio Paracuellos
Function 'to_mediatek_gpio' cannot return NULL, so this NULL checkings are pointless. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c

[PATCH v5 04/18] staging: mt7621-gpio: implement '.irq_[request|release]_resources' functions

2018-06-18 Thread Sergio Paracuellos
When implementing custom irqchips it is important to also implement .irq_request_resources() and .irq_release_resources() and make sure these call gpiochip_[un]lock_as_irq(). Add those two for this driver. Also store struct device pointer in global state structure to be able to use 'dev_err' with

[PATCH v5 02/18] staging: mt7621-gpio: avoid including 'gpio.h'

2018-06-18 Thread Sergio Paracuellos
Including file '' should be avoided in new drivers code, so just remove it because it is no necessary at all. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c

[PATCH v5 08/18] staging: mt7621-gpio: avoid custom irq_domain for gpio

2018-06-18 Thread Sergio Paracuellos
Instead of create a custom irq_domain for this chip, use 'gpiochip_set_chained_irqchip' from GPIOLIB_IRQCHIP. It is ok to call this function several times. We have to manually mark the line with 'IRQF_SHARED' and then loop over the three banks until you find a hit. There were some problems with

[PATCH v5 05/18] staging: mt7621-gpio: add COMPILE_TEST

2018-06-18 Thread Sergio Paracuellos
This driver is actually platform-agnostic. Add COMPILE_TEST for the compilation test coverage. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-gpio/Kconfig

[PATCH v5 01/18] staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC

2018-06-18 Thread Sergio Paracuellos
Gpio complexity is just masking the fact that offset is always 0..n and writes to bits 0..n of some memory address. Because of this whole thing can just me converted to use GPIO_GENERIC and avoid duplications of a lot of driver custom functions. So use bgpio_init instead of custom code adding

[PATCH v5 03/18] staging: mt7621-gpio: make use of 'builtin_platform_driver'

2018-06-18 Thread Sergio Paracuellos
This driver was being registered using 'module_platform_driver' but it is not a module at all. Instead of this use 'builtin_platform_driver' which seems to be the correct one. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v5 00/18] staging: mt7621-gpio: last cleanups

2018-06-18 Thread Sergio Paracuellos
After submiting this driver to try to get mainlined and get out of staging some new cleanups seems to be necessary. According to this mail of Linus Walleij: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-June/121742.html and this mail os Rob Herring:

Re: [PATCH v2] staging: mt7621-gpio: avoid use banks in device tree

2018-06-18 Thread Sergio Paracuellos
On Mon, Jun 18, 2018 at 10:53:31AM +0200, Greg KH wrote: > On Mon, Jun 18, 2018 at 09:07:57AM +0200, Sergio Paracuellos wrote: > > Banks shouldn't be defined in DT if number of resources > > per bank is not variable. We actually know that this SoC > > has three banks so take that into account in

Re: Question about disabling of CONFIG_ANDROID_BINDER_IPC_32BIT in upcomng kernel 4.18

2018-06-18 Thread Dan Carpenter
You should be asking the author of the patch, Martijn Coenen. He's also the maintainer for that. I have added him to the CC list. regards, dan carpenter On Sun, Jun 17, 2018 at 10:26:09AM +0200, Mauro Rossi wrote: > + de...@linuxdriverproject.org > resending to Greg KH as instructed by his

Re: [PATCH] staging: speakup: refactor synths array to use a list

2018-06-18 Thread Samuel Thibault
Justin Skists, le lun. 18 juin 2018 09:55:32 +0100, a ecrit: > When I was going through the driver code, to become familiar with it, there > were a few places that I thought needed a closer look. Yes, cleanup work is probably needed in various places. Samuel

Re: [PATCH] staging: speakup: refactor synths array to use a list

2018-06-18 Thread Justin Skists
> On 18 June 2018 at 09:46 Samuel Thibault wrote: > > > Justin Skists, le lun. 18 juin 2018 09:41:44 +0100, a ecrit: > > > On 18 June 2018 at 06:34 Gregory Nowak wrote: > > > With /sys/accessibility/speakup/synth set to bns, I am getting output > > > alternately from the bns and from soft.

Re: [PATCH v2] staging: mt7621-gpio: avoid use banks in device tree

2018-06-18 Thread Greg KH
On Mon, Jun 18, 2018 at 09:07:57AM +0200, Sergio Paracuellos wrote: > Banks shouldn't be defined in DT if number of resources > per bank is not variable. We actually know that this SoC > has three banks so take that into account in order to don't > overspecify the device tree. Device tree will

Re: [PATCH V2] staging: mt7621-eth: Fix memory leak in mtk_add_mac() error path

2018-06-18 Thread Greg Kroah-Hartman
On Sat, Jun 16, 2018 at 01:01:27PM +0300, Kamal Heib wrote: > Fix memory leak in error path of mtk_add_mac() by make sure to free > the allocated netdev. > > Fixes: e3cbf478f846 ('staging: mt7621-eth: add the drivers core files') > Signed-off-by: Kamal Heib > --- > Changes from v1: > No

Re: [PATCH] staging: speakup: refactor synths array to use a list

2018-06-18 Thread Samuel Thibault
Justin Skists, le lun. 18 juin 2018 09:41:44 +0100, a ecrit: > > On 18 June 2018 at 06:34 Gregory Nowak wrote: > > With /sys/accessibility/speakup/synth set to bns, I am getting output > > alternately from the bns and from soft. It's as if speakup can't make > > up its mind which synthesizer is

Re: [PATCH] staging: speakup: refactor synths array to use a list

2018-06-18 Thread Justin Skists
> On 18 June 2018 at 06:34 Gregory Nowak wrote: > > > On Tue, Jun 12, 2018 at 08:31:06AM +0200, Samuel Thibault wrote: > > The load/unload is about the module itself, i.e. modprobe speakup_bns ; > > modprobe speakup_soft, switch between them, then rmmod speakup_bns ; > > speakup_soft or the

Re: [PATCH v3 5/5] staging: use BIT_ULL for NL80211_STA_INFO_* attribute types

2018-06-18 Thread Greg KH
On Mon, Jun 18, 2018 at 10:29:43AM +0300, Kalle Valo wrote: > Greg KH writes: > > > On Sun, Jun 17, 2018 at 01:07:36PM +0300, Omer Efrat wrote: > >> The BIT macro uses unsigned long which some architectures handle as 32 bit > >> and therefore might cause macro's shift to overflow when used on a

Re: [PATCH v3 5/5] staging: use BIT_ULL for NL80211_STA_INFO_* attribute types

2018-06-18 Thread Kalle Valo
Greg KH writes: > On Sun, Jun 17, 2018 at 01:07:36PM +0300, Omer Efrat wrote: >> The BIT macro uses unsigned long which some architectures handle as 32 bit >> and therefore might cause macro's shift to overflow when used on a value >> equals or larger than 32 (NL80211_STA_INFO_RX_DURATION and

[PATCH v2] staging: mt7621-gpio: avoid use banks in device tree

2018-06-18 Thread Sergio Paracuellos
Banks shouldn't be defined in DT if number of resources per bank is not variable. We actually know that this SoC has three banks so take that into account in order to don't overspecify the device tree. Device tree will only have one node making it simple. Update device tree, binding doc and code

[PATCH 3/3] Staging:rtl8192e Cleanup comparison to NULL

2018-06-18 Thread Janani Sankara Babu
This patch replaces the comparison of var to NULL with !var Signed-off-by: Janani Sankara Babu --- drivers/staging/rtl8192e/rtl819x_BAProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c

[PATCH 2/3] Staging:rtl8192e Fix Comparison to true is error prone

2018-06-18 Thread Janani Sankara Babu
This patch removes the comaprison to bool value in the code Signed-off-by: Janani Sankara Babu --- drivers/staging/rtl8192e/rtl819x_BAProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c

[PATCH 1/3] Staging:rtl8192e Fix Comparison to False is error prone

2018-06-18 Thread Janani Sankara Babu
This patch removes comparison to False and boolean values in the code which can be written as !var Signed-off-by: Janani Sankara Babu --- drivers/staging/rtl8192e/rtl819x_BAProc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

Re: [PATCH] staging: speakup: refactor synths array to use a list

2018-06-18 Thread Samuel Thibault
Thanks for the tests! Samuel ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel