Re: [PATCH] staging: i2o: Remove unwanted semicolon

2015-05-01 Thread Dan Carpenter
On Thu, Apr 30, 2015 at 10:05:00PM +0530, hari prasath wrote: > >>> Greg I am not sure if this needs to go into next release. I send this > >>> patch as checkpatch was complaining about it. May be the owners of this > >>> driver can only decide >>> upon it. Alan cox also mentioned the same > >>

Re: [PATCH] staging: i2o: Remove unwanted semicolon

2015-05-01 Thread Dan Carpenter
On Fri, May 01, 2015 at 10:18:14AM +0300, Dan Carpenter wrote: > On Thu, Apr 30, 2015 at 10:05:00PM +0530, hari prasath wrote: > > >>> Greg I am not sure if this needs to go into next release. I send this > > >>> patch as checkpatch was complaining about it. May be the owners of this > > >>> driv

Re: [PATCH] staging: i2o: Remove unwanted semicolon

2015-05-01 Thread gre...@linuxfoundation.org
On Thu, Apr 30, 2015 at 11:25:48PM +0100, One Thousand Gnomes wrote: > On Thu, 30 Apr 2015 16:14:06 +0200 > "gre...@linuxfoundation.org" wrote: > > > On Thu, Apr 23, 2015 at 04:09:28PM +0100, Alan Cox wrote: > > > On Thu, 2015-04-23 at 13:43 +, Gujulan Elango, Hari Prasath (H.) > > > wrote: >

Re: [PATCH] staging: rtl8192e: fix wrong assignment

2015-05-01 Thread Dan Carpenter
The subject says "fix" but this does not fix a run time bug, it just silences a warning. It's still the correct thing according to Larry so that's good. On Thu, Apr 30, 2015 at 12:06:28PM +, Gujulan Elango, Hari Prasath (H.) wrote: > This patch addresses a spatch warning on assigning a negat

Re: [PATCH] staging: i2o: Remove unwanted semicolon

2015-05-01 Thread Alan Cox
On Fri, 2015-05-01 at 09:41 +0200, gre...@linuxfoundation.org wrote: > On Thu, Apr 30, 2015 at 11:25:48PM +0100, One Thousand Gnomes wrote: > > On Thu, 30 Apr 2015 16:14:06 +0200 > > "gre...@linuxfoundation.org" wrote: > > > > > On Thu, Apr 23, 2015 at 04:09:28PM +0100, Alan Cox wrote: > > > > On

Re: [PATCH] staging: i2o: Remove unwanted semicolon

2015-05-01 Thread gre...@linuxfoundation.org
On Fri, May 01, 2015 at 10:28:00AM +0100, Alan Cox wrote: > On Fri, 2015-05-01 at 09:41 +0200, gre...@linuxfoundation.org wrote: > > On Thu, Apr 30, 2015 at 11:25:48PM +0100, One Thousand Gnomes wrote: > > > On Thu, 30 Apr 2015 16:14:06 +0200 > > > "gre...@linuxfoundation.org" wrote: > > > > > >

[PATCH] staging: iio: ad7606_par: Constify platform_device_id

2015-05-01 Thread Krzysztof Kozlowski
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski --- drivers/staging/iio/adc/ad7606_par.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7606_par.c b/drivers/staging/iio/adc/ad7606_p

[PATCH] staging: media: omap4iss: Constify platform_device_id

2015-05-01 Thread Krzysztof Kozlowski
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski --- drivers/staging/media/omap4iss/iss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/i

[PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 11/11] staging: lustre: ptlrpc: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 0/11] Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. The complete semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,e1,e2; @@ - OBD_ALLOC(ptr,sizeof e1 * e2) + p

[PATCH 8/11] staging: lustre: obdclass: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 4/11] staging: lustre: ldlm: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 5/11] staging: lustre: lmv: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 6/11] staging: lustre: mdc: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 10/11] staging: lustre: osc: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 1/11] staging: lustre: fid: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 7/11] staging: lustre: mgc: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 3/11] staging: lustre: lclient: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH 9/11] staging: lustre: obdecho: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
From: Julia Lawall Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,size; @@ -

[PATCH V2 1/1] scsi: storvsc: Set the SRB flags correctly when no data transfer is needed

2015-05-01 Thread K. Y. Srinivasan
Set the SRB flags correctly when there is no data transfer. Without this change some IHV drivers will fail valid commands such as TEST_UNIT_READY. Cc: Signed-off-by: K. Y. Srinivasan Reviewed-by: Long Li --- V2: Added additional details to the commit log - Dan Carpenter drivers/scsi/

[PATCH 2/8] staging: comedi: mite.h: remove PCIMIO_COMPAT

2015-05-01 Thread Ian Abbott
The macro `PCIMIO_COMPAT` is defined, but never used. Remove it. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/mite.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/mite.h b/drivers/staging/comedi/drivers/mite.h index cf45f88..620de2e 100644

[PATCH 1/8] staging: comedi: mite: move #include

2015-05-01 Thread Ian Abbott
The Comedi driver modules build fine if the inclusion of is removed from "mite.h", so remove it. However, since "mite.c" calls `kzalloc()`, include there. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/mite.c | 1 + drivers/staging/comedi/drivers/mite.h | 1 - 2 files changed, 1

[PATCH 0/8] staging: comedi: mite: some clean-ups

2015-05-01 Thread Ian Abbott
1) staging: comedi: mite: move #include 2) staging: comedi: mite.h: remove PCIMIO_COMPAT 3) staging: comedi: mite.c: remove commented out USE_KMALLOC 4) staging: comedi: mite.h: remove "../comedi_pci.h" and make self-reliant 5) staging: comedi: mite.h: reformat some comments 6) staging: comedi:

[PATCH 7/8] staging: comedi: mite.h: whitespace changes in function declarations

2015-05-01 Thread Ian Abbott
Reformat some function declarations to avoid bunching up near column 80. Also add a blank line after a `struct` definition. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/mite.h | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/staging

[PATCH 6/8] staging: comedi: mite.c: reformat comments

2015-05-01 Thread Ian Abbott
Use the usual style for block comments. Squash double spaces after comment opening sequences. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/mite.c | 105 +- 1 file changed, 54 insertions(+), 51 deletions(-) diff --git a/drivers/staging/comedi/driv

[PATCH 8/8] staging: comedi: mite: use a better MODULE_DESCRIPTION()

2015-05-01 Thread Ian Abbott
Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/mite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging/comedi/drivers/mite.c index b514ad1..fa7ae2c 100644 --- a/drivers/staging/comedi/drivers/mite.c +++ b/dr

[PATCH 4/8] staging: comedi: mite.h: remove "../comedi_pci.h" and make self-reliant

2015-05-01 Thread Ian Abbott
"mite.h" relies on a lot of things declared including "../comedi_pci.h", but doesn't need anything in "../comedi_pci.h" itself. None of the Comedi modules that include "mite.h" rely on it to include "../comedi_pci.h" on their behalf. Remove the inclusion of "../comedi_pci.h" from "mite.h", and ad

[PATCH 3/8] staging: comedi: mite.c: remove commented out USE_KMALLOC

2015-05-01 Thread Ian Abbott
The definition of the macro `USE_KMALLOC` is commented out, and nothing refers to it. Remove the commented out macro. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/mite.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging

[PATCH 5/8] staging: comedi: mite.h: reformat some comments

2015-05-01 Thread Ian Abbott
Use the usual style for block comments. Squash double spaces after comment opening sequences. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/mite.h | 59 ++- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/drivers/staging/comedi/driv

RE: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
On Fri, 1 May 2015, Simmons, James A. wrote: > >From: Julia Lawall > > > >Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by > >kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. > > Nak: James Simmons > > A simple replace will not work. The OBD_ALLOC and OBD_FREE

RE: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Simmons, James A.
>From: Julia Lawall > >Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by >kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. Nak: James Simmons A simple replace will not work. The OBD_ALLOC and OBD_FREE functions allocate memory anywhere from one page to 4MB in s

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Greg Kroah-Hartman
On Fri, May 01, 2015 at 05:38:49PM +, Simmons, James A. wrote: > >From: Julia Lawall > > > >Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by > >kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. > > Nak: James Simmons > > A simple replace will not work. The O

Re: [PATCH 8/11] staging: lustre: obdclass: Use kzalloc and kfree

2015-05-01 Thread walter harms
hi Julia, your patch seems fine. I tried to understand the code and it seems that much of it can be simplified by using already available functions. I have added some comments but i am not sure what to make of it. re, wh Am 01.05.2015 17:51, schrieb Julia Lawall: > From: Julia Lawall > > Repl

Re: [PATCH 8/11] staging: lustre: obdclass: Use kzalloc and kfree

2015-05-01 Thread Julia Lawall
On Fri, 1 May 2015, walter harms wrote: > hi Julia, > your patch seems fine. > I tried to understand the code and it seems that much of it > can be simplified by using already available functions. > I have added some comments but i am not sure what to make of it. Thanks for the review. Comments

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Drokin, Oleg
Hello! On May 1, 2015, at 1:48 PM, Julia Lawall wrote: >>> From: Julia Lawall >>> >>> Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by >>> kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. >> >> Nak: James Simmons >> >> A simple replace will not work. The OBD_

Re: [PATCH] staging: i2o: Remove unwanted semicolon

2015-05-01 Thread Alan Cox
> > Possibly but that ought to go via staging and really is one for the SCSI > > folks to call. The dpt_i2o was a bit more common than i2o proper. > > But if the staging i2o core is removed, doesn't that mean that this > driver will stop working? It uses code in uapi i2o.h, which I'm > guessing i

[RFC PATCH 03/11] MIPS: OCTEON: make __cvmx_helper_sgmii/xaui_probe void

2015-05-01 Thread Aaro Koskinen
Make __cvmx_helper_sgmii/xaui_probe void, nobody is using return values and this makes functions independent of enumeration functions. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c | 5 + arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c | 5 +

[RFC PATCH 01/11] MIPS: OCTEON: cvmx-helper: use function to access interface_port_count

2015-05-01 Thread Aaro Koskinen
Use function to access interface_port_count. This allows moving functions requiring the info to different files. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/cvmx-helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/cavium-octeon/execut

[RFC PATCH 05/11] MIPS: OCTEON: delete calls to __cvmx_helper_npi/rgmii_probe

2015-05-01 Thread Aaro Koskinen
These calls have no side effects so drop the calls, so that we don't need to export these functions to modules. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/cvmx-helper-ethernet.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/mips/cavium-octeon/executive/cvmx-he

[RFC PATCH 00/11] MIPS: OCTEON: move all octeon-ethernet code to staging

2015-05-01 Thread Aaro Koskinen
Hi, In order to octeon-ethernet staging work to proceed, we should have all the code in the same tree (staging). Currently, most of the driver code actually lives in the MIPS tree in the "cvmx" helper or OS abstraction routines and include files. Majority of this code needs refactoring (or deletio

[RFC PATCH 07/11] MIPS: OCTEON: make all interface enumeration helpers static

2015-05-01 Thread Aaro Koskinen
Make all interface enumeration helpers static. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/cvmx-helper.c | 10 +- arch/mips/include/asm/octeon/cvmx-helper-npi.h | 11 --- arch/mips/include/asm/octeon/cvmx-helper-rgmii.h | 9 - arch/mips/include/

[RFC PATCH 04/11] MIPS: OCTEON: move interface enumeration helpers to cvmx-helper

2015-05-01 Thread Aaro Koskinen
Move interface enumeration helpers to cvmx-helper. Signed-off-by: Aaro Koskinen --- .../mips/cavium-octeon/executive/cvmx-helper-npi.c | 38 --- .../cavium-octeon/executive/cvmx-helper-rgmii.c| 46 .../cavium-octeon/executive/cvmx-helper-sgmii.c| 4 - .../mips/cavium-oct

[RFC PATCH 10/11] MIPS: OCTEON: ethernet: delete unneeded symbol exports

2015-05-01 Thread Aaro Koskinen
Delete unneeded symbol exports. Signed-off-by: Aaro Koskinen --- drivers/staging/octeon/cvmx-cmd-queue.c | 1 - drivers/staging/octeon/cvmx-helper-ethernet.c | 5 - drivers/staging/octeon/cvmx-helper-util.c | 4 drivers/staging/octeon/cvmx-pko.c | 2 -- drivers/sta

[RFC PATCH 02/11] MIPS: OCTEON: move ethernet-specific helpers into a separate file

2015-05-01 Thread Aaro Koskinen
Move ethernet-specific helpers into a separate file. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/Makefile | 1 + .../cavium-octeon/executive/cvmx-helper-ethernet.c | 912 arch/mips/cavium-octeon/executive/cvmx-helper.c| 915 +-

[RFC PATCH 08/11] MIPS: OCTEON: move the link helpers into a separate file

2015-05-01 Thread Aaro Koskinen
Move the link helpers into a separate file. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/Makefile | 2 +- .../cavium-octeon/executive/cvmx-helper-board.c| 511 arch/mips/cavium-octeon/executive/cvmx-link.c | 534 +

[RFC PATCH 06/11] MIPS: OCTEON: rename __cvmx_helper_npi/rgmii_probe

2015-05-01 Thread Aaro Koskinen
Rename __cvmx_helper_npi/rgmii_probe to __cvmx_helper_npi/rgmii_enumerate as only latter are used. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/cvmx-helper.c | 12 ++-- arch/mips/include/asm/octeon/cvmx-helper-npi.h | 7 +++ arch/mips/include/asm/octeon/cvmx

[RFC PATCH 09/11] MIPS: OCTEON: move ethernet-specific helpers to staging

2015-05-01 Thread Aaro Koskinen
Move all ethernet-specific helpers to staging. Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/Makefile| 8 +--- arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 1 + arch/mips/cavium-octeon/executive/cvmx-helper.c | 1 + drivers/sta

[RFC PATCH 11/11] MIPS: OCTEON: move all ethernet-specific headers to staging

2015-05-01 Thread Aaro Koskinen
Move all ethernet-specific headers to staging. Signed-off-by: Aaro Koskinen --- arch/mips/include/asm/octeon/cvmx-helper-board.h | 70 --- arch/mips/include/asm/octeon/cvmx-helper.h | 124 .../asm => drivers/staging}/octeon/cvmx-address.h | 0 .../staging}/octeon/c

[PATCH 8/20] staging: lustre: llite: statahead: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/llite/statahead.c |3

[PATCH 12/20] staging: lustre: obdclass: genops: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/obdclass/genops.c | 15

[PATCH 11/20] staging: lustre: mdc: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/mdc/mdc_request.c |

[PATCH 1/20] staging: lustre: ldlm: ldlm_lib: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c |3 +

[PATCH 16/20] staging: lustre: obdecho: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/obdecho/echo_client.c |

[PATCH 10/20] staging: lustre: lov: lov_dev: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/lov/lov_dev.c |3 +--

[PATCH 0/20] remove unneeded null test before free

2015-05-01 Thread Julia Lawall
These patches are motivated by the preceding patch series that converts uses of OBD_FREE and OBD_FREE_PTR to kfree. These patches should thus be applied after that previous patch series (subject: Use kzalloc and kfree). ___ devel mailing list de...@linu

[PATCH 17/20] Staging: lustre: osc: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/osc/osc_request.c |3

[PATCH 19/20] staging: lustre: ptlrpc: sec_plain: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c |

[PATCH 18/20] Staging: lustre: ptlrpc: lproc_ptlrpc: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // In the first case, the only cleanup needed is the unlock, so jump to that directly. Like

[PATCH 9/20] staging: lustre: lmv: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/lmv/lmv_obd.c |6 ++-

[PATCH 15/20] staging: lustre: obdclass: obd_mount: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); @@ expression ptr; @@ - if (ptr != NULL) { kfree(ptr); ptr = NULL; - } // Signed-off-b

[PATCH 14/20] staging: lustre: obdclass: obd_config: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that identifies this issue is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // The first part of the patch introduces new labels to avoid unnecessary calls to kfree

[PATCH 3/20] staging: lustre: ldlm: ldlm_resource: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) { kfree(ptr); ptr = NULL; - } // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/ldlm

[PATCH 5/20] Staging: lustre: llite: dir: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // This patch additionally simplifies one case where the free, and thus the jump to the end

[PATCH 20/20] staging: lustre: ptlrpc: service: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); @@ expression ptr; @@ - if (ptr != NULL) { kfree(ptr); ptr = NULL; - } // In the first

[PATCH 6/20] Staging: lustre: llite: file: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that finds this issue is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // In the first case, llss can never be null at the point of the kfree anyway. In the second

[PATCH 4/20] staging: lustre: libcfs: linux: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) { kfree(ptr); ptr = NULL; - } // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/libc

[PATCH 13/20] staging: lustre: obdclass: llog: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/obdclass/llog.c |3 +

[PATCH 7/20] Staging: lustre: llite: llite_lib: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/llite/llite_lib.c | 12

[PATCH 2/20] staging: lustre: ldlm: ldlm_lock: remove unneeded null test before free

2015-05-01 Thread Julia Lawall
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall --- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c |3

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Dan Carpenter
We are hopefully going to get rid of OBD_ALLOC_LARGE() as well, though. It's simple enough to write a function: void *obd_zalloc(size_t size) { if (size > 4 * PAGE_CACHE_SIZE) return vzalloc(size); else return kmalloc(size, GFP_NOFS); } Except, huh

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Drokin, Oleg
On May 1, 2015, at 4:02 PM, Dan Carpenter wrote: > We are hopefully going to get rid of OBD_ALLOC_LARGE() as well, though. > > It's simple enough to write a function: > > void *obd_zalloc(size_t size) > { > if (size > 4 * PAGE_CACHE_SIZE) > return vzalloc(size); > else

RE: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Simmons, James A.
>> >From: Julia Lawall >> > >> >Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by >> >kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. >> >> Nak: James Simmons >> >> A simple replace will not work. The OBD_ALLOC and OBD_FREE functions >> allocate memory >> anyw

RE: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Simmons, James A.
>We are hopefully going to get rid of OBD_ALLOC_LARGE() as well, though. > >It's simple enough to write a function: > >void *obd_zalloc(size_t size) >{ > if (size > 4 * PAGE_CACHE_SIZE) > return vzalloc(size); > else > return kmalloc(size, GFP_NOFS); >} > >Ex

RE: [PATCH 0/8] staging: comedi: mite: some clean-ups

2015-05-01 Thread Hartley Sweeten
On Friday, May 01, 2015 10:04 AM, Ian Abbott wrote: > 1) staging: comedi: mite: move #include > 2) staging: comedi: mite.h: remove PCIMIO_COMPAT > 3) staging: comedi: mite.c: remove commented out USE_KMALLOC > 4) staging: comedi: mite.h: remove "../comedi_pci.h" and make >self-reliant > 5) sta

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Greg Kroah-Hartman
On Fri, May 01, 2015 at 08:18:56PM +, Simmons, James A. wrote: > >> >From: Julia Lawall > >> > > >> >Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT > >> >by > >> >kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree. > >> > >> Nak: James Simmons > >> > >> A simp

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Drokin, Oleg
On May 1, 2015, at 4:18 PM, Simmons, James A. wrote: > Yes the LARGE functions do the switching. I was expecting also patches to > remove the > OBD_ALLOC_LARGE functions as well which is not the case here. I do have one > question still. The > macro __OBD_MALLOC_VERBOSE allowed the ability to

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Greg Kroah-Hartman
On Fri, May 01, 2015 at 08:36:05PM +, Simmons, James A. wrote: > >We are hopefully going to get rid of OBD_ALLOC_LARGE() as well, though. > > > >It's simple enough to write a function: > > > >void *obd_zalloc(size_t size) > >{ > > if (size > 4 * PAGE_CACHE_SIZE) > > return vzall

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Drokin, Oleg
On May 1, 2015, at 4:49 PM, Greg Kroah-Hartman wrote: > On Fri, May 01, 2015 at 08:36:05PM +, Simmons, James A. wrote: >>> We are hopefully going to get rid of OBD_ALLOC_LARGE() as well, though. >>> >>> It's simple enough to write a function: >>> >>> void *obd_zalloc(size_t size) >>> { >>>

Re: [RFC PATCH 00/11] MIPS: OCTEON: move all octeon-ethernet code to staging

2015-05-01 Thread Greg Kroah-Hartman
On Fri, May 01, 2015 at 10:37:02PM +0300, Aaro Koskinen wrote: > Hi, > > In order to octeon-ethernet staging work to proceed, we should have all > the code in the same tree (staging). Currently, most of the driver code > actually lives in the MIPS tree in the "cvmx" helper or OS abstraction > rout

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Greg Kroah-Hartman
On Fri, May 01, 2015 at 08:52:37PM +, Drokin, Oleg wrote: > > On May 1, 2015, at 4:49 PM, Greg Kroah-Hartman wrote: > > > On Fri, May 01, 2015 at 08:36:05PM +, Simmons, James A. wrote: > >>> We are hopefully going to get rid of OBD_ALLOC_LARGE() as well, though. > >>> > >>> It's simple e

[PATCH] staging: rtl8192u: don't redefine container_of()

2015-05-01 Thread Marti Bolivar
This file already includes . Signed-off-by: Marti Bolivar --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h inde

Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

2015-05-01 Thread Drokin, Oleg
On May 1, 2015, at 4:58 PM, Greg Kroah-Hartman wrote: > On Fri, May 01, 2015 at 08:52:37PM +, Drokin, Oleg wrote: >> >> On May 1, 2015, at 4:49 PM, Greg Kroah-Hartman wrote: >> >>> On Fri, May 01, 2015 at 08:36:05PM +, Simmons, James A. wrote: > We are hopefully going to get rid of

[PATCH 004/107] staging: comedi: ni_mio_common: open code the M-Series GPCT register offsets

2015-05-01 Thread H Hartley Sweeten
Remove the enum m_series_register_offsets values that are only used in the lookup tables for the GPCT to STC register mapping and just open code the values. Having the extra level of indirection does not add any additional clarity and it gets rid of some of the CamelCase symbols. Signed-off-by: H

[PATCH 002/107] staging: comedi: ni_mio_common: open code the M-Series regmap offsets

2015-05-01 Thread H Hartley Sweeten
Remove the enum m_series_register_offsets values that are only used in the lookup tables for the STC to M-Series register mapping and just open code the values. Having the extra level of indirection does not add any additional clarity and it gets rid of some of the CamelCase symbols. Some of the r

[PATCH 013/107] staging: comedi: ni_stc.h: tidy up NI_M_PLL_STATUS_REG bits

2015-05-01 Thread H Hartley Sweeten
Rename the CamelCase and convert the enum into defines. Use the BIT() macro to define the bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- drivers/staging/comedi/drivers/ni_stc.h| 5 + 2 files ch

[PATCH 012/107] staging: comedi: ni_stc.h: tidy up NI_M_PLL_CTRL_REG bits

2015-05-01 Thread H Hartley Sweeten
Rename the CamelCase and convert the enum into defines. Use the BIT() macro to define the bits. Convert the inline functions MSeries_PLL_Divisor_Bits() and MSeries_PLL_Multiplier_Bits() to macros. The helper function ni_mseries_get_pll_parameters() always returns valid values for the 'divisor' and

[PATCH 011/107] staging: comedi: ni_stc.h: tidy up NI_M_CLK_FOUT2_REG bits

2015-05-01 Thread H Hartley Sweeten
Rename the CamelCase and convert the enum into defines. Use the BIT() macro to define the bits. Convert the inline function MSeries_PLL_In_Source_Select_RTSI_Bits() to a macro. The caller always passes valid values for 'RTIS_channel' so the sanity checking can safely be removed. Tidy up ni_mserie

[PATCH 048/107] staging: comedi: ni_stc.h: remove unreachable code in RTSI_Output_Bit()

2015-05-01 Thread H Hartley Sweeten
All the callers of this function check the 'channel' number with num_configurable_rtsi_channels(). This check can never occure. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_stc.h | 4 1 file changed, 4 deletions(-)

[PATCH 014/107] staging: comedi: ni_stc.h: tidy up NI_M_AI_CFG_BYPASS_FIFO_REG bits

2015-05-01 Thread H Hartley Sweeten
Rename the CamelCase and convert the enum into defines. Use the BIT() macro to define the bits. Convert the inline helper functions into macros. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 27 +- driver

[PATCH 003/107] staging: comedi: ni_mio_common: refactor gpct to stc register handling

2015-05-01 Thread H Hartley Sweeten
The NI General Purpose Counter Timer (gpct) registers are mapped to the STC registers with a big switch statement. Create a lookup table to handle the mapping ot the registers. This is easier to maintain. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/stagin

[PATCH 008/107] staging: comedi: ni_stc.h: simplify MSeries_AI_Config_Bank_Bits()

2015-05-01 Thread H Hartley Sweeten
Simplify this helper function by using a bit-shift to set the high banks select bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_stc.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/comed

[PATCH 005/107] staging: comedi: ni_mio_common: simplify ni_m_series_set_pfi_routing()

2015-05-01 Thread H Hartley Sweeten
This function is overly complex due to the M_Offset_PFI_Output_Select() helper using a 1 based index for the registers and the private data using a 0 based index for the cached values. Modify the M_Offset_PFI_Output_Select() helper to use a 0 based index and remove the sanity check which can never

[PATCH 026/107] staging: comedi: ni_stc.h: tidy up NI_M_INTC_ENA_REG bits

2015-05-01 Thread H Hartley Sweeten
Rename the CamelCase and convert enums into defines. Use the BIT() macro to define the bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- drivers/staging/comedi/drivers/ni_stc.h| 5 + 2 files chang

[PATCH 020/107] staging: comedi: ni_stc.h: tidy up NI_M_CDIO_DMA_SEL_REG bits

2015-05-01 Thread H Hartley Sweeten
Rename the CamelCase and convert enums into macros to set the bits in this register. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 17 ++--- drivers/staging/comedi/drivers/ni_stc.h| 11 ---

[PATCH 028/107] staging: comedi: ni_mio_common: remove disabled GPCT functions

2015-05-01 Thread H Hartley Sweeten
The GPCT (general purpose counter timer) is handled by the ni_tio and ni_tiocmd modules. Remove the old disabled code in this file. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 82 -- 1 file

[PATCH 017/107] staging: comedi: ni_stc.h: tidy up NI_M_CAL_PWM_REG bits

2015-05-01 Thread H Hartley Sweeten
Rename the CamelCase and convert the inline helper functions that set the bits in this register to macros. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 4 ++-- drivers/staging/comedi/drivers/ni_stc.h| 12 ++

[PATCH 000/107] staging: comedi: tidy up ni_stc.h

2015-05-01 Thread H Hartley Sweeten
The ni_stc.h header contains the DAQ-STC and board specific register information used by ni_mio_common.c to provide the "guts" for the National Instruments MIO drivers ni_atmio, ni_mio_cs, and ni_pcimio. Those drivers all currently include the ni_mio_common.c file. This header is a bit of a mess..

[PATCH 018/107] staging: comedi: ni_stc.h: tidy up NI_M_PFI_OUT_SEL_REG bits

2015-05-01 Thread H Hartley Sweeten
Rename the CamelCase and convert the inline helper functions that set/get the bits in this register to macros. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 6 +++--- drivers/staging/comedi/drivers/ni_stc.h|

[PATCH 023/107] staging: comedi: ni_stc.h: tidy up NI_M_CDI_MODE_REG bits

2015-05-01 Thread H Hartley Sweeten
Rename the CamelCase and convert enums into defines. Use the BIT() macro to define the bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_stc.h | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) d

  1   2   >