lkml.org 
[lkml]   [2015]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 08/31] arch/x86/intel-mid: use kmemdup rather than duplicating its implementation
From
Date
Ping.

Regards
Andrzej

On 08/07/2015 09:59 AM, Andrzej Hajda wrote:
> The patch was generated using fixed coccinelle semantic patch
> scripts/coccinelle/api/memdup.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> arch/x86/platform/intel-mid/sfi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c
> index ce992e8..5ee360a 100644
> --- a/arch/x86/platform/intel-mid/sfi.c
> +++ b/arch/x86/platform/intel-mid/sfi.c
> @@ -197,10 +197,9 @@ static int __init sfi_parse_gpio(struct sfi_table_header *table)
> num = SFI_GET_NUM_ENTRIES(sb, struct sfi_gpio_table_entry);
> pentry = (struct sfi_gpio_table_entry *)sb->pentry;
>
> - gpio_table = kmalloc(num * sizeof(*pentry), GFP_KERNEL);
> + gpio_table = kmemdup(pentry, num * sizeof(*pentry), GFP_KERNEL);
> if (!gpio_table)
> return -1;
> - memcpy(gpio_table, pentry, num * sizeof(*pentry));
> gpio_num_entry = num;
>
> pr_debug("GPIO pin info:\n");



\
 
 \ /
  Last update: 2015-09-16 12:01    [W:0.911 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site