Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752341AbdGGNW5 (ORCPT ); Fri, 7 Jul 2017 09:22:57 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:34807 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938AbdGGNWy (ORCPT ); Fri, 7 Jul 2017 09:22:54 -0400 MIME-Version: 1.0 In-Reply-To: <1499428551.5590.15.camel@linux.intel.com> References: <20170707115044.21744-1-gehariprasath@gmail.com> <1499428551.5590.15.camel@linux.intel.com> From: hari prasath Date: Fri, 7 Jul 2017 18:52:52 +0530 Message-ID: Subject: Re: [PATCH] staging: atomisp: replace kmalloc & memcpy with kmemdup To: Alan Cox Cc: linux-media@vger.kernel.org, Julia Lawall , mchehab@kernel.org, linux-kernel@vger.kernel.org, SIMRAN SINGHAL , rvarsha016@gmail.com, devel@driverdev.osuosl.org, "gregkh@linuxfoundation.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 352 Lines: 10 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 for pointing me that. I will send a v2 version. -Hari