[PATCH] drivers: parport: Use kmemdup

2013-05-03 Thread Alexandru Gheorghiu
Used kmemdup instead of kmalloc and memcpy. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/parport/parport_gsc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c index 050773c

[PATCH] drivers: parport: Use kzalloc

2013-05-03 Thread Alexandru Gheorghiu
Replaced calls to kmalloc and memset with kzalloc. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/parport/share.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/parport/share.c b/drivers/parport/share.c index a848e02..6a83ee1

[PATCH] fs: reiserfs: Use kstrdup function

2013-04-14 Thread Alexandru Gheorghiu
Use kstrdup function instead of kmalloc and strcpy. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- fs/reiserfs/super.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 194113b..f8a23c3 100644 --- a/fs

[PATCH] drivers: usb: gadget: Use ERR_CAST function

2013-04-14 Thread Alexandru Gheorghiu
Use ERR_CAST function instead of ERR_PTR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/usb/gadget/composite.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index

[PATCH] lib: digsig: Use ERR_CAST function

2013-04-14 Thread Alexandru Gheorghiu
Use ERR_CAST function instead of ERR_PTR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- lib/digsig.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/digsig.c b/lib/digsig.c index 2f31e6a..8793aed 100644 --- a/lib/digsig.c +++ b/lib

[PATCH] drivers: dma: Use devm_request_and_ioremap

2013-04-14 Thread Alexandru Gheorghiu
Use devm_request_and_ioremap function which provides more consistent error handling. Signed-off-by: Alexandru Gheorghiu --- drivers/dma/txx9dmac.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index 913f55c..471f9f1

[PATCH] block: ioctl: Use PTR_RET function

2013-04-10 Thread Alexandru Gheorghiu
Use PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- block/ioctl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/ioctl.c b/block/ioctl.c index a31d91d..4698c1f7 100644 --- a/block/ioctl.c +++ b

[PATCH] block: blk-timeout: Use PTR_RET function

2013-04-10 Thread Alexandru Gheorghiu
Use PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- block/blk-timeout.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 6e4744c..2a6aba0 100644 --- a/block

[PATCH] block: blk-core: Use PTR_RET function

2013-04-10 Thread Alexandru Gheorghiu
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- block/blk-core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 074b758..3a85a55 100644 --- a/block/blk

[PATCH] fs: f2fs: Use kmemdup

2013-03-28 Thread Alexandru Gheorghiu
Use kmemdup instead of kzalloc and memcpy. Signed-off-by: Alexandru Gheorghiu --- fs/f2fs/node.c| 12 +--- fs/f2fs/segment.c |3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e275218..9f5eca4 100644 --- a/fs/f2fs

[PATCH] fs: f2fs: Use kmemdup

2013-03-27 Thread Alexandru Gheorghiu
Used kmemdup instead of kzalloc and memcpy. Signed-off-by: Alexandru Gheorghiu --- fs/f2fs/node.c| 11 --- fs/f2fs/segment.c |3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e275218..920f53a 100644 --- a/fs/f2fs

[PATCH] fs: f2fs: Use kmemdup

2013-03-27 Thread Alexandru Gheorghiu
Used kmemdup instead of kzalloc followed by memcpy. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- fs/f2fs/segment.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 777f17e..1758149 100644 --- a/fs/f2fs

[PATCH] fs: dlm: Use kmemdup

2013-03-26 Thread Alexandru Gheorghiu
Use kmemdup instead of kmalloc followed by memcpy. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- fs/dlm/lowcomms.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 4f5ad24..bfd6fbc 100644 --- a/fs/dlm

[PATCH] sound: soc: Use PTR_RET function

2013-03-25 Thread Alexandru Gheorghiu
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- sound/soc/soc-io.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index 29183ef..8ca9ecc 100644 --- a

[PATCH] sound: oss: sb_common: Used kmemdup instead of kmalloc and memcpy

2013-03-25 Thread Alexandru Gheorghiu
Used kmemdup instead of replicating it's behaviour with kmalloc followed by memcpy. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- sound/oss/sb_common.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/oss/sb_common.c b/sound/oss/sb_com

[PATCH] sound: oss: uart401: Used kmemdup instead of kmalloc and memcpy

2013-03-25 Thread Alexandru Gheorghiu
Used kmemdup instead of replicating it's behaviour with kmalloc followed by memcpy. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- sound/oss/uart401.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/oss/uart401.c b/sound/oss/ua

[PATCH] drivers: virtio: Use PTR_RET function

2013-03-25 Thread Alexandru Gheorghiu
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/virtio/virtio_mmio.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index

[PATCH] drivers: video: omap2: dss: Use PTR_RET function

2013-03-19 Thread Alexandru Gheorghiu
Use PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/video/omap2/dss/core.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c

[PATCH] drivers: message: fusion: Use memdup_user function

2013-03-19 Thread Alexandru Gheorghiu
Used memdup_user function instead of kmalloc and copy_from_user. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/message/fusion/mptctl.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/message/fusion/mptctl.c b/drivers

[PATCH] drivers: message: fusion: Use kmemdup function

2013-03-19 Thread Alexandru Gheorghiu
Used kmemdup function instead of kmalloc and memcpy. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/message/fusion/mptbase.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c

[PATCH] drivers: message: i2o: Use kstrdup function

2013-03-19 Thread Alexandru Gheorghiu
Use kstrdup instead kmalloc and strcpy. Patch found using coccinelle Signed-off-by: Alexandru Gheorghiu --- drivers/message/i2o/memory.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/message/i2o/memory.c b/drivers/message/i2o/memory.c index 292b41e..1741a59

[PATCH] drivers: platform: x86: Use PTR_RET function

2013-03-19 Thread Alexandru Gheorghiu
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/platform/x86/samsung-q10.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/platform/x86/samsung-q10.c b/drivers/platform/x86

[PATCH] drivers: ptp: Use memdup_user function

2013-03-18 Thread Alexandru Gheorghiu
Used memdup_user function instead of kmalloc followed by copy_from_user. Also, handled return error using IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/ptp/ptp_chardev.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff

[PATCH] drivers: regulator: Use PTR_RET function

2013-03-18 Thread Alexandru Gheorghiu
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/regulator/fan53555.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index

[PATCH] net: bluetooth: Replaced kzalloc and memcpy with kmemdup

2013-03-18 Thread Alexandru Gheorghiu
Replaced calls to kzalloc followed by memcpy with a single call to kmemdup. Signed-off-by: Alexandru Gheorghiu --- net/bluetooth/a2mp.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index eb0f4b1..17f33a6 100644 --- a

[PATCH] drivers: cpuidle: Use devm_ioremap_resource function

2013-03-17 Thread Alexandru Gheorghiu
Use devm_ioremap_resource function, which provides better error handling, instead of devm_request_and_ioremap. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/cpuidle/cpuidle-kirkwood.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCH] drivers: ata: Use resource_size function

2013-03-17 Thread Alexandru Gheorghiu
Use resource_size function instead of explicit computation. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/ata/pata_octeon_cf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index

[PATCH] drivers: char: Use PTR_RET function

2013-03-17 Thread Alexandru Gheorghiu
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/char/tile-srom.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tile-srom.c b/drivers/char/tile-srom.c index 3b22a60..2e2036e

[PATCH] drivers: char: ipmi: Replaced kmalloc and strcpy with kstrdup

2013-03-17 Thread Alexandru Gheorghiu
Replaced calls to kmalloc followed by strcpy with a sincle call to kstrdup. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/char/ipmi/ipmi_msghandler.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b

[PATCH] net: bluetooth: Use PTR_RET function

2013-03-17 Thread Alexandru Gheorghiu
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- net/bluetooth/hci_sysfs.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 23b4e24

[PATCH] net: bluetooth: Replaced kzalloc and memcpy with kmemdup

2013-03-17 Thread Alexandru Gheorghiu
Replaced calls to kzalloc followed by memcpy with a single call to kmemdup. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- net/bluetooth/a2mp.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index

[PATCH] net: dns_resolver: Use kmemdup instead of kmalloc and memcpy

2013-03-15 Thread Alexandru Gheorghiu
Replace use of kmalloc followed by memcpy with kmemdup. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- net/dns_resolver/dns_query.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/dns_resolver/dns_query.c b/net/dns_resolver/dns_query.c index

[PATCH] drivers: gpio: Use devm_ioremap_resource function

2013-03-14 Thread Alexandru Gheorghiu
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Alexandru Gheorghiu --- drivers/gpio/gpio-vt8500.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio

[PATCH] drivers: spi: Use PTR_RET function

2013-03-14 Thread Alexandru Gheorghiu
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/spi/spidev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 2e0655d..911e9e0 100644

[PATCH] drivers: spi: Use PTR_RET function

2013-03-14 Thread Alexandru Gheorghiu
Replaced calls to IS_ERR and PTR_ERR with PTR_RET function. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/spi/spi-fsl-spi.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index

[PATCH] drivers: dma: Use devm_ioremap_resource

2013-03-13 Thread Alexandru Gheorghiu
Replaced call to devm_request_and_ioremap with devm_ioremap_resource which provides better error handling. Signed-off-by: Alexandru Gheorghiu --- drivers/dma/pl330.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index

[PATCH] arch: s390: mm: Removed useless label

2013-03-13 Thread Alexandru Gheorghiu
Rewrote conditional statement and eliminated the out_kthread label. Signed-off-by: Alexandru Gheorghiu --- arch/s390/mm/cmm.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index 479e942..9d84a1f 100644 --- a/arch/s390/mm

[PATCH] arch: s390: hypfs: Use PTR_RET function

2013-03-13 Thread Alexandru Gheorghiu
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- arch/s390/hypfs/hypfs_dbfs.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/s390/hypfs/hypfs_dbfs.c b/arch/s390/hypfs/hypfs_dbfs.c index

[PATCH] arch: s390: mm: Use PTR_RET function

2013-03-13 Thread Alexandru Gheorghiu
Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- arch/s390/mm/cmm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index 479e942..5cf867f 100644 --- a/arch

[PATCH] arch: s390: net: Replaced kmalloc and memset with kzalloc

2013-03-13 Thread Alexandru Gheorghiu
Used kzalloc instead of kmalloc followed by memset with 0. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- arch/s390/net/bpf_jit_comp.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index

[PATCH] drivers: acpi: Used resource_size function

2013-03-12 Thread Alexandru Gheorghiu
Used resource_size function instead of explicit computation. Signed-off-by: Alexandru Gheorghiu --- drivers/acpi/osl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 586e7e9..4d31748 100644 --- a/drivers/acpi/osl.c +++ b

[PATCH] drivers: acpi: Used PTR_RET function

2013-03-12 Thread Alexandru Gheorghiu
Used PTR_RET function instead of explicit checking with IS_ERR. Signed-off-by: Alexandru Gheorghiu --- drivers/acpi/acpi_pad.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 31de104..27bb6a9 100644 --- a/drivers

[PATCH] drivers: acpi: Replaced kmalloc and memcpy with kmemdup

2013-03-12 Thread Alexandru Gheorghiu
Replaced calls to kmalloc followed by memcpy with a single call to kmemdup. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/acpi/bus.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 01708a1

[PATCH] drivers: mmc: host: Use resource_size()

2013-03-12 Thread Alexandru Gheorghiu
Used resource_size function instead of explicit computation. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/mmc/host/wmt-sdmmc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index

[PATCH] drivers: gpu: drm: i915: Replaced calls to kmalloc & memcpy with kmemdup

2013-03-11 Thread Alexandru Gheorghiu
Replaced calls to kmalloc followed by memcpy with a single call to kmemdup. Also removed a now redundant if statement. Signed-off-by: Alexandru Gheorghiu --- drivers/gpu/drm/i915/intel_dp.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915

[PATCH] drivers: gpu: drm: gma500: Replaced calls kzalloc & memcpy with kmemdup

2013-03-11 Thread Alexandru Gheorghiu
Replaced calls kzalloc followed by memcpy with call to kmemdup. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/gpu/drm/gma500/intel_bios.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu

[PATCH] drivers: gpu: drm: Replaced ERR_PTR & PTR_ERR with ERR_CAST

2013-03-11 Thread Alexandru Gheorghiu
Replaced ERR_PTR and PTR_ERR calls with ERR_CAST. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/gpu/drm/drm_prime.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index 366910d

[PATCH] drivers: gpu: drm: i915: Replaced calls to kmalloc & memcpy with kmemdup

2013-03-11 Thread Alexandru Gheorghiu
Replaced calls to kmalloc followed by memcpy with a single call to kmemdup. This patch was found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/gpu/drm/i915/intel_dp.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b

[PATCH] drivers: gpu: drm: exynos: Replaced kzalloc & memcpy with kmemdup

2013-03-11 Thread Alexandru Gheorghiu
Replaced calls to kzalloc followed by memcpy with call to kmemdup. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu --- drivers/gpu/drm/exynos/exynos_drm_vidi.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c

[PATCH] fs: btrfs: Replaced calls to kmalloc and memcpy with kmemdup

2013-03-10 Thread Alexandru Gheorghiu
Replaced calls to kmalloc followed by memcpy with single call to kmemdup. This patch was found using coccicheck. Signed-off-by: Alexandru Gheorghiu --- fs/btrfs/send.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index f7a8b86

[PATCH] fs: pstore: Replaced calls to kmalloc and memcpy with kmemdup

2013-03-10 Thread Alexandru Gheorghiu
Replaced calls to kmalloc and memcpy with a single call to kmemdup. This patch was found using coccicheck. Signed-off-by: Alexandru Gheorghiu --- fs/pstore/ram.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 288f068..38babb3

[PATCH] fs: fs2fs: Replaced calls to kmalloc and memcpy with kmemdup

2013-03-10 Thread Alexandru Gheorghiu
Replaced calls to kmalloc followd by memcpy with a single call to kmemdup. This patch was found using coccicheck. Signed-off-by: Alexandru Gheorghiu --- fs/ocfs2/localalloc.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2

[PATCH] arch: x86: platform: uv: Replaced kmalloc & memset with kzalloc

2013-03-10 Thread Alexandru Gheorghiu
Replaced kmalloc followed by memset calls with a single kzalloc call. This was found using coccicheck. Signed-off-by: Alexandru Gheorghiu --- arch/x86/platform/uv/uv_time.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/platform/uv/uv_time.c b/arch/x86

[PATCH] Drivers: staging: media: davinci_vpfe: Use resource_size function

2013-03-10 Thread Alexandru Gheorghiu
Use resource_size function on resource object instead of explicit computation. Signed-off-by: Alexandru Gheorghiu --- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b

[PATCH 2/2] :kernel:signal: Fixed coding style issue.

2013-03-04 Thread Alexandru Gheorghiu
Fixed coding style issue by removing trailing whitespaces. Signed-off-by: Alexandru Gheorghiu --- kernel/signal.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index 2ec870a..fd9a953 100644 --- a/kernel/signal.c +++ b/kernel

[PATCH] arch: x86: kernel: smpboot: fixed unused variable warning

2013-03-04 Thread Alexandru Gheorghiu
Removed unused variable 'c' and fixed the following warning: arch/x86/kernel/smpboot.c: In function ‘mwait_play_dead’: arch/x86/kernel/smpboot.c:1370:22: warning: unused variable ‘c’ [-Wunused-variable] Signed-off-by: Alexandru Gheorghiu --- arch/x86/kernel/smpboot.c |1 - 1 fi

[PATCH] net: netfilter: nfnetlink: Fixed warning for nfnl_get_lock

2013-03-04 Thread Alexandru Gheorghiu
Removed unused function nfnl_get_lock which fixed the following warning: net/netfilter/nfnetlink.c:65:22: warning: ‘nfnl_get_lock’ defined but not used [-Wunused-function] Signed-off-by: Alexandru Gheorghiu --- net/netfilter/nfnetlink.c |5 - 1 file changed, 5 deletions(-) diff --git

[PATCH] Staging: silicom: bp_mod: Removed trailing whitespaces

2013-02-26 Thread Alexandru Gheorghiu
Fixed coding style issue. Signed-off-by: Alexandru Gheorghiu --- drivers/staging/silicom/bp_mod.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/silicom/bp_mod.c b/drivers/staging/silicom/bp_mod.c index 58c5f5c..61a912d 100644 --- a/drivers/staging