On 05/16/2013 09:01 PM, Greg KH wrote:
On Thu, May 16, 2013 at 06:06:20PM +0200, Cyril Roelandt wrote:
The return type of block_device_operations.release() changed to void in commit
db2a144b.
Interesting, how did you test build this patch, given that the driver
doesn't currently build at all
@
identifier has_release_func.release_func;
@@
- int
+ void
release_func(...) {
...
- return ...;
}
Signed-off-by: Cyril Roelandt
---
drivers/staging/lustre/lustre/llite/lloop.c |4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/lloop.c
b
@
identifier has_release_func.release_func;
@@
- int
+ void
release_func(...) {
...
- return ...;
}
/smpl
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/lustre/lustre/llite/lloop.c |4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/lustre
On 05/16/2013 09:01 PM, Greg KH wrote:
On Thu, May 16, 2013 at 06:06:20PM +0200, Cyril Roelandt wrote:
The return type of block_device_operations.release() changed to void in commit
db2a144b.
Interesting, how did you test build this patch, given that the driver
doesn't currently build at all
On 02/12/2013 11:06 PM, David Miller wrote:
From: Cyril Roelandt
Date: Tue, 12 Feb 2013 22:54:46 +0100
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.
Signed-off-by: Cyril Roelandt
...
@@ -450,8 +450,7 @@ int
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.
Signed-off-by: Cyril Roelandt
---
drivers/net/ethernet/ti/davinci_cpdma.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/ti
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.
Signed-off-by: Cyril Roelandt
---
drivers/net/ethernet/ti/davinci_cpdma.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ti
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/net/ethernet/ti/davinci_cpdma.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/net/ethernet/ti/davinci_cpdma.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers
(ctlr-channels[i]);
}
SInce this is now a single statement basic block, remove the
surrounding braces.
Ok, I resent, though I forgot to add v2.
Regards,
Cyril Roelandt.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord
unregister_dgrp_device on a NULL pointer is a no-op, so the NULL checks in
dgrp_remove_nd() can be removed.
Signed-off-by: Cyril Roelandt
---
drivers/staging/dgrp/dgrp_specproc.c |9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/dgrp
unregister_and_remove_pcpu on a NULL pointer is a no-op, so the NULL check in
sync_pcpu can be removed.
Signed-off-by: Cyril Roelandt
---
drivers/xen/pcpu.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/xen/pcpu.c b/drivers/xen/pcpu.c
index 067fcfa..5a27a45
dma_ops_domain_free on a NULL pointer is a no-op, so the NULL check in
amd_iommu_init_dma_ops() can be removed.
Signed-off-by: Cyril Roelandt
---
drivers/iommu/amd_iommu.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu
delete_msg_mgr on a NULL pointer is a no-op, so the NULL check in
bridge_msg_delete can be removed.
Signed-off-by: Cyril Roelandt
---
drivers/staging/tidspbridge/core/msg_sm.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/tidspbridge/core/msg_sm.c
b
) {
...
if (!param) return;
...
}
@@
identifier r.noop_func;
expression E;
statement S;
@@
(
- if (E) noop_func(E);
+ noop_func(E);
|
- if (E) { noop_func(E); E = NULL; }
+ noop_func(E);
+ E = NULL;
)
Regards,
Cyril Roelandt
---
Cyril Roelandt (5):
radeon: Remove redundant NULL check before
radeon_i2c_destroy on a NULL pointer is a no-op.
Signed-off-by: Cyril Roelandt
---
drivers/gpu/drm/radeon/radeon_i2c.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c
b/drivers/gpu/drm/radeon/radeon_i2c.c
index fc60b74..850df44
) {
...
if (!param) return;
...
}
@@
identifier r.noop_func;
expression E;
statement S;
@@
(
- if (E) noop_func(E);
+ noop_func(E);
|
- if (E) { noop_func(E); E = NULL; }
+ noop_func(E);
+ E = NULL;
)
/smpl
Regards,
Cyril Roelandt
---
Cyril Roelandt (5):
radeon: Remove redundant NULL
radeon_i2c_destroy on a NULL pointer is a no-op.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/gpu/drm/radeon/radeon_i2c.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c
b/drivers/gpu/drm/radeon/radeon_i2c.c
index
dma_ops_domain_free on a NULL pointer is a no-op, so the NULL check in
amd_iommu_init_dma_ops() can be removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/iommu/amd_iommu.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b
delete_msg_mgr on a NULL pointer is a no-op, so the NULL check in
bridge_msg_delete can be removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/tidspbridge/core/msg_sm.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/tidspbridge
unregister_and_remove_pcpu on a NULL pointer is a no-op, so the NULL check in
sync_pcpu can be removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/xen/pcpu.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/xen/pcpu.c b/drivers/xen/pcpu.c
index
unregister_dgrp_device on a NULL pointer is a no-op, so the NULL checks in
dgrp_remove_nd() can be removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/dgrp/dgrp_specproc.c |9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging
Check that the array indexes are in-bounds before accessing the rate2 and tmp
arrays.
Found with the following semantic patch:
@@
identifier t;
identifier idx;
expression E;
statement S;
@@
* for (... ; <+... t[idx] ...+> && idx < E ; ...)
S
Signed-off-by: Cyril Roelandt
Check that the array indexes are in-bounds before accessing the rate2 and tmp
arrays.
Found with the following semantic patch:
smpl
@@
identifier t;
identifier idx;
expression E;
statement S;
@@
* for (... ; +... t[idx] ...+ idx E ; ...)
S
/smpl
Signed-off-by: Cyril Roelandt tipec
The omap_bandgap_get_sensor_data() function returns ERR_PTR(), so we need to use
IS_ERR() rather than a NULL check.
Signed-off-by: Cyril Roelandt
---
drivers/staging/omap-thermal/omap-thermal-common.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging
vb2_dma_contig_init_ctx() returns ERR_PTR and never returns NULL, so IS_ERR
should be used instead of a NULL check.
Signed-off-by: Cyril Roelandt
---
drivers/media/platform/davinci/vpbe_display.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform
The following five patches replace NULL checks by calls to IS_ERR() when
checking the return values of functions that return ERR_PTR() on error.
Regards,
Cyril Roelandt.
---
Cyril Roelandt (5):
staging: omap-thermal: fix error check in
omap_thermal_expose_sensor
The ptp_clock_register() returns ERR_PTR() and never returns NULL. Replace the
NULL check by a call to IS_ERR().
Signed-off-by: Cyril Roelandt
---
drivers/net/ethernet/sfc/ptp.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net
The c2port_device_register() function returns ERR_PTR() and never returns NULL,
so the NULL check should be replaced by a call to IS_ERR().
Signed-off-by: Cyril Roelandt
---
drivers/misc/c2port/c2port-duramar2150.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
According to its documentation, clk_get() returns a "valid IS_ERR() condition
containing errno", so we should call IS_ERR() rather than a NULL check.
Signed-off-by: Cyril Roelandt
---
drivers/spi/spi-sh-hspi.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/d
According to its documentation, clk_get() returns a valid IS_ERR() condition
containing errno, so we should call IS_ERR() rather than a NULL check.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/spi/spi-sh-hspi.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
The c2port_device_register() function returns ERR_PTR() and never returns NULL,
so the NULL check should be replaced by a call to IS_ERR().
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/misc/c2port/c2port-duramar2150.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
The ptp_clock_register() returns ERR_PTR() and never returns NULL. Replace the
NULL check by a call to IS_ERR().
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/net/ethernet/sfc/ptp.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sfc
The following five patches replace NULL checks by calls to IS_ERR() when
checking the return values of functions that return ERR_PTR() on error.
Regards,
Cyril Roelandt.
---
Cyril Roelandt (5):
staging: omap-thermal: fix error check in
omap_thermal_expose_sensor
vb2_dma_contig_init_ctx() returns ERR_PTR and never returns NULL, so IS_ERR
should be used instead of a NULL check.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/media/platform/davinci/vpbe_display.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
The omap_bandgap_get_sensor_data() function returns ERR_PTR(), so we need to use
IS_ERR() rather than a NULL check.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/omap-thermal/omap-thermal-common.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
)) return -ERESTARTSYS;
+ mutex_lock(E);
...
}
Signed-off-by: Cyril Roelandt
---
drivers/media/common/saa7146/saa7146_fops.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/common/saa7146/saa7146_fops.c
b/drivers/media/common/saa7146/saa7146_fops.c
index
fixed a few of these issues,
since I could not formulate it better.
---
Cyril Roelandt (1):
media: saa7146: don't use mutex_lock_interruptible() in
device_release().
drivers/media/common/saa7146/saa7146_fops.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--
1.7.10.4
In r8711_wx_get_wap(), make sure we do not call memcpy() on a memory area that
has just been zeroed by a call to memset().
Signed-off-by: Cyril Roelandt
---
drivers/staging/rtl8712/rtl871x_ioctl_linux.c |8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers
In r8711_wx_get_wap(), make sure we do not call memcpy() on a memory area that
has just been zeroed by a call to memset().
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/rtl8712/rtl871x_ioctl_linux.c |8
1 file changed, 4 insertions(+), 4 deletions(-)
diff
fixed a few of these issues,
since I could not formulate it better.
---
Cyril Roelandt (1):
media: saa7146: don't use mutex_lock_interruptible() in
device_release().
drivers/media/common/saa7146/saa7146_fops.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--
1.7.10.4
)) return -ERESTARTSYS;
+ mutex_lock(E);
...
}
/spml
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/media/common/saa7146/saa7146_fops.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/common/saa7146/saa7146_fops.c
b/drivers/media/common/saa7146
On 12/05/2012 08:11 AM, Dan Carpenter wrote:
On Wed, Dec 05, 2012 at 02:22:02AM +0100, Cyril Roelandt wrote:
In r8711_wx_get_wap(), make sure we do not call memcpy() on a memory area that
has just been zeroed by a call to memset().
I look at it like the original code is fine. Your version
On 12/05/2012 08:11 AM, Dan Carpenter wrote:
On Wed, Dec 05, 2012 at 02:22:02AM +0100, Cyril Roelandt wrote:
In r8711_wx_get_wap(), make sure we do not call memcpy() on a memory area that
has just been zeroed by a call to memset().
I look at it like the original code is fine. Your version
In r8711_wx_get_wap(), make sure we do not call memcpy() on a memory area that
has just been zeroed by a call to memset().
Signed-off-by: Cyril Roelandt
---
drivers/staging/rtl8712/rtl871x_ioctl_linux.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging
In uf_send_pkt_to_encrypt(), the memory area zeroed by this call to memset() is
overwritten by a call to memcpy() a few instructions later, so it is not needed.
Signed-off-by: Cyril Roelandt
---
drivers/staging/csr/unifi_sme.c |1 -
1 file changed, 1 deletion(-)
diff --git a/drivers
A few lines after this call, we memcpy over the same memory area, so the call to
memset is not necessary.
Signed-off-by: Cyril Roelandt
---
drivers/staging/wlags49_h2/wl_wext.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_wext.c
b/drivers/staging
A few lines after this call, we memcpy over the same memory area, so the call to
memset is not necessary.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/wlags49_h2/wl_wext.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_wext.c
b
In uf_send_pkt_to_encrypt(), the memory area zeroed by this call to memset() is
overwritten by a call to memcpy() a few instructions later, so it is not needed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/csr/unifi_sme.c |1 -
1 file changed, 1 deletion(-)
diff
In r8711_wx_get_wap(), make sure we do not call memcpy() on a memory area that
has just been zeroed by a call to memset().
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/rtl8712/rtl871x_ioctl_linux.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
This call is followed by a call to memcpy() on the same memory area, so it can
be safely removed.
Signed-off-by: Cyril Roelandt
---
drivers/scsi/megaraid/megaraid_sas_fusion.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
b/drivers/scsi
These calls are followed by calls to memcpy() on the same memory area, so they
can be safely removed.
Signed-off-by: Cyril Roelandt
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c |4
1 file changed, 4 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
This call is followed by a call to memcpy() on the same memory area, so it can
be safely removed.
Signed-off-by: Cyril Roelandt
---
drivers/staging/vt6656/bssdb.c |1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
index 6a13941
These calls are followed by calls to memcpy() on the same memory area, so they
can be safely removed.
Signed-off-by: Cyril Roelandt
---
drivers/staging/rtl8712/mlme_linux.c|2 --
drivers/staging/rtl8712/rtl871x_cmd.c |1 -
drivers/staging/rtl8712/rtl871x_ioctl_set.c |2
These calls are followed by calls to memcpy() on the same memory area, so they
can safely be removed.
Signed-off-by: Cyril Roelandt
---
drivers/net/ethernet/brocade/bna/bfa_ioc.c |4
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
b/drivers/net
These calls are followed by calls to memcpy() on the same memory area, so they
can safely be removed.
Signed-off-by: Cyril Roelandt
---
drivers/scsi/bfa/bfa_ioc.c |1 -
drivers/scsi/bfa/bfad_bsg.c |1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers
The following six patches remove useless calls to memset(). They have been found
with this Coccinelle script:
@@
expression E;
expression S;
@@
-memset(E, 0, S);
memcpy(E, ..., S);
They have only been tested by compilation.
WBR,
Cyril Roelandt.
Cyril Roelandt (6):
bna: remove useless
The following six patches remove useless calls to memset(). They have been found
with this Coccinelle script:
spml
@@
expression E;
expression S;
@@
-memset(E, 0, S);
memcpy(E, ..., S);
/spml
They have only been tested by compilation.
WBR,
Cyril Roelandt.
Cyril Roelandt (6):
bna: remove
These calls are followed by calls to memcpy() on the same memory area, so they
can safely be removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/scsi/bfa/bfa_ioc.c |1 -
drivers/scsi/bfa/bfad_bsg.c |1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/scsi/bfa
These calls are followed by calls to memcpy() on the same memory area, so they
can safely be removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/net/ethernet/brocade/bna/bfa_ioc.c |4
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/brocade/bna
These calls are followed by calls to memcpy() on the same memory area, so they
can be safely removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/rtl8712/mlme_linux.c|2 --
drivers/staging/rtl8712/rtl871x_cmd.c |1 -
drivers/staging/rtl8712
This call is followed by a call to memcpy() on the same memory area, so it can
be safely removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/vt6656/bssdb.c |1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656
These calls are followed by calls to memcpy() on the same memory area, so they
can be safely removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/scsi/bnx2fc/bnx2fc_hwi.c |4
1 file changed, 4 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi
This call is followed by a call to memcpy() on the same memory area, so it can
be safely removed.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/scsi/megaraid/megaraid_sas_fusion.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
Found using the following semantic patch:
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
Signed-off-by: Cyril Roelandt
---
drivers/usb/gadget/uvc_video.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget
Found using the following semantic patch:
spml
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
/spml
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/usb/gadget/uvc_video.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
On 11/21/2012 01:44 AM, Rafael J. Wysocki wrote:
On Saturday, November 17, 2012 02:54:23 AM Cyril Roelandt wrote:
The LEN variable is unsigned, therefore checking whether it is less than 0 is
useless.
Signed-off-by: Cyril Roelandt
---
drivers/acpi/proc.c |2 --
1 file changed, 2
On 11/22/2012 01:23 AM, Rafael J. Wysocki wrote:
On Thursday, November 22, 2012 01:05:30 AM Cyril Roelandt wrote:
On 11/21/2012 01:44 AM, Rafael J. Wysocki wrote:
On Saturday, November 17, 2012 02:54:23 AM Cyril Roelandt wrote:
The LEN variable is unsigned, therefore checking whether
The LEN variable is unsigned, therefore checking whether it is less than 0 is
useless. Also drop the LEN variable, since the COUNT parameter can be used
instead.
Signed-off-by: Cyril Roelandt
---
drivers/acpi/proc.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git
The LEN variable is unsigned, therefore checking whether it is less than 0 is
useless. Also drop the LEN variable, since the COUNT parameter can be used
instead.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/acpi/proc.c | 11 ---
1 file changed, 4 insertions(+), 7
On 11/22/2012 01:23 AM, Rafael J. Wysocki wrote:
On Thursday, November 22, 2012 01:05:30 AM Cyril Roelandt wrote:
On 11/21/2012 01:44 AM, Rafael J. Wysocki wrote:
On Saturday, November 17, 2012 02:54:23 AM Cyril Roelandt wrote:
The LEN variable is unsigned, therefore checking whether
On 11/21/2012 01:44 AM, Rafael J. Wysocki wrote:
On Saturday, November 17, 2012 02:54:23 AM Cyril Roelandt wrote:
The LEN variable is unsigned, therefore checking whether it is less than 0 is
useless.
Signed-off-by: Cyril Roelandttipec...@gmail.com
---
drivers/acpi/proc.c |2 --
1 file
Found using the following semantic patch:
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
Signed-off-by: Cyril Roelandt
---
drivers/media/platform/soc_camera/mx2_camera.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media
Found using the following semantic patch:
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
Signed-off-by: Cyril Roelandt
---
drivers/usb/gadget/uvc_video.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/uvc_video.c
Found using the following semantic patch:
spml
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
/spml
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/usb/gadget/uvc_video.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Found using the following semantic patch:
spml
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
/spml
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/media/platform/soc_camera/mx2_camera.c |2 +-
1 file changed, 1 insertion(+), 1 deletion
The LEN variable is unsigned, therefore checking whether it is less than 0 is
useless.
Signed-off-by: Cyril Roelandt
---
drivers/acpi/proc.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index 27adb09..37871a7 100644
--- a/drivers/acpi/proc.c
= E; ...+> }
* if (ret < 0)
S
Signed-off-by: Cyril Roelandt
---
drivers/staging/media/solo6x10/v4l2-enc.c |4
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/media/solo6x10/v4l2-enc.c
b/drivers/staging/media/solo6x10/v4l2-enc.c
index f8f0da9..4977e86 100644
---
= E; ...+ }
* if (ret 0)
S
/spml
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/staging/media/solo6x10/v4l2-enc.c |4
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/media/solo6x10/v4l2-enc.c
b/drivers/staging/media/solo6x10/v4l2-enc.c
index f8f0da9..4977e86
The LEN variable is unsigned, therefore checking whether it is less than 0 is
useless.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/acpi/proc.c |2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index 27adb09..37871a7 100644
copy_to_user() cannot return a negative value: it returns the number of bytes
that could not be copied.
Return -EFAULT on failure rather than the number of bytes that could not be
copied, as this seems more standard.
Signed-off-by: Cyril Roelandt
---
drivers/net/ethernet/intel/ixgbe
copy_to_user() cannot return a negative value: it returns the number of bytes
that could not be copied.
Return -EFAULT on failure rather than the number of bytes that could not be
copied, as this seems more standard.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/net/ethernet
Ensure that calls to d_find_alias() have a corresponding dput().
Signed-off-by: Cyril Roelandt
---
scripts/coccinelle/api/d_find_alias.cocci | 80 +
1 file changed, 80 insertions(+)
create mode 100644 scripts/coccinelle/api/d_find_alias.cocci
diff --git a/scripts
Call to d_find_alias() needs a corresponding dput().
Signed-off-by: Cyril Roelandt
---
drivers/iommu/tegra-smmu.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 4167863..4252d74 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b
dput() was not called in the error path.
Signed-off-by: Cyril Roelandt
---
fs/ceph/export.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ceph/export.c b/fs/ceph/export.c
index 9349bb3..ca3ab3f 100644
--- a/fs/ceph/export.c
+++ b/fs/ceph/export.c
@@ -56,13 +56,15
Hello,
A call to d_find_alias() needs a corresponding call to dput() in order to avoid
resource leaks.
The first patch is a Coccinelle scripts that looks for missing calls to dput().
The other two patches add calls to dput() where needed.
WBR,
Cyril Roelandt.
--
To unsubscribe from this list
Hello,
A call to d_find_alias() needs a corresponding call to dput() in order to avoid
resource leaks.
The first patch is a Coccinelle scripts that looks for missing calls to dput().
The other two patches add calls to dput() where needed.
WBR,
Cyril Roelandt.
--
To unsubscribe from this list
dput() was not called in the error path.
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
fs/ceph/export.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ceph/export.c b/fs/ceph/export.c
index 9349bb3..ca3ab3f 100644
--- a/fs/ceph/export.c
+++ b/fs/ceph/export.c
Call to d_find_alias() needs a corresponding dput().
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
drivers/iommu/tegra-smmu.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 4167863..4252d74 100644
--- a/drivers/iommu
Ensure that calls to d_find_alias() have a corresponding dput().
Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
scripts/coccinelle/api/d_find_alias.cocci | 80 +
1 file changed, 80 insertions(+)
create mode 100644 scripts/coccinelle/api/d_find_alias.cocci
90 matches
Mail list logo