Category: Coccinelle

iscsi-target: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Nicholas Bellinger — drivers/target/iscsi/iscsi_target.c | 6 ++—- drivers/target/iscsi/iscsi_target_nego.c | 3 +– 2 files changed, 3 insertions(+), 6 deletions(-)   diff –git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 02de527..8599545 100644 — a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -614,13 +614,12 @@ int iscsit_add_reject( …

Continue reading

x86: Use kmemdup() in copy_thread(), rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Link: http://lkml.kernel.org/r/1321569820.1624.275.camel@localhost.localdomain Signed-off-by: Ingo Molnar — arch/x86/kernel/process_64.c | 5 ++— 1 file changed, 2 insertions(+), 3 deletions(-)   diff –git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 3bd7e6e..d2c1f62 100644 — a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -293,13 +293,12 @@ int copy_thread(unsigned long clone_flags, …

Continue reading

MIPS: Alchemy: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/3058/ Signed-off-by: Ralf Baechle — arch/mips/alchemy/common/platform.c | 10 ++++—— 1 file changed, 4 insertions(+), 6 deletions(-)   diff –git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 95cb911..c0f3ce6 100644 — a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c @@ -334,13 +334,12 @@ …

Continue reading

selinux: Casting (void *) value returned by kmalloc is useless

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. Signed-off-by: Thomas Meyer Signed-off-by: James Morris — security/selinux/ss/conditional.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index 2ec9041..377d148 100644 — a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c @@ -175,7 +175,7 @@ void cond_policydb_destroy(struct policydb *p) int cond_init_bool_indexes(struct …

Continue reading

[media] cx25821: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Mauro Carvalho Chehab — drivers/media/video/cx25821/cx25821-audio-upstream.c | 11 ++++——- drivers/media/video/cx25821/cx25821-video-upstream-ch2.c | 12 ++++——– drivers/media/video/cx25821/cx25821-video-upstream.c | 10 ++++—— 3 files changed, 12 insertions(+), 21 deletions(-)   diff –git a/drivers/media/video/cx25821/cx25821-audio-upstream.c b/drivers/media/video/cx25821/cx25821-audio-upstream.c index 4dc2a24..20c7ca3 100644 — a/drivers/media/video/cx25821/cx25821-audio-upstream.c +++ b/drivers/media/video/cx25821/cx25821-audio-upstream.c @@ …

Continue reading

[media] pwc: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Mauro Carvalho Chehab — drivers/media/video/pwc/pwc-ctrl.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c index 3977add..b42c239 100644 — a/drivers/media/video/pwc/pwc-ctrl.c +++ b/drivers/media/video/pwc/pwc-ctrl.c @@ -113,10 +113,9 @@ static int _send_control_msg(struct pwc_device *pdev, …

Continue reading

[media] v4l: Casting (void *) value returned by kmalloc is useless

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Mauro Carvalho Chehab — drivers/media/video/vino.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index 52a0a37..4d7391e 100644 — a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c @@ -708,7 +708,7 @@ static int vino_allocate_buffer(struct vino_framebuffer *fb, …

Continue reading

[media] dw2102: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Mauro Carvalho Chehab — drivers/media/dvb/dvb-usb/dw2102.c | 15 ++++++——— 1 file changed, 6 insertions(+), 9 deletions(-)   diff –git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index f103ec1..41cff37 100644 — a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c @@ -1859,12 +1859,11 @@ static struct dvb_usb_device_properties su3000_properties = …

Continue reading

[media] drxd: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Mauro Carvalho Chehab — drivers/media/dvb/frontends/drxd_hard.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c index 88e46f4..beb6775 100644 — a/drivers/media/dvb/frontends/drxd_hard.c +++ b/drivers/media/dvb/frontends/drxd_hard.c @@ -914,14 +914,13 @@ static int load_firmware(struct drxd_state *state, …

Continue reading

gianfar: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller — drivers/net/ethernet/freescale/gianfar_ethtool.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c index 1ea0eb9..5890f4b 100644 — a/drivers/net/ethernet/freescale/gianfar_ethtool.c +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c @@ -1410,10 +1410,9 @@ static int gfar_optimize_filer_masks(struct filer_table *tab) …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.