[PATCH] staging: xgifb: Fix comments style in vb_init.c

2016-02-23 Thread YU Bo
Fix comments to use trailing */ on separate lines. Signed-off-by: YU BO --- drivers/staging/xgifb/vb_init.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index

[PATCH] staging: xgifb: Fix comments style in vb_init.c

2016-02-23 Thread YU Bo
Fix comments to use trailing */ on separate lines. Signed-off-by: YU BO --- drivers/staging/xgifb/vb_init.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index 26b539b..4cb9ff4

[PATCH v3] staging/android/ion : fix a race condition in the ion driver

2016-02-23 Thread EunTaik Lee
There is a use-after-free problem in the ion driver. This is caused by a race condition in the ion_ioctl() function. A handle has ref count of 1 and two tasks on different cpus calls ION_IOC_FREE simultaneously. cpu 0 cpu 1

Re: [PATCH] Staging: comedi: mite: added spaces around | and *

2016-02-23 Thread Philippe Loctaux
On Tue, Feb 23, 2016 at 04:48:23PM +, Ian Abbott wrote: > Actually, that one looks like a false positive by the checkpatch tool. I'd > expect no space after that '*'. checkpatch has probably got confused by the > line-break before the '*'. I see, I think I'll end up resending another patch

[PATCH v2] staging: nvec: Avoid the use of BUG_ON

2016-02-23 Thread Laura Garcia Liebana
Prevent a kernel panic by avoiding the use of the BUG_ON macro. Checkpatch detected this issue. Signed-off-by: Laura Garcia Liebana --- Changes in v2: - According to Marc Dietrich, module creator, the WARN_ON macro is not needed as such cases shouldn't happen and they

RE: Time for a code audit?

2016-02-23 Thread Kershner, David A
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Tuesday, February 23, 2016 3:26 PM > To: Kershner, David A > Cc: Romer, Benjamin M ; > gre...@linuxfoundation.org;

Re: [PATCH v2 3/7] staging: unisys: cleanup goto in create_visor_device()

2016-02-23 Thread Dan Carpenter
On Tue, Feb 23, 2016 at 12:05:22PM -0500, Benjamin Romer wrote: > -away_register: > + away_unregister: > device_unregister(>device); > -away: > + > + away: > put_device(>device); These cause checkpatch.pl errors. Also "away" is too generic a name. When I see "goto away;" I

Re: Time for a code audit?

2016-02-23 Thread Dan Carpenter
On Tue, Feb 23, 2016 at 05:45:55PM +, Kershner, David A wrote: > > > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Friday, February 12, 2016 5:02 PM > > To: Romer, Benjamin M > > Cc: gre...@linuxfoundation.org;

Re: [PATCH 3/7] staging: unisys: cleanup goto in create_visor_device()

2016-02-23 Thread Dan Carpenter
On Tue, Feb 23, 2016 at 11:21:14AM -0500, Ben Romer wrote: > On Tue, 2016-02-23 at 19:16 +0300, Dan Carpenter wrote: > > When you're reviewing, you only have to care about the most recent > > allocation. After this point we need to call put_device(). After > > this > > point we need to call

RE: Time for a code audit?

2016-02-23 Thread Kershner, David A
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Friday, February 12, 2016 5:02 PM > To: Romer, Benjamin M > Cc: gre...@linuxfoundation.org; driverdev-devel@linuxdriverproject.org; > Sell, Timothy C

[PATCH v3 3/7] staging: unisys: cleanup rc -1 in create_visor_device()

2016-02-23 Thread Benjamin Romer
Get rid of the rc = -1 initialization. Return a meaningful error on failure in the function, or, the rc from a called function if it fails. Signed-off-by: Benjamin Romer --- v2: Put the goto back in. v3: sent the wrong version of the patch by mistake. ---

Re: [PATCH v2 3/7] staging: unisys: cleanup goto in create_visor_device()

2016-02-23 Thread Ben Romer
disregard this patch, I sent the wrong file. v3 coming. -- Ben ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH v2 3/7] staging: unisys: cleanup goto in create_visor_device()

2016-02-23 Thread Benjamin Romer
Get rid of the rc = -1 initialization. Return a meaningful error on failure in the function, or, the rc from a called function if it fails. Signed-off-by: Benjamin Romer --- v2: Put the goto back in. --- drivers/staging/unisys/visorbus/visorbus_main.c | 10

[PATCH 6/6] staging: lustre: update format for lnet_lib_init/exit comment

2016-02-23 Thread James Simmons
From: Andreas Dilger The documentation about the return values for lnet_lib_init and lnet_lib_exit was in the old style format. Bring it in sync with the rest of the LNet core. Broken out of patch 16787. Signed-off-by: Andreas Dilger

[PATCH 4/6] staging: lustre: update the MODULE_DESCRIPTION for all lustre modules

2016-02-23 Thread James Simmons
From: Andreas Dilger Fixup the MODULE_DESCRIPTION for several lustre modules. Some wrongly place the version in the string or they are not descriptive enough. Broken out of patch http://review.whamcloud.com/16787. Signed-off-by: Andreas Dilger

[PATCH 5/6] staging: lustre: make module_init/exit naming consistent

2016-02-23 Thread James Simmons
From: Andreas Dilger Make the name of the module_init()/_exit() functions consistently {module_name}_init and {module_name}_exit. Signed-off-by: Andreas Dilger Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6204 Reviewed-on:

[PATCH 2/6] staging: lustre: add missing MODULE_AUTHOR for LNet selftest module

2016-02-23 Thread James Simmons
From: Andreas Dilger For LNet selftest module the MODULE_AUTHOR was missing. Add proper OpenSFS authorship. Broken out of patch http://review.whamcloud.com/16787. Signed-off-by: Andreas Dilger Intel-bug-id:

[PATCH 3/6] staging: lustre: update the MODULE_VERSION for all lustre modules

2016-02-23 Thread James Simmons
For several lustre modules the MODULE_VERSION has the wrong value, located in the wrong place in the source code, or completely missing. This patch brings it up to date. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6204 Reviewed-on:

Re: [PATCH] Staging: comedi: mite: added spaces around | and *

2016-02-23 Thread Ian Abbott
On 22/02/16 23:38, Philippe Loctaux wrote: Added spaces around | and *, fixing 2 checkpatch checks. Signed-off-by: Philippe Loctaux --- drivers/staging/comedi/drivers/mite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) [snip] @@ -216,7 +216,7 @@

[PATCH 0/6] staging: lustre: update modinfo data

2016-02-23 Thread James Simmons
The module information for Lustre is stale or in some cases completely missing. This collection of patches brings the modinfo up to date as well as filling in any missing information. Andreas Dilger (4): staging: lustre: add missing MODULE_AUTHOR for LNet selftest module staging: lustre:

[PATCH 1/6] staging: lustre: move module info to end of libcfs module.c file

2016-02-23 Thread James Simmons
Move the MODULE_* field in module.c that belongs to libcfs to the end of the file like it is done for other kernel drivers. Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/libcfs/module.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-)

Re: [PATCH] Staging: comedi: mite: added spaces around | and *

2016-02-23 Thread Ian Abbott
On 23/02/16 12:38, Philippe Loctaux wrote: On Tue, Feb 23, 2016 at 11:07:15AM +, Ian Abbott wrote: Even better: just remove the macro, as it isn't used. How can I do that? I'm asking that because my C knowledge isn't very good :P Are you sure you should be writing kernel patches in that

Re: [PATCH 3/7] staging: unisys: cleanup goto in create_visor_device()

2016-02-23 Thread Ben Romer
On Tue, 2016-02-23 at 19:16 +0300, Dan Carpenter wrote: > When you're reviewing, you only have to care about the most recent > allocation. After this point we need to call put_device(). After > this > point we need to call unregister. The "goto unregister" is pretty > obvious what it does so it

Re: [PATCH 3/7] staging: unisys: cleanup goto in create_visor_device()

2016-02-23 Thread Dan Carpenter
On Tue, Feb 23, 2016 at 10:01:51AM -0500, Benjamin Romer wrote: > Get rid of the rc = -1 initialization, and remove the goto > mess entirely. Return a meaningful error on failure in the function, or > the rc from a called function if it fails. > > Signed-off-by: Benjamin Romer

[PATCH 5/7] staging: unisys: remove pointless init of rc in chipset_device_create()

2016-02-23 Thread Benjamin Romer
The value of rc is set by calling a function, so there's no need to initialize it to -1, or anything at all. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/7] staging: unisys: cleanup goto in create_visor_device()

2016-02-23 Thread Benjamin Romer
Get rid of the rc = -1 initialization, and remove the goto mess entirely. Return a meaningful error on failure in the function, or the rc from a called function if it fails. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/visorbus_main.c | 18

[PATCH 1/7] staging: unisys: fix return value for visorbus pci probe

2016-02-23 Thread Benjamin Romer
Instead of returning -1, return -ENODEV when there is no probe function found for the device. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 7/7] staging: unisys: return meaningful error for visorchipset_init()

2016-02-23 Thread Benjamin Romer
The other error paths return meaningful error codes, except for the one when registering a device, which just returned -1. Let's return ENODEV when it fails to register instead. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 1

[PATCH 0/7] staging: unisys: goto/rc = -1 cleanup series

2016-02-23 Thread Benjamin Romer
This series cleans up all the places where rc = -1 was being done, either as initialization, or to return an error value. In some places, it can just be removed, but other places it was better to cleaning up goto statements and eliminate the -1 at the same time. Benjamin Romer (7): staging:

[PATCH 2/7] staging: unisys: remove goto in get_vbus_header_info

2016-02-23 Thread Benjamin Romer
Remove the rc, the = -1, and all the goto mess here and just return directly with a meaningful error number. The caller only cares about success/failure right now, that needs to be addressed in a later patch series. Signed-off-by: Benjamin Romer ---

[PATCH 6/7] staging: unisys: clean up initiate_chipset_device_pause_resume()

2016-02-23 Thread Benjamin Romer
Simplify this function by removing the goto in favor of handling errors immediately. Eliminate the vaguely-named variable x, and remove the unneeded initialization of rc. Lastly, provide meaningful error values to the callback function instead of just passing back a -1 for failure. Signed-off-by:

[PATCH 4/7] staging: unisys: get rid of goto in create_bus_instance()

2016-02-23 Thread Benjamin Romer
Remove the unnecessary rc and goto messiness, and just handle freeing the memory before returning an error in the one place where that needs to happen. Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/visorbus_main.c | 16 1 file

Re: [PATCH] Staging: comedi: mite: added spaces around | and *

2016-02-23 Thread Philippe Loctaux
On Tue, Feb 23, 2016 at 11:07:15AM +, Ian Abbott wrote: > Even better: just remove the macro, as it isn't used. How can I do that? I'm asking that because my C knowledge isn't very good :P -- Philippe Loctaux p...@philippeloctaux.com ___ devel

Re: [PATCH] Staging: comedi: contec_pci_dio: fixed comment blocks coding style issues

2016-02-23 Thread Philippe Loctaux
On Tue, Feb 23, 2016 at 10:58:03AM +, Ian Abbott wrote: > Thanks! Sweet! Does that means my patch is accepted and maybe will be applied? :) -- Philippe Loctaux p...@philippeloctaux.com ___ devel mailing list de...@linuxdriverproject.org

[PATCH 2/2] staging: wilc1000: Revert "staging: wilc1000: remove spaces around '->'"

2016-02-23 Thread Leo Kim
This reverts commit 6c2ab2398b88 ("staging: wilc1000: remove spaces around '->'"). It had applied from a incorrectly commit a1b56a4c5054 ("staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages"). Signed-off-by: Leo Kim ---

[PATCH 1/2] staging: wilc1000: removes unnecessary retry 3 times

2016-02-23 Thread Leo Kim
This patch removes unnecessary retry 3 times and related variable. Actually the retry 3 times sentence, don't retry at all. Repeats conditions are that until read a chip-id and written a register. Signed-off-by: Leo Kim --- drivers/staging/wilc1000/wilc_wlan.c | 7 +++ 1

Re: Re: [PATCH v2] staging/android/ion : fix a race condition in the ion driver

2016-02-23 Thread EunTaik Lee
> From: Laura Abbott [mailto:labb...@redhat.com] > Sent: Saturday, February 20, 2016 5:09 AM > To: eun.taik@samsung.com; gre...@linuxfoundation.org; a...@android.com; > riandr...@android.com; sumit.sem...@linaro.org; dan.carpen...@oracle.com; > Rohit Kumar ;

Re: [PATCH] Staging: comedi: mite: added spaces around | and *

2016-02-23 Thread Ian Abbott
On 23/02/16 00:37, Joe Perches wrote: On Tue, 2016-02-23 at 00:38 +0100, Philippe Loctaux wrote: Added spaces around | and *, fixing 2 checkpatch checks. [] diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging/comedi/drivers/mite.c [] @@ -51,7 +51,7 @@ #include "mite.h"

Re: [PATCH] Staging: comedi: contec_pci_dio: fixed comment blocks coding style issues

2016-02-23 Thread Ian Abbott
On 22/02/16 23:47, Philippe Loctaux wrote: Makes the comment blocks start with /* on separate lines, and end with */ on separate lines as well, starting with * for each comment lines. Signed-off-by: Philippe Loctaux ---