[PATCH] ptp: use memdup_user().

2016-05-20 Thread Muhammad Falak R Wani
Use memdup_user to duplicate a memory region from user-space to kernel-space, instead of open coding using kmalloc & copy_from_user. Signed-off-by: Muhammad Falak R Wani --- drivers/ptp/ptp_chardev.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH] wan: cosa: use memdup_user().

2016-05-20 Thread Muhammad Falak R Wani
Use memdup_user to duplicate a memory region from user-space to kernel-space, instead of open coding using kmalloc & copy_from_user. Signed-off-by: Muhammad Falak R Wani --- drivers/net/wan/cosa.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net

[PATCH] brcmfmac: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +-- 1 file changed, 1

[PATCH] net: usb: ch9200: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani --- drivers/net/usb/ch9200.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH] ps3_gelic: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani --- drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] net:liquidio: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani --- drivers/net/ethernet/cavium/liquidio/octeon_device.c | 4 +--- 1 file changed, 1 insertion

[PATCH] net/hsr: Use setup_timer and mod_timer.

2016-05-15 Thread Muhammad Falak R Wani
s a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer() and mod_timer() to setup and arm a timer, making the code compact and aid readablity. Signed-off-by: Muhammad Falak R Wani --- net/hsr/hsr_device.c | 11 +++

[PATCH 3/3] netfilter: ipset: use setup_timer() and mod_timer().

2016-05-13 Thread Muhammad Falak R Wani
mer() and mod_timer() to setup and arm a timer, making the code compact and easier to read. Signed-off-by: Muhammad Falak R Wani --- net/netfilter/ipset/ip_set_list_set.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/netfilter/ipset/ip_set_list_set.c b/net/netfil

[PATCH 1/3] netfilter: ipset: use setup_timer() and mod_timer().

2016-05-13 Thread Muhammad Falak R Wani
mer() and mod_timer() to setup and arm a timer, making the code compact and easier to read. Signed-off-by: Muhammad Falak R Wani --- net/netfilter/ipset/ip_set_bitmap_gen.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/netfilter/ipset/ip_set_bitmap_gen.h b/

[PATCH 2/3] netfilter: ipset: use setup_timer() and mod_timer().

2016-05-13 Thread Muhammad Falak R Wani
mer() and mod_timer() to setup and arm a timer, making the code compact and easier to read. Signed-off-by: Muhammad Falak R Wani --- net/netfilter/ipset/ip_set_hash_gen.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfil