Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756555Ab2F0JIh (ORCPT ); Wed, 27 Jun 2012 05:08:37 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:34044 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754591Ab2F0JIf (ORCPT ); Wed, 27 Jun 2012 05:08:35 -0400 Date: Wed, 27 Jun 2012 12:08:25 +0300 From: Dan Carpenter To: Neela Syam Kolli Cc: "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch -resend] [SCSI] megaraid: cleanup type issue in mega_build_cmd() Message-ID: <20120627090824.GR31212@elgon.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120627085800.GA3007@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1206 Lines: 35 On 64 bit systems the current code sets 32 bits of "seg" and leaves the other 32 uninitialized. It doesn't matter since the variable is never used. But it's still messy and we should fix it. Signed-off-by: Dan Carpenter --- Originally sent on Fri, 2 Mar 2012. diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 4d39a9f..97825f1 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -524,7 +524,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy) mega_passthru *pthru; scb_t *scb; mbox_t *mbox; - long seg; + u32 seg; char islogical; int max_ldrv_num; int channel = 0; @@ -858,7 +858,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy) /* Calculate Scatter-Gather info */ mbox->m_out.numsgelements = mega_build_sglist(adapter, scb, - (u32 *)&mbox->m_out.xferaddr, (u32 *)&seg); + (u32 *)&mbox->m_out.xferaddr, &seg); return scb; -- 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/