From patchwork Tue Jun 1 03:23:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 103379 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o513x8Eb005438 for ; Tue, 1 Jun 2010 03:59:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755438Ab0FAD14 (ORCPT ); Mon, 31 May 2010 23:27:56 -0400 Received: from mail.perches.com ([173.55.12.10]:2464 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754073Ab0FADXZ (ORCPT ); Mon, 31 May 2010 23:23:25 -0400 Received: from localhost.localdomain (new-host-11.home [192.168.1.151]) by mail.perches.com (Postfix) with ESMTP id 8125724368; Mon, 31 May 2010 20:23:16 -0700 (PDT) From: Joe Perches To: linux-kernel@vger.kernel.org Cc: Avi Kivity , Marcelo Tosatti , Alexander Graf , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Subject: [PATCH 02/21] arch/powerpc: Remove unnecessary kmalloc casts Date: Mon, 31 May 2010 20:23:04 -0700 Message-Id: <501897eab758c1e5038e041cede8aa2a4f5bde3c.1275360951.git.joe@perches.com> X-Mailer: git-send-email 1.7.0.3.311.g6a6955 In-Reply-To: References: Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 01 Jun 2010 03:59:09 +0000 (UTC) diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index 9cf197f..99c6dab 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c @@ -502,8 +502,7 @@ static int __init nvram_scan_partitions(void) "detected: 0-length partition\n"); goto out; } - tmp_part = (struct nvram_partition *) - kmalloc(sizeof(struct nvram_partition), GFP_KERNEL); + tmp_part = kmalloc(sizeof(struct nvram_partition), GFP_KERNEL); err = -ENOMEM; if (!tmp_part) { printk(KERN_ERR "nvram_scan_partitions: kmalloc failed\n"); diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index b998abf..2a8b9b6 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c @@ -1248,8 +1248,8 @@ struct kvm_vcpu *kvmppc_core_vcpu_create(struct kvm *kvm, unsigned int id) memset(vcpu_book3s, 0, sizeof(struct kvmppc_vcpu_book3s)); - vcpu_book3s->shadow_vcpu = (struct kvmppc_book3s_shadow_vcpu *) - kzalloc(sizeof(*vcpu_book3s->shadow_vcpu), GFP_KERNEL); + vcpu_book3s->shadow_vcpu = kzalloc(sizeof(*vcpu_book3s->shadow_vcpu), + GFP_KERNEL); if (!vcpu_book3s->shadow_vcpu) goto free_vcpu;