Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752155AbdF3RAR (ORCPT ); Fri, 30 Jun 2017 13:00:17 -0400 Received: from mail-dm3nam03on0067.outbound.protection.outlook.com ([104.47.41.67]:56384 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752010AbdF3RAP (ORCPT ); Fri, 30 Jun 2017 13:00:15 -0400 From: "Madhani, Himanshu" To: James Bottomley CC: Arnd Bergmann , Dept-Eng QLA2xxx Upstream , "Martin K. Petersen" , "Trapp, Darren" , "Malavali, Giridhar" , "Grigsby, Duane" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/2] scsi: qla2xxx: remove incorrect byte swap Thread-Topic: [PATCH 1/2] scsi: qla2xxx: remove incorrect byte swap Thread-Index: AQHS8bt7UNqhpaHZlEWqbtS+C61Fx6I9nByAgAAFGIA= Date: Fri, 30 Jun 2017 17:00:12 +0000 Message-ID: References: <20170630161056.30630-1-arnd@arndb.de> <1498840917.8086.3.camel@linux.vnet.ibm.com> In-Reply-To: <1498840917.8086.3.camel@linux.vnet.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.vnet.ibm.com; dkim=none (message not signed) header.d=none;linux.vnet.ibm.com; dmarc=none action=none header.from=cavium.com; x-originating-ip: [73.158.175.154] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR07MB3599;7:YmZRMlw8rsIMDxkKTNovdbZkoCMlGo5OgZ7sxJyNcprCJm1y5LIx58Y+9lcdne5UgNiJBvXQB7o2mC9zpcbxiJ27cJsovkY7QwTPTromhcJShda6XCoGJ8pm9f9YXujiNbC+WYnmLtz0zwp4B8BTfzkgheWrTuwYadAv4nKQSz1tC7ugwi9vdkKmZqPyn10jnOsXLEHRAw/lcUv9y0BmU9q9OMXbBysJWcxc8JaSaRlXZgcjOcQWupE8e7Blb8vE+t8b4qUeV+z5g8sNxpJ7UeJEBMD675dDF4+BizWemjEMCpmEInMkn817MRnoDm55vY2U8bbBwBIIUHH9W3hUJbPii/P37vQxODVR8WXitT/6S6Ygjq5cxmZzv11ONPTlsrdRpWXhHnhFVQw9EQMarZJvvn2zEFbRYTU+A8oJE4ddspa8XJJbl2vhGq8ghtq032aykkK12ikYJpawhWAHl+gibrgus+bA6fpV1j6H6LTU4eubtXgRlFkZ7LisI8Z+ZPCVc4LxZ53DuLceb2no7HmZuWxYMyXnvaG7pO19EgKfUukYwPWS7TxEIlL173p3MsJTx+9/GMe+qySYuwB+QM21uo4DJMlZKMn0jr+twgti9FFFnyBcv0yGeg5Kzawhq23jIxp3ZfXxl2UWKtgT/J7Q0ompCy9OSHyYJ27+rnzuifk2WPxRR+a6txZwI4QPRJ+9YuUtXi5melzLct0HsKcJlUIHiKiA5h72fpQmb/xZ30RAA0VPvb2HwI3cft4MX6TqeGfyExmlBg/aEcLNdVOm2DqPn2AnbnYWdaiBuOo= x-ms-office365-filtering-correlation-id: e6dce368-5136-45e1-6175-08d4bfd97908 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:MWHPR07MB3599; x-ms-traffictypediagnostic: MWHPR07MB3599: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(236129657087228)(104084551191319); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR07MB3599;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR07MB3599; x-forefront-prvs: 0354B4BED2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39850400002)(39410400002)(39400400002)(39840400002)(24454002)(377454003)(377424004)(6246003)(110136004)(38730400002)(2950100002)(53936002)(6916009)(189998001)(229853002)(50986999)(76176999)(54356999)(25786009)(6486002)(77096006)(4326008)(66066001)(33656002)(3280700002)(99286003)(54906002)(2900100001)(6512007)(36756003)(6436002)(83716003)(305945005)(8936002)(3660700001)(6506006)(86362001)(6116002)(102836003)(3846002)(53546010)(7736002)(72206003)(14454004)(81166006)(5660300001)(82746002)(478600001)(2906002)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR07MB3599;H:MWHPR07MB3455.namprd07.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <73BDC75D6C4B57439802F6A536091980@namprd07.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2017 17:00:12.0119 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3599 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v5UH1NEa021051 Content-Length: 1665 Lines: 49 > On Jun 30, 2017, at 9:41 AM, James Bottomley wrote: > > On Fri, 2017-06-30 at 18:10 +0200, Arnd Bergmann wrote: >> cont_pkt->entry_type is an 8-bit field, so doing a 32-bit byteswap >> on it will store incorrect data: >> >> drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq': >> include/uapi/linux/byteorder/big_endian.h:32:26: error: large integer >> implicitly truncated to unsigned type [-Werror=overflow] >> drivers/scsi/qla2xxx/qla_nvme.c:444:27: note: in expansion of macro >> 'cpu_to_le32' >> cont_pkt->entry_type = cpu_to_le32(CONTINUE_A64_TYPE); >> >> This removes the erroneous cpu_to_le32(). >> >> Fixes: e84067d74301 ("scsi: qla2xxx: Add FC-NVMe F/W initialization >> and transport registration") >> Signed-off-by: Arnd Bergmann >> --- >> drivers/scsi/qla2xxx/qla_nvme.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/scsi/qla2xxx/qla_nvme.c >> b/drivers/scsi/qla2xxx/qla_nvme.c >> index 1da8fa8f641d..14e25e32e622 100644 >> --- a/drivers/scsi/qla2xxx/qla_nvme.c >> +++ b/drivers/scsi/qla2xxx/qla_nvme.c >> @@ -441,7 +441,7 @@ static int qla2x00_start_nvme_mq(srb_t *sp) >> req->ring_ptr++; >> } >> cont_pkt = (cont_a64_entry_t *)req- >>> ring_ptr; >> - cont_pkt->entry_type = >> cpu_to_le32(CONTINUE_A64_TYPE); >> + cont_pkt->entry_type = CONTINUE_A64_TYPE; >> > > We already have a patch proposed for this, but I think it may be wrong > (it's the same as yours, so yours may be wrong too) see the handling in > qla_iocb.c > > James I will send patch which has correct usage in qla_iocb.c shortly. Thanks, - Himanshu