Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755595AbdCWOTX (ORCPT ); Thu, 23 Mar 2017 10:19:23 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:19923 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751505AbdCWOTV (ORCPT ); Thu, 23 Mar 2017 10:19:21 -0400 To: "David S. Miller" Cc: QLogic-Storage-Upstream@cavium.com, "James E.J. Bottomley" , "Martin K. Petersen" , Arnd Bergmann , Ram Amrani , Chad Dupuis , Tomer Tayar , "Mintz\, Yuval" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] qedf: fix wrong le16 conversion From: "Martin K. Petersen" Organization: Oracle Corporation References: <20170320084947.1031363-1-arnd@arndb.de> Date: Thu, 23 Mar 2017 10:19:03 -0400 In-Reply-To: <20170320084947.1031363-1-arnd@arndb.de> (Arnd Bergmann's message of "Mon, 20 Mar 2017 09:49:27 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 902 Lines: 23 Arnd Bergmann writes: > gcc points out that we are converting a 16-bit integer into a 32-bit > little-endian type and assigning that to 16-bit little-endian > will end up with a zero: > > drivers/scsi/qedf/drv_fcoe_fw_funcs.c: In function 'init_initiator_rw_fcoe_task': > include/uapi/linux/byteorder/big_endian.h:32:26: error: large integer implicitly truncated to unsigned type [-Werror=overflow] > t_st_ctx->read_write.rx_id = cpu_to_le32(FCOE_RX_ID); > > The correct solution appears to be to just use a 16-bit byte swap instead. > > Fixes: be086e7c53f1 ("qed*: Utilize Firmware 8.15.3.0") > Signed-off-by: Arnd Bergmann > --- > drivers/scsi/qedf/drv_fcoe_fw_funcs.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Dave: Since you queued the firmware patch, mind taking this fix through your tree? -- Martin K. Petersen Oracle Linux Engineering