Re: [PATCH v2] staging: atomisp: use kstrdup to replace kmalloc and memcpy

2017-07-10 Thread hari prasath
On 10 July 2017 at 01:22, Sakari Ailus <sakari.ai...@iki.fi> wrote: > On Sun, Jul 09, 2017 at 05:56:15PM +0530, hari prasath wrote: >> On 8 July 2017 at 16:31, Sakari Ailus <sakari.ai...@iki.fi> wrote: >> > Hi Hari, >> > >> > On Fri, Jul

[PATCHv3] staging: atomisp: use kstrdup to replace kmalloc and memcpy

2017-07-10 Thread Hari Prasath
kstrdup kernel primitive can be used to replace kmalloc followed by string copy. This was reported by coccinelle tool. Signed-off-by: Hari Prasath <geharipras...@gmail.com> --- v1: Replace kmalloc followed by memcpy with kmemdup. Based on review comments from Al

Re: [PATCH v2] staging: atomisp: use kstrdup to replace kmalloc and memcpy

2017-07-09 Thread hari prasath
On 8 July 2017 at 16:31, Sakari Ailus <sakari.ai...@iki.fi> wrote: > Hi Hari, > > On Fri, Jul 07, 2017 at 08:15:21PM +0530, Hari Prasath wrote: >> kstrdup kernel primitive can be used to replace kmalloc followed by >> string copy. This was reported by coccinelle too

[PATCH v2] staging: atomisp: use kstrdup to replace kmalloc and memcpy

2017-07-07 Thread Hari Prasath
kstrdup kernel primitive can be used to replace kmalloc followed by string copy. This was reported by coccinelle tool Signed-off-by: Hari Prasath <geharipras...@gmail.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 10 +++--- 1 file changed, 3 insertions

Re: [PATCH] staging: atomisp: replace kmalloc & memcpy with kmemdup

2017-07-07 Thread hari prasath
On 07-Jul-2017 5:25 PM, "Alan Cox" <a...@linux.intel.com> wrote: On Fri, 2017-07-07 at 17:20 +0530, Hari Prasath wrote: > kmemdup can be used to replace kmalloc followed by a memcpy.This was > pointed out by the coccinelle tool. And kstrdup could do the job even better I

[PATCH] staging: atomisp: replace kmalloc & memcpy with kmemdup

2017-07-07 Thread Hari Prasath
kmemdup can be used to replace kmalloc followed by a memcpy.This was pointed out by the coccinelle tool. Signed-off-by: Hari Prasath <geharipras...@gmail.com> --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)