[PATCH] staging: rtl8712: Remove explicit NULL comparison

2017-07-07 Thread Muhammad Falak R Wani
Replace the explicit "if (val != NULL)" with if (val). Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/staging/rtl8712/rtl8712_xmit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b

[PATCH] staging: rtl8712: Remove explicit NULL comparison

2017-07-07 Thread Muhammad Falak R Wani
Replace the explicit "if (val != NULL)" with if (val). Signed-off-by: Muhammad Falak R Wani --- drivers/staging/rtl8712/rtl8712_xmit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8

Re: [PATCH] xen/privcmd: use vma_pages().

2016-05-23 Thread Muhammad Falak R Wani
On Mon, May 23, 2016 at 04:26:37PM -0400, Boris Ostrovsky wrote: > On 05/21/2016 09:09 AM, Muhammad Falak R Wani wrote: > > Replace explicit computation of vma page count by a call to > > vma_pages() > > > > Can you combine all three patches into a single one? >

Re: [PATCH] xen/privcmd: use vma_pages().

2016-05-23 Thread Muhammad Falak R Wani
On Mon, May 23, 2016 at 04:26:37PM -0400, Boris Ostrovsky wrote: > On 05/21/2016 09:09 AM, Muhammad Falak R Wani wrote: > > Replace explicit computation of vma page count by a call to > > vma_pages() > > > > Can you combine all three patches into a single one? >

[PATCH v2] xen: use vma_pages().

2016-05-23 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages(). Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/xen/gntalloc.c | 2 +- drivers/xen/gntdev.c | 2 +- drivers/xen/privcmd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v2] xen: use vma_pages().

2016-05-23 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages(). Signed-off-by: Muhammad Falak R Wani --- drivers/xen/gntalloc.c | 2 +- drivers/xen/gntdev.c | 2 +- drivers/xen/privcmd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/xen/gntalloc.c b

[PATCH v2] dma-buf: use vma_pages().

2016-05-23 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages(). Also, include Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/dma-buf/dma-buf.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/d

[PATCH v2] dma-buf: use vma_pages().

2016-05-23 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages(). Also, include Signed-off-by: Muhammad Falak R Wani --- drivers/dma-buf/dma-buf.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index

[PATCH] drivers: dma-coherent: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/base/dma-coherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c

[PATCH] dma-buf: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/dma-buf/dma-buf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c

[PATCH] drivers: dma-coherent: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/base/dma-coherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index bdf28f7..db122a0

[PATCH] dma-buf: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/dma-buf/dma-buf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 4a2c07e..b0317ec

[PATCH] dma-mapping: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/base/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c

[PATCH] dma-mapping: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/base/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index d799662..1d82f7e 100644

[PATCH] drm/gma500: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/gpu/drm/gma500/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/g

[PATCH] drm/gma500: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/gma500/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c

[PATCH] HSI: cmt_speech: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/hsi/clients/cmt_speech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/c

[PATCH] HSI: cmt_speech: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/hsi/clients/cmt_speech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c index 95638df

[PATCH] misc: mic: scif: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/misc/mic/scif/scif_mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mic/scif/scif_mmap.c b/drivers/mi

[PATCH] misc: mic: scif: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/misc/mic/scif/scif_mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mic/scif/scif_mmap.c b/drivers/misc/mic/scif/scif_mmap.c index

[PATCH] xen/gntdev: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/xen/gntdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 6793957..b

[PATCH] xen/gntalloc: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/xen/gntalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c index 4

[PATCH] xen/privcmd: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/xen/privcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index df2e6f7..7

[PATCH] xen/privcmd: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/xen/privcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index df2e6f7..702040f 100644 --- a/drivers

[PATCH] xen/gntdev: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/xen/gntdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 6793957..bb95212 100644 --- a/drivers/xen

[PATCH] xen/gntalloc: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/xen/gntalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c index 4547a91..7a47c4c 100644 --- a/drivers

[PATCH v2] ks390/keyboard: use memdup_user_nul().

2016-05-20 Thread Muhammad Falak R Wani
Use memdup_user_nul to duplicate a memory region from user-space to kernel-space and terminate with a NULL, instead of open coding using kmalloc + copy_from_user and explicitly NULL terminating. Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/s390/char/keyboard.

[PATCH v2] ks390/keyboard: use memdup_user_nul().

2016-05-20 Thread Muhammad Falak R Wani
Use memdup_user_nul to duplicate a memory region from user-space to kernel-space and terminate with a NULL, instead of open coding using kmalloc + copy_from_user and explicitly NULL terminating. Signed-off-by: Muhammad Falak R Wani --- drivers/s390/char/keyboard.c | 11 +++ 1 file

Re: [PATCH] ks390/keyboard: use memdup_user().

2016-05-20 Thread Muhammad Falak R Wani
On Fri, May 20, 2016 at 03:03:25PM +0200, Heiko Carstens wrote: > On Fri, May 20, 2016 at 05:52:16PM +0530, Muhammad Falak R Wani wrote: > > Use memdup_user to duplicate a memory region from user-space to > > kernel-space, instead of open coding using kmalloc & copy_from_user.

Re: [PATCH] ks390/keyboard: use memdup_user().

2016-05-20 Thread Muhammad Falak R Wani
On Fri, May 20, 2016 at 03:03:25PM +0200, Heiko Carstens wrote: > On Fri, May 20, 2016 at 05:52:16PM +0530, Muhammad Falak R Wani wrote: > > Use memdup_user to duplicate a memory region from user-space to > > kernel-space, instead of open coding using kmalloc & copy_from_user.

[PATCH] tty/vt/keyboard: 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 <falakre...@gmail.com> --- drivers/tty/vt/keyboard.c | 14 -- 1 file changed, 4 insertions(+), 10

[PATCH] tty/vt/keyboard: 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/tty/vt/keyboard.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH] ks390/keyboard: 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 <falakre...@gmail.com> --- drivers/s390/char/keyboard.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletion

[PATCH] ks390/keyboard: 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/s390/char/keyboard.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/

[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 <falakre...@gmail.com> --- drivers/ptp/ptp_chardev.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletion

[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 <falakre...@gmail.com> --- drivers/net/wan/cosa.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletion

[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] VMCI: 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 <falakre...@gmail.com> --- drivers/misc/vmw_vmci/vmci_host.c | 14 -- 1 file changed, 4 inserti

[PATCH] VMCI: 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/misc/vmw_vmci/vmci_host.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff -

[PATCH] [SCSI] aacraid: 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 <falakre...@gmail.com> --- drivers/scsi/aacraid/commctrl.c | 7 +++ 1 file chan

[PATCH] [SCSI] aacraid: 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/scsi/aacraid/commctrl.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[PATCH] [SCSI] aic7xxx: 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 <falakre...@gmail.com> --- drivers/scsi/aic7xxx/aic7xxx_core.c | 4 ++-- 1 file chan

[PATCH] [SCSI] aic7xxx: 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/scsi/aic7xxx/aic7xxx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] [SCSI] aic79xx: 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 <falakre...@gmail.com> --- drivers/scsi/aic7xxx/aic79xx_core.c | 4 ++-- 1 file chan

[PATCH] [SCSI] aic79xx: 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/scsi/aic7xxx/aic79xx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] USB: serial: cp210x: 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 <falakre...@gmail.com> --- drivers/usb/serial/cp210x.c | 4 +--- 1 file changed, 1 insertion

[PATCH] USB: serial: cp210x: 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/usb/serial/cp210x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[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 <falakre...@gmail.com> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3

[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 <falakre...@gmail.com> --- drivers/net/usb/ch9200.c | 3 +-- 1 file changed, 1 insertion

[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

[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 <falakre...@gmail.com> --- drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | 4 ++--

[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 <falakre...@gmail.com> --- drivers/net/ethernet/cavium/liquidio/octeon_device.c | 4 +---

[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] mptbase: 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 <falakre...@gmail.com> --- drivers/message/fusion/mptbase.c | 3 +-- 1 file changed, 1 ins

[PATCH] mptbase: 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/message/fusion/mptbase.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH] drivers/memstick/core/mspro_block: 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 <falakre...@gmail.com> --- drivers/memstick/core/mspro_block.c | 3 +-- 1 file changed, 1 ins

[PATCH] drivers/memstick/core/mspro_block: 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/memstick/core/mspro_block.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH] drm/vmwgfx: 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 <falakre...@gmail.com> --- drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 7 +++ 1 file chan

[PATCH] drm/vmwgfx: 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/gpu/drm/vmwgfx/vmwgfx_mob.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

Re: [PATCH] amdgpu/uvd: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
On Thu, May 19, 2016 at 01:18:10PM +0200, Christian König wrote: > Am 19.05.2016 um 13:11 schrieb 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 >

Re: [PATCH] amdgpu/uvd: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
On Thu, May 19, 2016 at 01:18:10PM +0200, Christian König wrote: > Am 19.05.2016 um 13:11 schrieb 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 >

[PATCH] drm/amd/powerplay/hwmgr: 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 <falakre...@gmail.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 6 +++---

[PATCH] drm/amd/powerplay/hwmgr: 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/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 6 +++--- 1 file changed, 3 insertions

[PATCH] drm/amd/powerplay/hwmgr: 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 <falakre...@gmail.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 6 +++---

[PATCH] drm/amd/powerplay/hwmgr: 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 <falakre...@gmail.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 6 +++---

[PATCH] drm/amd/powerplay/hwmgr: 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/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 6 +++--- 1 file changed, 3 insertions

[PATCH] drm/amd/powerplay/hwmgr: 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/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 6 +++--- 1 file changed, 3 insertions

[PATCH] amdgpu/uvd: 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 <falakre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 +--- 1 file chan

[PATCH] amdgpu/uvd: 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/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH 4/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c b/drivers/gpu/drm/amd/

[PATCH 5/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c b/drivers/gpu/drm/amd/

[PATCH 4/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c index

[PATCH 5/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c index 55cdab8

[PATCH 2/5] drm/amd/amdgpu/cz_dpm: Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret' from functions where it was not used anyway, and directly return 0. Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/g

[PATCH 3/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cz_ih.c b/drivers/gpu/drm/amd/amdgpu/c

[PATCH 2/5] drm/amd/amdgpu/cz_dpm: Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret' from functions where it was not used anyway, and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c b

[PATCH 3/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cz_ih.c b/drivers/gpu/drm/amd/amdgpu/cz_ih.c index 23bd912..964956f

[PATCH 1/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik_ih.c b/drivers/gpu/drm/amd/

[PATCH 1/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik_ih.c b/drivers/gpu/drm/amd/amdgpu/cik_ih.c index f2f14fe

Re: [PATCH v2] drm/amd/powerplay: use ARRAY_SIZE() to calculate array size.

2016-05-17 Thread Muhammad Falak R Wani
On Mon, May 16, 2016 at 04:53:50PM +0100, Eric Engestrom wrote: > On Fri, May 13, 2016 at 11:06:40PM +0530, Muhammad Falak R Wani wrote: > > It is preferred to use ARRAY_SIZE() for size calculation, instead > > using sizeof(array)/sizeof(*array). It makes the code more readable.

Re: [PATCH v2] drm/amd/powerplay: use ARRAY_SIZE() to calculate array size.

2016-05-17 Thread Muhammad Falak R Wani
On Mon, May 16, 2016 at 04:53:50PM +0100, Eric Engestrom wrote: > On Fri, May 13, 2016 at 11:06:40PM +0530, Muhammad Falak R Wani wrote: > > It is preferred to use ARRAY_SIZE() for size calculation, instead > > using sizeof(array)/sizeof(*array). It makes the code more readable.

Re: [PATCH] tools: testing: define the _GNU_SOURCE macro

2016-05-16 Thread Muhammad Falak R Wani
On Mon, May 16, 2016 at 07:27:25AM -0600, Shuah Khan wrote: > On 05/13/2016 06:05 AM, Muhammad Falak R Wani wrote: > > Add the macro _GNU_SOURCE, so that compilation does not terminate. > > What error are you seeing? Could you please send the compilation > error log. >

Re: [PATCH] tools: testing: define the _GNU_SOURCE macro

2016-05-16 Thread Muhammad Falak R Wani
On Mon, May 16, 2016 at 07:27:25AM -0600, Shuah Khan wrote: > On 05/13/2016 06:05 AM, Muhammad Falak R Wani wrote: > > Add the macro _GNU_SOURCE, so that compilation does not terminate. > > What error are you seeing? Could you please send the compilation > error log. >

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

2016-05-15 Thread Muhammad Falak R Wani
ore 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 <falakre...@gmail.com> --- net/hsr/hsr

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

2016-05-15 Thread Muhammad Falak R Wani
ore 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 +++ 1 f

[PATCH] sound: oss: Use setup_timer and mod_timer.

2016-05-15 Thread Muhammad Falak R Wani
ore 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 <falakre...@gmail.com> --- sound/oss/wav

[PATCH] sound: oss: Use setup_timer and mod_timer.

2016-05-15 Thread Muhammad Falak R Wani
ore 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 --- sound/oss/waveartist.c | 8 +++- 1 f

[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 <falakre...@gmail.com> --- net/netfilter/ipset/ip_set_list_set.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/netfil

[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 <falakre...@gmail.com> --- net/netfilter/ipset/ip_set_bitmap_gen.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/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 <falakre...@gmail.com> --- net/netfilter/ipset/ip_set_hash_gen.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/netfil

[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

[PATCH v2] drm/amd/powerplay: use ARRAY_SIZE() to calculate array size.

2016-05-13 Thread Muhammad Falak R Wani
It is preferred to use ARRAY_SIZE() for size calculation, instead using sizeof(array)/sizeof(*array). It makes the code more readable. Signed-off-by: Muhammad Falak R Wani <falakre...@gmail.com> --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 2 +- 1 file changed, 1 insertion

[PATCH v2] drm/amd/powerplay: use ARRAY_SIZE() to calculate array size.

2016-05-13 Thread Muhammad Falak R Wani
It is preferred to use ARRAY_SIZE() for size calculation, instead using sizeof(array)/sizeof(*array). It makes the code more readable. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-13 Thread Muhammad Falak R Wani
On Thu, May 12, 2016 at 12:53:48PM +0300, Jani Nikula wrote: > On Wed, 11 May 2016, Muhammad Falak R Wani <falakre...@gmail.com> wrote: > > Use ARRAY_SIZE() for the size calculation of the array. Also move the > > condition evaulation function out of the for loop. > >

Re: [PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-13 Thread Muhammad Falak R Wani
On Thu, May 12, 2016 at 12:53:48PM +0300, Jani Nikula wrote: > On Wed, 11 May 2016, Muhammad Falak R Wani wrote: > > Use ARRAY_SIZE() for the size calculation of the array. Also move the > > condition evaulation function out of the for loop. > > Although, any respectable c-co

  1   2   3   >