Re: [PATCH 1/6] Revert staging: board: disable as it breaks the build

2015-04-05 Thread Simon Horman
On Fri, Apr 03, 2015 at 02:41:58PM +0200, Geert Uytterhoeven wrote: This reverts commit d13778d537a0ed6115d2a79a942af999cfb8eec6. Commit 13c11072536f2613 (staging:board: remove unnecessary function) fixed the build of drivers/staging/board/board.c. Signed-off-by: Geert Uytterhoeven

Re: [PATCH 1/2] staging: dgnc: remove dead code in dgnc_tty_write()

2015-04-05 Thread Giedrius Statkevičius
Forgot to put v2 in the title. Should I resend? Sorry for the confusion. Still making some patch submitting mistakes from time to time. :( On Mon, 6 Apr 2015, Giedrius Statkevicius wrote: Remove the dead code protected by in_user in dgnc_tty_write() because it is set to 0 and never changed

[PATCH 2/3] staging: dgnc: remove redundant check

2015-04-05 Thread Giedrius Statkevicius
count doesn't change between the last check a few lines before so remove this redundant check Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com --- drivers/staging/dgnc/dgnc_tty.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c

[PATCH 3/3] staging: dgnc: improve the coding style in unlocking part of dgnc_tty_write()

2015-04-05 Thread Giedrius Statkevicius
do if (blah) foo(); bar(); instead of if (blah) { foo(); bar(); } else { bar(); } Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com --- drivers/staging/dgnc/dgnc_tty.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git

[PATCH 1/3] staging: dgnc: use a real mutex instead of masquerading a semaphore as a mutex

2015-04-05 Thread Giedrius Statkevicius
A mutex should be used here (and it's name even says that) so remove the hiding of a semaphore behind a #define and use a real mutex that the kernel provides. Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com --- drivers/staging/dgnc/dgnc_tty.c | 12 1 file

[PATCH 1/2] staging: dgnc: remove dead code in dgnc_tty_write()

2015-04-05 Thread Giedrius Statkevicius
Remove the dead code protected by in_user in dgnc_tty_write() because it is set to 0 and never changed to 1 thus the code in ifs never gets executed. Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com --- v2: Just remove the dead code protected by in_user and join the first and

[PATCH 2/2] staging: dgnc: remove redundant check

2015-04-05 Thread Giedrius Statkevicius
count doesn't get changed in between identical checks in dgnc_tty_write() so remove the second check Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com --- v2: no change drivers/staging/dgnc/dgnc_tty.c | 6 -- 1 file changed, 6 deletions(-) diff --git

[PATCH 15/16] staging: lustre: lnet: lnet: fix error return code

2015-04-05 Thread Julia Lawall
Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @@ identifier ret; expression e1,e2; @@ ( if (\(ret 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when !=

[PATCH 0/16] fix error return code

2015-04-05 Thread Julia Lawall
The complate semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @ok exists@ identifier f,ret,i; expression e; constant c; @@ // identify a function that returns a negative return value at least once. f(...) { ... when any ( return -c@i; | ret = -c@i; ...

Re: [PATCH/RFC 5/6] staging: board: Add support for devices with complex dependencies

2015-04-05 Thread Geert Uytterhoeven
Hi Russell, On Fri, Apr 3, 2015 at 7:04 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Fri, Apr 03, 2015 at 03:57:27PM +0300, Dan Carpenter wrote: On Fri, Apr 03, 2015 at 02:42:02PM +0200, Geert Uytterhoeven wrote: +int __init board_staging_register_clock(const struct

Re: [PATCH/RFC 5/6] staging: board: Add support for devices with complex dependencies

2015-04-05 Thread Geert Uytterhoeven
Hi Laurent, On Sat, Apr 4, 2015 at 2:46 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: + for (i = 0; i dev-ngpios; i++) + gpio_request_one(dev-gpios[i].gpio, dev-gpios[i].flags, + pdev-name); Aren't GPIO numbers dynamic too in

[PATCH] staging: lustre: fix sparse warning

2015-04-05 Thread Tal Shorer
Sparse reports: drivers/staging/lustre/lustre/obdclass/obd_mount.c:1284:6: warning: symbol 'lustre_kill_super' was not declared. Should it be static? Fix this warning by making lustre_kill_super static. It is not used outside this file. Signed-off-by: Tal Shorer tal.sho...@gmail.com ---

Re: [PATCH/RFC 5/6] staging: board: Add support for devices with complex dependencies

2015-04-05 Thread Laurent Pinchart
Hi Geert, On Sunday 05 April 2015 11:00:56 Geert Uytterhoeven wrote: On Sat, Apr 4, 2015 at 2:46 PM, Laurent Pinchart wrote: + for (i = 0; i dev-ngpios; i++) + gpio_request_one(dev-gpios[i].gpio, dev-gpios[i].flags, + pdev-name); Aren't