[PATCH -next] staging: mt7621-eth: fix return value check in mtk_probe()

2018-03-21 Thread Wei Yongjun
In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files") Signed-off-by: Wei Yongjun

[PATCH -next] staging: mt7621-eth: fix return value check in mtk_connect_phy_node()

2018-03-21 Thread Wei Yongjun
In case of error, the function of_phy_connect() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files") Signed-off-by: Wei Yongjun ---

[PATCH -next] staging: mt7621-eth: fix return value check in mt7621_gsw_probe()

2018-03-21 Thread Wei Yongjun
In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: f079b6406348 ("staging: mt7621-eth: add gigabit switch driver (GSW)") Signed-off-by: Wei Yongjun

[PATCH -next] staging: mt7621-gpio: mt7621: make symbol gc_map static

2018-03-21 Thread Wei Yongjun
Fixes the following sparse warning: drivers/staging/mt7621-gpio/gpio-mt7621.c:47:3: warning: symbol 'gc_map' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] staging: lustre: lnet: use correct 'magic' test

2018-03-21 Thread NeilBrown
On Wed, Mar 21 2018, Justin Skists wrote: > Use the lnet_magic_accept() function to compare 'magic' against > LNET_PROTO_TCP_MAGIC for the appropriate string for an error message. > > The original fix removed an unneeded byte-ordering cast because the define > was already CPU byte-ordered and it

Re: [PATCH v2 4/7] staging: mt7621-dma: Remove assignment in if

2018-03-21 Thread NeilBrown
On Wed, Mar 21 2018, Christian Lütke-Stetzkamp wrote: > Fixes checkpatch error: ASSIGN_IN_IF by adding an inner if in the else > path, this also avoids calling vchan_find_desc when not needed. > > Signed-off-by: Christian Lütke-Stetzkamp Thanks. You can add Reviewed-by:

[PATCH v2 7/7] staging: mt7621-dma: Fixing parenthesis alignment

2018-03-21 Thread Christian Lütke-Stetzkamp
Fixes checkpatch check: PARENTHESIS_ALIGNMENT Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown --- drivers/staging/mt7621-dma/mtk-hsdma.c | 29 + drivers/staging/mt7621-dma/ralink-gdma.c | 55

[PATCH v2 5/7] staging: mt7621-dma: Fix ident by space

2018-03-21 Thread Christian Lütke-Stetzkamp
Fixes checkpatch error: CODE_IDENT Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown --- drivers/staging/mt7621-dma/ralink-gdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-dma/ralink-gdma.c

[PATCH v2 3/7] staging: mt7621-dma: Fix open brace position

2018-03-21 Thread Christian Lütke-Stetzkamp
Fixes checkpatch error: OPEN_BRACE Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown --- drivers/staging/mt7621-dma/ralink-gdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/mt7621-dma/ralink-gdma.c

[PATCH v2 1/7] staging: mt7621-dma: Fix Pointer Location

2018-03-21 Thread Christian Lütke-Stetzkamp
Fixes checkpatch error: POINTER_LOCATION Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown --- drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +- drivers/staging/mt7621-dma/ralink-gdma.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH v2 0/7] staging: mt7621: Checkpatch cleanup

2018-03-21 Thread Christian Lütke-Stetzkamp
This patchset fiexes errors, warnings and checks found by checkpatch. Changes in v2: * Added reviewd by tags * Reworked patch "Remove assignment in if" by adding an inner if Christian Lütke-Stetzkamp (7): staging: mt7621-dma: Fix Pointer Location staging: mt7621-dma: Fix Spacing staging:

Re: [PATCH 4/7] staging: mt7621-dma: Remove assignment in if

2018-03-21 Thread Christian Lütke-Stetzkamp
On Wed, Mar 21, 2018 at 09:21:55AM +1100, NeilBrown wrote: > I don't like this change. We now call vchan_find_desc() in situations > where we didn't before. It isn't a very expensive function so that > doesn't matter a lot, but I think it is best not to do this. > If you want to remove the

Re: [PATCH] staging: wilc1000: check for kmalloc allocation failures

2018-03-21 Thread Joe Perches
On Wed, 2018-03-21 at 19:19 +, Colin King wrote: > From: Colin Ian King > > There are three kmalloc allocations that are not null checked which > potentially could lead to null pointer dereference issues. Fix this > by adding null pointer return checks. looks like

[PATCH] staging: lustre: lnet: use correct 'magic' test

2018-03-21 Thread Justin Skists
Use the lnet_magic_accept() function to compare 'magic' against LNET_PROTO_TCP_MAGIC for the appropriate string for an error message. The original fix removed an unneeded byte-ordering cast because the define was already CPU byte-ordered and it was assumed that 'magic' was CPU byte-ordered, too.

Re: [PATCH v3] staging: bcm2835-audio: Release resources on module_exit()

2018-03-21 Thread Kirill Marinushkin
On 03/21/18 20:24, Andy Shevchenko wrote: > On Wed, Mar 21, 2018 at 8:48 PM, Kirill Marinushkin > wrote: >> In the current implementation, `rmmod snd_bcm2835` does not release >> resources properly. It causes an oops when trying to list sound devices. >> >> This commit

Re: [PATCH v3] staging: bcm2835-audio: Release resources on module_exit()

2018-03-21 Thread Andy Shevchenko
On Wed, Mar 21, 2018 at 8:48 PM, Kirill Marinushkin wrote: > In the current implementation, `rmmod snd_bcm2835` does not release > resources properly. It causes an oops when trying to list sound devices. > > This commit fixes it. > > The details WRT allocation / free are

[PATCH] staging: wilc1000: check for kmalloc allocation failures

2018-03-21 Thread Colin King
From: Colin Ian King There are three kmalloc allocations that are not null checked which potentially could lead to null pointer dereference issues. Fix this by adding null pointer return checks. Detected by CoverityScan, CID#1466025-27 ("Dereference null return")

[PATCH v3] staging: bcm2835-audio: Release resources on module_exit()

2018-03-21 Thread Kirill Marinushkin
In the current implementation, `rmmod snd_bcm2835` does not release resources properly. It causes an oops when trying to list sound devices. This commit fixes it. The details WRT allocation / free are described below. Device structure WRT allocation: pdev \childdev[] \card \chip

Re: [PATCH v3]PCI: hv: fix PCI-BUS domainID corruption

2018-03-21 Thread Bjorn Helgaas
[I composed most of this before seeing Lorenzo's response, so sorry about the duplication. Maybe seeing things stated a different way will help :)] On Tue, Mar 20, 2018 at 11:00:36PM +, Sridhar Pitchai wrote: > Hi Lorenzo, >Transparent SRIOV is exposing the NIC directly to the kernel via

Re: [PATCH v2] staging: bcm2835-audio: Release resources on module_exit()

2018-03-21 Thread Kirill Marinushkin
On 03/21/18 16:03, Andy Shevchenko wrote: > On Thu, Mar 15, 2018 at 7:57 AM, Kirill Marinushkin > wrote: >> On 03/13/18 22:23, Andy Shevchenko wrote: >>> On Tue, Mar 13, 2018 at 9:34 PM, Kirill Marinushkin >>> wrote: In the current

Re: [PATCH v3]PCI: hv: fix PCI-BUS domainID corruption

2018-03-21 Thread Lorenzo Pieralisi
On Tue, Mar 20, 2018 at 11:00:36PM +, Sridhar Pitchai wrote: > Hi Lorenzo, >Transparent SRIOV is exposing the NIC directly to the kernel via >para-virtual device, unlike creating a netdev and associating it >with the bond driver. Further descriptions here, > >

Re: [PATCH v2] staging: bcm2835-audio: Release resources on module_exit()

2018-03-21 Thread Andy Shevchenko
On Thu, Mar 15, 2018 at 7:57 AM, Kirill Marinushkin wrote: > On 03/13/18 22:23, Andy Shevchenko wrote: >> On Tue, Mar 13, 2018 at 9:34 PM, Kirill Marinushkin >> wrote: >>> In the current implementation, `rmmod snd_bcm2835` does not release >>>

[v2] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

2018-03-21 Thread Roy Pledge
Move the NXP DPIO (Datapath I/O Driver) out of the drivers/staging directory and into the drivers/soc/fsl directory. The DPIO driver enables access to Queue and Buffer Manager (QBMAN) hardware on NXP DPAA2 devices. This is a prerequisite to moving the DPAA2 Ethernet driver out of staging.

Re: [PATCH 00/11] staging: wilc1000: fix for checkpatch and handled malloc memory properly

2018-03-21 Thread Claudiu Beznea
Patch 6 may be reworked a bit. Other than this: Reviewed-by: Claudiu Beznea On 21.03.2018 11:20, Ajay Singh wrote: > Hi Dan, > > On Wed, 21 Mar 2018 10:51:16 +0300 > Dan Carpenter wrote: > >> These look good. I've reviewed them all. >>

Re: [PATCH 06/11] staging: wilc1000: refactor mgmt_tx to fix line over 80 chars

2018-03-21 Thread Claudiu Beznea
On 20.03.2018 18:55, Ajay Singh wrote: > Refactor mgmt_tx() to fix line over 80 characters issue. Split the > function to avoid the checkpatch.pl warning. Returning the same error > code in case of memory allocation failure. > > Signed-off-by: Ajay Singh > --- >

Re: [PATCH 04/11] staging: wilc1000: refactor WILC_WFI_p2p_rx() to avoid line over 80 char

2018-03-21 Thread Claudiu Beznea
Also good for me, only one minor thing mentioned below. On 20.03.2018 18:55, Ajay Singh wrote: > + if (subtype == GO_NEG_REQ || subtype == GO_NEG_RSP || > + subtype == P2P_INV_REQ || subtype == P2P_INV_RSP) { > + for (i = P2P_PUB_ACTION_SUBTYPE + 2; i < size; i++) { > +

Re: [PATCH] staging: fsl-dpaa2: replace simple switch case by if statement

2018-03-21 Thread
On Wed, Mar 21, 2018 at 03:17:51PM +0300, Denis Kirjanov wrote: > On 3/21/18, David Laight wrote: > > From: > hariprasath.ela...@gmail.com > >> Sent: 21 March 2018 11:16 > >> From: HariPrasath Elango > >> > >> Replace a couple of simple

Re: [PATCH] staging: fsl-dpaa2: replace simple switch case by if statement

2018-03-21 Thread Denis Kirjanov
On 3/21/18, David Laight wrote: > From: > hariprasath.ela...@gmail.com >> Sent: 21 March 2018 11:16 >> From: HariPrasath Elango >> >> Replace a couple of simple switch cases by if condition > > Why? > In principle extra 'case' might be

edit your photos

2018-03-21 Thread Jerry
We provide you following image editing services: photo cut out and clipping path photo retouching; beauty model retouching on skin, body glamour retouching; products retouching If you want to check our quality of work please send us a photo with instruction and we will work on it. We have 20

RE: [PATCH] staging: fsl-dpaa2: replace simple switch case by if statement

2018-03-21 Thread David Laight
From: > hariprasath.ela...@gmail.com > Sent: 21 March 2018 11:16 > From: HariPrasath Elango > > Replace a couple of simple switch cases by if condition Why? In principle extra 'case' might be needed in the future. ... > diff --git

[PATCH] staging: fsl-dpaa2: replace simple switch case by if statement

2018-03-21 Thread hariprasath . elango
From: HariPrasath Elango Replace a couple of simple switch cases by if condition Signed-off-by: HariPrasath Elango --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 11 --- 1 file changed, 4 insertions(+), 7

[PATCH 09/11] staging: iio: tsl2x7x: remove ch0 and ch1 variables from tsl2x7x_get_lux()

2018-03-21 Thread Brian Masney
Remove the ch0 and ch1 variables from tsl2x7x_get_lux() and write those values directly into the chip->als_cur_info.als_ch0 and chip->als_cur_info.als_ch01 variables. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 21 ++--- 1 file

[PATCH 08/11] staging: iio: tsl2x7x: remove unused variables from tsl2x7x_get_lux()

2018-03-21 Thread Brian Masney
tsl2x7x_get_lux() has a ch0lux and ch1lux variables that are not used so this patch removes them. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c

[PATCH 11/11] staging: iio: tsl2x7x: add copyright

2018-03-21 Thread Brian Masney
Add Brian Masney's copyright and to the list of module authors for all of the staging cleanups. This patch also update's Jon Brenner's current work email address since AMS now owns TAOS. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 4 +++- 1 file

[PATCH 04/11] staging: iio: tsl2x7x: simplify tsl2x7x_prox_cal()

2018-03-21 Thread Brian Masney
tsl2x7x_prox_cal() would set the interrupt flag, and reset the device to start doing the calibration routine. However, this did not actually affect the readings since they are polled. This patch drops the interrupt code. This patch also drops the function tsl2x7x_prox_calculate() and removes

[PATCH 06/11] staging: iio: tsl2x7x: make logging consistent and correct newlines

2018-03-21 Thread Brian Masney
This patch updates all of the logging commands so that they are consistent with the other messages, includes __func__ in the message, and all of the messages include newlines. This patch also removes some debug log messages. Signed-off-by: Brian Masney --- Changes since

[PATCH 10/11] staging: iio: tsl2x7x: put local variables in reverse Christmas tree order

2018-03-21 Thread Brian Masney
This patch ensures that all of the local variable declarations are in reverse Christmas tree order where possible to increase code readability. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 21 - 1 file changed, 8 insertions(+),

[PATCH 05/11] staging: iio: tsl2x7x: split out als and prox interrupt settings

2018-03-21 Thread Brian Masney
The struct tsl2x7x_settings contained an interrupts_en member that was a bitmask for which interrupts are enabled. This required having bitmasks in several parts of the code. This patch splits this field out into two booleans to remove most of the bitmasks in the code. This patch also fixes a bug

[PATCH 00/11] staging: iio: tsl2x7x: staging cleanups

2018-03-21 Thread Brian Masney
Here is another set of staging cleanups for the tsl2x7x driver. The driver is about ready to move out of staging. I want to test a few other things first before submitting a patch to move the driver out of staging. High-level changes in this series: - Interrupts and IIO events now work properly .

[PATCH 01/11] staging: iio: tsl2x7x: remove unnecessary code

2018-03-21 Thread Brian Masney
As a follow up to the work in commit a0722d05a195 ("staging: iio: tsl2x7x: convert mutex_trylock() to mutex_lock()"), this patch removes the unnecessary calls to tsl2x7x_get_prox() and tsl2x7x_get_lux() in tsl2x7x_event_handler(). Previously, these functions were locked with mutex_trylock(), but

[PATCH 03/11] staging: iio: tsl2x7x: no need to clear interrupt flag when getting lux

2018-03-21 Thread Brian Masney
tsl2x7x_get_lux() does not need to clear the interrupt flag when querying the ALS. The interrupt flag is cleared in tsl2x7x_event_handler(). This patches removes the unnecessary code. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 4 1 file

[PATCH 02/11] staging: iio: tsl2x7x: correct interrupt handler trigger

2018-03-21 Thread Brian Masney
tsl2x7x_event_handler() was not called as expected when the device was asserting a hardware interrupt. This patch changes the interrupt line trigger from rising to falling. The driver was tested on a TSL2772 hooked up to a Raspberry Pi 2. The interrupt pin also had a 10K pull-up resistor per the

[PATCH 07/11] staging: iio: tsl2x7x: split out als and prox persistence settings

2018-03-21 Thread Brian Masney
The struct tsl2x7x_settings contained a persistence member that contained both the ALS and proximity persistence fields. This patch splits this out into two separate fields so that the bitmasks in several parts of the code are no longer necessary. The default persistence settings are also changed

Re: [PATCH] Staging: xgifb: XGI_main_26.c: Refactored the function

2018-03-21 Thread Dan Carpenter
That looks nice. Thank you. Sorry for the headaches. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] Staging: xgifb: XGI_main_26.c: Refactored the function

2018-03-21 Thread Pratik Jain
Refactored the function `XGIfb_search_refresh_rate` by removing a level of `if...else` block nesting. Removed unnecessary parantheses. Removed potential bug of array underflow. Signed-off-by: Pratik Jain --- drivers/staging/xgifb/XGI_main_26.c | 59

Re: [PATCH] Staging: xgifb: XGI_main_26.c: Refactored the function

2018-03-21 Thread Dan Carpenter
On Tue, Mar 20, 2018 at 07:32:32PM +0530, Pratik Jain wrote: > Refactored the function `XGIfb_search_refresh_rate` by removing a level > of `if...else` block nesting. Removed unnecessary parantheses. > > Signed-off-by: Pratik Jain > --- >

Re: [PATCH 00/11] staging: wilc1000: fix for checkpatch and handled malloc memory properly

2018-03-21 Thread Ajay Singh
Hi Dan, On Wed, 21 Mar 2018 10:51:16 +0300 Dan Carpenter wrote: > These look good. I've reviewed them all. > > Reviewed-by: Dan Carpenter Thanks for reviewing all the patches. > > I had some small process complaints but it doesn't make

Re: [PATCH 00/11] staging: wilc1000: fix for checkpatch and handled malloc memory properly

2018-03-21 Thread Dan Carpenter
These look good. I've reviewed them all. Reviewed-by: Dan Carpenter I had some small process complaints but it doesn't make life easier for me if you resend them and I have to review everything twice :P regards, dan carpenter

Re: [PATCH 09/11] staging: wilc1000: remove line over 80 char in cfg_connect_result()

2018-03-21 Thread Dan Carpenter
On Tue, Mar 20, 2018 at 10:25:42PM +0530, Ajay Singh wrote: > diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c > b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c > index 1b6fe64..af1b8aa 100644 > --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c > +++

Re: [PATCH 06/11] staging: wilc1000: refactor mgmt_tx to fix line over 80 chars

2018-03-21 Thread Dan Carpenter
This would have been easier for me if it were split up slightly different again. This patch is fine. I have a couple comments for future patches which you are free to ignore if you want because it's mostly just my personal taste. On Tue, Mar 20, 2018 at 10:25:39PM +0530, Ajay Singh wrote: > +

[PATCH V2 1/2] staging: vc04_services: Remove import of bcm2835-camera from TODO

2018-03-21 Thread Stefan Wahren
The bcm2835-camera driver has already been imported. So remove it from the TODO. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt --- drivers/staging/vc04_services/interface/vchi/TODO | 5 - 1 file changed, 5 deletions(-) Changes in V2: - add

Re: [PATCH 04/11] staging: wilc1000: refactor WILC_WFI_p2p_rx() to avoid line over 80 char

2018-03-21 Thread Dan Carpenter
This one would have been easier for me to review if it were broken up slightly differently. I have a script to review when people split functions up, but there were a bunch of other stuff so my script gets confused. Anyway, looks good. regards, dan carpenter

[PATCH V2 2/2] staging: vc04_services: Add outstanding VCHI TODOs

2018-03-21 Thread Stefan Wahren
The TODO list missed some issues before we can move the driver out of staging. Signed-off-by: Stefan Wahren Reviewed-by: Eric Anholt --- drivers/staging/vc04_services/interface/vchi/TODO | 31 +++ 1 file changed, 31 insertions(+)

Re: [PATCH v3 2/2] staging: media: davinci_vpfe: add kfree() on goto err statement

2018-03-21 Thread Dan Carpenter
Looks good. Thanks! regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel