Only the 'Port_A' define is used. Rename the CamelCase and remove the
unused defines.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 3 ++-
Rename the CamelCase. For aesthetics, convert the enum into defines.
Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 18 ++
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 20 ++--
Rename the CamelCase and define the G0 and G1 registers to add clarity
to the mio_regmap tables.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 8
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 8
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 2 +-
Rename the CamelCase.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 2 +-
drivers/staging/comedi/drivers/ni_stc.h| 2 +-
2 files
Rename the CamelCase.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 2 +-
drivers/staging/comedi/drivers/ni_stc.h| 2 +-
2 files
The bit defines in this header for the GPCT registers are not used. The ones
in ni_tio_internal.h are used instead. Remove them from this header.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
Rename the CamelCase.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 6 +++---
drivers/staging/comedi/drivers/ni_stc.h| 2 +-
2 files
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 7 ---
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 9 +
For aesthetics, convert the enum into defines. Use the BIT() macro
to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 12
Rename the CamelCase and define the G0 and G1 registers to add clarity
to the mio_regmap tables.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 8
Rename the CamelCase.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 8
drivers/staging/comedi/drivers/ni_stc.h| 10 +-
The gpct_index will always be 0 or 1. Remove the unnecessary BUG_ON()
checks.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 2 --
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 simulate memory allocation
failures at
a certain
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 30 +-
Rename the CamelCase.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 10 +-
drivers/staging/comedi/drivers/ni_stc.h| 3 ++-
2
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 simulate memory allocation
failures at
a certain
Hi Krzysztof,
Thank you for the patch.
On Saturday 02 May 2015 00:43:07 Krzysztof Kozlowski wrote:
The platform_device_id is not modified by the driver and core uses it as
const.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Laurent Pinchart
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?
Rename the CamelCase. Use the BIT() marco to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 32 +++
Rename the CamelCase. Use the BIT() macro to define the bits.
Tidy up ni_ai_reset() by using a local var to set the common bits and
programming the register in the common code path.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg
The Write_Strobe_*_Register defines are noy used. Instead the more
descriptive Configuration_Memory_Clear, ADC_FIFO_Clear and DAC_FIFO_Clear
defines are used. Remove the unused defines and rename the CamelCase.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott
Rename the CamelCase.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 54 ---
drivers/staging/comedi/drivers/ni_pcimio.c |
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 16
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_stc.h | 17 -
1 file changed, 17 deletions(-)
diff --git
Rename the CamelCase. Convert the inline helper functions into macros.
Tidy up the driver code to use the new macros. For consistency, make
the ni_set_gpct_dma_channel() helper follow the same style as the
ni_set_ai_dma_channel() and ni_set_ao_dma_channel() helpers.
Signed-off-by: H Hartley
Rename the CamelCase and convert the enum into macros.
Tidy up the driver code to use the new macros.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
Rename the CamelCase.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 6 +++---
drivers/staging/comedi/drivers/ni_stc.h| 8
2
Rename the CamelCase.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 34 ++
drivers/staging/comedi/drivers/ni_stc.h
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 10 +-
Move this inline helper function from ni_stc.h. It does not need to be
exposed outside of this file.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c
1) Move the enum's to a better location and tidy up the whitespace.
2) Tidy up the defines used for some array sizes in the private data.
3) Add comments for the spinlock_t variables in the private data.
4) Move the forward declaration to the end of the file.
Signed-off-by: H Hartley Sweeten
Rename the CamelCase. Use the BIT() macro to define the bits.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 34 +++---
Rename the CamelCase and convert the defines into a macro.
Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com
Cc: Ian Abbott abbo...@mev.co.uk
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
---
drivers/staging/comedi/drivers/ni_mio_common.c | 2 +-
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
The platform_device_id is not modified by the driver and core uses it as
const.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
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
The platform_device_id is not modified by the driver and core uses it as
const.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
drivers/staging/media/omap4iss/iss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/omap4iss/iss.c
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 gre...@linuxfoundation.org
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
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/)
// smpl
@@
expression ptr,e1,e2;
@@
- OBD_ALLOC(ptr,sizeof e1 *
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
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
point that its
From: Julia Lawall julia.law...@lip6.fr
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/)
// smpl
@@
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: sta...@vger.kernel.org
Signed-off-by: K. Y. Srinivasan k...@microsoft.com
Reviewed-by: Long Li lon...@microsoft.com
---
V2: Added
Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
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
---
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 add enough
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 abbo...@mev.co.uk
---
drivers/staging/comedi/drivers/mite.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/mite.c
Use the usual style for block comments. Squash double spaces after
comment opening sequences.
Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
drivers/staging/comedi/drivers/mite.h | 59 ++-
1 file changed, 30 insertions(+), 29 deletions(-)
diff --git
The macro `PCIMIO_COMPAT` is defined, but never used. Remove it.
Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
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
The Comedi driver modules build fine if the inclusion of linux/slab.h
is removed from mite.h, so remove it. However, since mite.c calls
`kzalloc()`, include linux/slab.h there.
Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
drivers/staging/comedi/drivers/mite.c | 1 +
1) staging: comedi: mite: move #include linux/slab.h
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)
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 abbo...@mev.co.uk
---
drivers/staging/comedi/drivers/mite.h | 18 --
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git
Use the usual style for block comments. Squash double spaces after
comment opening sequences.
Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
drivers/staging/comedi/drivers/mite.c | 105 +-
1 file changed, 54 insertions(+), 51 deletions(-)
diff --git
On Fri, 1 May 2015, Simmons, James A. wrote:
From: Julia Lawall julia.law...@lip6.fr
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 jsimm...@infradead.org
A simple replace will not
From: Julia Lawall julia.law...@lip6.fr
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 jsimm...@infradead.org
A simple replace will not work. The OBD_ALLOC and OBD_FREE functions allocate
Move all ethernet-specific helpers to staging.
Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
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
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
@@ expression ptr; @@
- if (ptr != NULL) {
kfree(ptr);
ptr = NULL;
- }
// /smpl
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
The first part of the patch introduces new labels to avoid unnecessary
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL) {
kfree(ptr);
ptr = NULL;
- }
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
This patch additionally simplifies one case where the free, and thus the
jump
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
@@ expression ptr; @@
- if (ptr != NULL) {
kfree(ptr);
ptr = NULL;
- }
// /smpl
In
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
In the first case, llss can never be null at the point of the kfree anyway.
In
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
In the first case, the only cleanup needed is the unlock, so jump to that
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL) {
kfree(ptr);
ptr = NULL;
- }
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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/)
// smpl
@@ expression ptr; @@
- if (ptr != NULL)
kfree(ptr);
// /smpl
Signed-off-by: Julia Lawall julia.law...@lip6.fr
---
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?
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 aaro.koski...@iki.fi
---
arch/mips/cavium-octeon/executive/cvmx-helper-ethernet.c | 2 --
1 file changed, 2 deletions(-)
diff --git
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 aaro.koski...@iki.fi
---
arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c | 5 +
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
Use function to access interface_port_count. This allows moving
functions requiring the info to different files.
Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
arch/mips/cavium-octeon/executive/cvmx-helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
Move all ethernet-specific headers to staging.
Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
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
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,
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
From: Julia Lawall julia.law...@lip6.fr
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 jsimm...@infradead.org
A simple replace will not work. The OBD_ALLOC and OBD_FREE functions
On Friday, May 01, 2015 10:04 AM, Ian Abbott wrote:
1) staging: comedi: mite: move #include linux/slab.h
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
Delete unneeded symbol exports.
Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
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
Move ethernet-specific helpers into a separate file.
Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
arch/mips/cavium-octeon/executive/Makefile | 1 +
.../cavium-octeon/executive/cvmx-helper-ethernet.c | 912
arch/mips/cavium-octeon/executive/cvmx-helper.c
Move the link helpers into a separate file.
Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
arch/mips/cavium-octeon/executive/Makefile | 2 +-
.../cavium-octeon/executive/cvmx-helper-board.c| 511
arch/mips/cavium-octeon/executive/cvmx-link.c | 534
Move interface enumeration helpers to cvmx-helper.
Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
---
.../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 -
1 - 100 of 188 matches
Mail list logo