From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Dreier Subject: Re: [PATCH 3rd_time] scsi: fix operator precedence warning Date: Mon, 26 Apr 2010 09:56:12 -0700 Message-ID: References: <1271945825.2889.138.camel@mulgrave.site> <20100422110214.e7c62688.randy.dunlap@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from sj-iport-4.cisco.com ([171.68.10.86]:31561 "EHLO sj-iport-4.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752251Ab0DZQ4Q (ORCPT ); Mon, 26 Apr 2010 12:56:16 -0400 In-Reply-To: <20100422110214.e7c62688.randy.dunlap@oracle.com> (Randy Dunlap's message of "Thu, 22 Apr 2010 11:02:14 -0700") Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Randy Dunlap Cc: James Bottomley , Ravi Anand , Andrew Morton , Linus Torvalds , linux-scsi , linux-kernel@vger.kernel.org, David C Somayajulu , Karen Higgins , Vikas Chaudhary > - *tcp_source_port_num = (uint16_t) mbox_sts[6] >> 16; > + *tcp_source_port_num = (uint16_t) (mbox_sts[6] >> 16); I wonder why we need that cast at all? The fact that tcp_source_port_num is a uint16_t* should cause the value to get truncated properly anyway. But I agree that this patch is a minimal fix for a real bug. -- Roland Dreier || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html