Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422693AbbHGIAs (ORCPT ); Fri, 7 Aug 2015 04:00:48 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:28638 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422659AbbHGIAp (ORCPT ); Fri, 7 Aug 2015 04:00:45 -0400 X-AuditID: cbfec7f5-f794b6d000001495-c7-55c4659651de From: Andrzej Hajda To: Tony Luck , Fenghua Yu Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org Subject: [PATCH 02/31] arch/ia64/tioce: use kmemdup rather than duplicating its implementation Date: Fri, 07 Aug 2015 09:59:08 +0200 Message-id: <1438934377-4922-3-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1438934377-4922-1-git-send-email-a.hajda@samsung.com> References: <1438934377-4922-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupiluLIzCtJLcpLzFFi42I5/e/4Fd1pqUdCDe7vNbW4te4cq8XGGetZ LdqmOVp86HjHanF51xw2i7VH7rJbvLlwj8WB3WPxnpdMHn1bVjF6fN4kF8AcxWWTkpqTWZZa pG+XwJXx/PkZxoKHHBUPds1ibWDcx97FyMkhIWAi8WnyLEYIW0ziwr31bF2MXBxCAksZJW5c 6WKHcJqYJDZcaGYFqWIT0JT4u/kmG4gtIuAmMefUF0aQImaBU4wSh1++AysSFkiQ2HqrjRnE ZhFQlTh3v5cFxOYVcJJY8P8IC8Q6OYmTxyaD1XMKOEus7J4JZgsB1bzpu8A8gZF3ASPDKkbR 1NLkguKk9FwjveLE3OLSvHS95PzcTYyQEPq6g3HpMatDjAIcjEo8vAn/DocKsSaWFVfmHmKU 4GBWEuF9qA8U4k1JrKxKLcqPLyrNSS0+xCjNwaIkzjtz1/sQIYH0xJLU7NTUgtQimCwTB6dU A2OcSFm7nMNmO629L3xsC8WLt85+/eGwx430r7pRp8UFPnH8/hGpGHqeLWLV+d2Gka9vnT92 kv0D3+EHZ2KcN79hrr59NWxO89b8H+Vqpgoy3It2J4Y9SxE32XrAdOcLiU61WRmaqku83Zwe qix6JPW/0Glj3AIn9oLF3BG2ST/3l87+n3z7dagSS3FGoqEWc1FxIgAaZ55cHQIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1335 Lines: 36 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 --- arch/ia64/sn/pci/tioce_provider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c index 46d3df4..2f13276 100644 --- a/arch/ia64/sn/pci/tioce_provider.c +++ b/arch/ia64/sn/pci/tioce_provider.c @@ -1000,11 +1000,11 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont * Allocate kernel bus soft and copy from prom. */ - tioce_common = kzalloc(sizeof(struct tioce_common), GFP_KERNEL); + tioce_common = kmemdup(prom_bussoft, sizeof(struct tioce_common), + GFP_KERNEL); if (!tioce_common) return NULL; - memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common)); tioce_common->ce_pcibus.bs_base = (unsigned long) ioremap(REGION_OFFSET(tioce_common->ce_pcibus.bs_base), sizeof(struct tioce_common)); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/