Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932104Ab3CLF0j (ORCPT ); Tue, 12 Mar 2013 01:26:39 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:34643 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752813Ab3CLF0i (ORCPT ); Tue, 12 Mar 2013 01:26:38 -0400 X-IronPort-AV: E=Sophos;i="4.84,827,1355068800"; d="scan'208";a="6856423" Message-ID: <513EBC2F.6030601@cn.fujitsu.com> Date: Tue, 12 Mar 2013 13:25:03 +0800 From: Zhang Yanfei User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.8) Gecko/20121012 Thunderbird/10.0.8 MIME-Version: 1.0 To: "James E.J. Bottomley" , Andrew Morton CC: linux-scsi@vger.kernel.org, "linux-kernel@vger.kernel.org" Subject: [PATCH 12/18] driver: scsi: remove cast for kmalloc/kzalloc return value References: <513EB23D.7020303@cn.fujitsu.com> In-Reply-To: <513EB23D.7020303@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/12 13:25:23, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/12 13:25:24, Serialize complete at 2013/03/12 13:25:24 Content-Transfer-Encoding: 7bit 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: 1555 Lines: 46 remove cast for kmalloc/kzalloc return value. Signed-off-by: Zhang Yanfei Cc: "James E.J. Bottomley" Cc: Andrew Morton Cc: linux-scsi@vger.kernel.org --- drivers/scsi/hpsa.c | 3 +-- drivers/scsi/lpfc/lpfc_init.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 7f4f790..7a5a002 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -3071,8 +3071,7 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h, void __user *argp) return -EINVAL; if (!capable(CAP_SYS_RAWIO)) return -EPERM; - ioc = (BIG_IOCTL_Command_struct *) - kmalloc(sizeof(*ioc), GFP_KERNEL); + ioc = kmalloc(sizeof(*ioc), GFP_KERNEL); if (!ioc) { status = -ENOMEM; goto cleanup1; diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 314b4f6..f9a3b30 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4674,7 +4674,7 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) } if (!phba->sli.ring) - phba->sli.ring = (struct lpfc_sli_ring *) + phba->sli.ring = kzalloc(LPFC_SLI3_MAX_RING * sizeof(struct lpfc_sli_ring), GFP_KERNEL); if (!phba->sli.ring) -- 1.7.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/