On 10 July 2017 at 01:22, Sakari Ailus wrote:
> On Sun, Jul 09, 2017 at 05:56:15PM +0530, hari prasath wrote:
>> On 8 July 2017 at 16:31, Sakari Ailus 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 tool.
Signed-off-by: Hari Prasath
---
v1: Replace kmalloc followed by memcpy with kmemdup. Based on
review comments from Alan Cox, this could better be done
On 8 July 2017 at 16:31, Sakari Ailus 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 tool
>>
>
kstrdup kernel primitive can be used to replace kmalloc followed by
string copy. This was reported by coccinelle tool
Signed-off-by: Hari Prasath
---
.../media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git
a
On 07-Jul-2017 5:25 PM, "Alan Cox" 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 think ?
> Yes & thanks
kmemdup can be used to replace kmalloc followed by a memcpy.This was
pointed out by the coccinelle tool.
Signed-off-by: Hari Prasath
---
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
a/drivers/staging