Received: by 10.223.164.202 with SMTP id h10csp3384769wrb; Sun, 19 Nov 2017 21:05:09 -0800 (PST) X-Google-Smtp-Source: AGs4zMY0RKO23XqOY9gccri2thf4A+KEOnsVAa0KQaj6JeBlkkj0CY102N89RnoHKtnw9DIu99Ij X-Received: by 10.84.133.111 with SMTP id 102mr12698927plf.136.1511154309125; Sun, 19 Nov 2017 21:05:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511154309; cv=none; d=google.com; s=arc-20160816; b=mLHY+1a3WKBd/NmQPBxo+3E8tAiGXEofN+StW7X8I4FpqB0iB5WVV0pCd+mGV97uhw 09ufFKakqKEkzwpjjPN9fTRdNl73/06RxQ15wnWvH1JD9fT03O4nYUghs2bF/eqcHxfK 6cZlAjM2zKEdi+Kh5/BW40qoCbDp0Vo7pBlAJpJ0k+hfcyRyblyutwT0I232AD68wo6H 2T9kEWsaEGuZYqYrmu5h+WUTfvxEOQvrV8NPCEQug7lrtqe0YTBnL6im8EUkcucnOSNE zDhmVIQqTHugezoqAF3IKtkEoPx86J6VjzTSNSymQawq36XaBPwOPfJ5Fp/y8h/QUTuP khfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :user-agent:in-reply-to:references:subject:cc:to:from:message-id :date:arc-authentication-results; bh=fBv6Ch+Oa2kkrdgRYg+RbWyr1Rbx/QP30DUNxg8aTAk=; b=fWQu1vTAriHlp4oDxwZCMyO/nWWNRs6Q3PECwrIeX6VAt+F8cwCupQ6eI3FxP5Eh+A GxdiknXJWNeN71i/SBPjutLr+a1mkAn69PXSrDJqV6Mkp3d6exRJN/pSzExeeH/Zy7d4 mlL15z92KVx96OlacEpQceOna0+pBUiIyMJRVtPaoykRsSoiYTv/624OFNmjZwXLqB3v SR4LNMxONWxDpn7ZeqZK+/xp0S3yqrLH+AeSC5vUdbPOKCcIY5BetHwMHxy9wrotx2z4 41JBCy+1dgybUNNHPUf8JMA7mX8e6Fgg4Loau1WnB2bk5s5LkgaOwrTIhYedZYMVSXup 3Azw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si7065009pgn.282.2017.11.19.21.04.57; Sun, 19 Nov 2017 21:05:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751092AbdKTFES (ORCPT + 68 others); Mon, 20 Nov 2017 00:04:18 -0500 Received: from gateway36.websitewelcome.com ([192.185.199.121]:28113 "EHLO gateway36.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750764AbdKTFER (ORCPT ); Mon, 20 Nov 2017 00:04:17 -0500 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 71C5E400C9DAD for ; Sun, 19 Nov 2017 23:04:16 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id GeFkezPXqpOTvGeFkegUOR; Sun, 19 Nov 2017 23:04:16 -0600 Received: from gator4166.hostgator.com ([108.167.133.22]:53509) by gator4166.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1eGeFk-0046VP-1s; Sun, 19 Nov 2017 23:04:16 -0600 Received: from 189.175.119.135 ([189.175.119.135]) by gator4166.hostgator.com (Horde Framework) with HTTPS; Sun, 19 Nov 2017 23:04:15 -0600 Date: Sun, 19 Nov 2017 23:04:15 -0600 Message-ID: <20171119230415.Horde.a49_HrYh1Mj6zcs0TRSsp0W@gator4166.hostgator.com> From: "Gustavo A. R. Silva" To: "Rangankar, Manish" Cc: Dept-Eng QLogic Storage Upstream , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: bnx2i: bnx2i_hwi: use swap macro in bnx2i_send_iscsi_nopout References: <20171103195839.GA23385@embeddedor.com> In-Reply-To: User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 108.167.133.22 X-Source-L: Yes X-Exim-ID: 1eGeFk-0046VP-1s X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: gator4166.hostgator.com [108.167.133.22]:53509 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 1 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting "Rangankar, Manish" : > On 04/11/17 1:28 AM, "Gustavo A. R. Silva" wrote: > >> Make use of the swap macro and remove unnecessary variable tmp. >> This makes the code easier to read and maintain. >> >> This code was detected with the help of Coccinelle. >> >> Signed-off-by: Gustavo A. R. Silva >> --- >> drivers/scsi/bnx2i/bnx2i_hwi.c | 9 +++------ >> 1 file changed, 3 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c >> b/drivers/scsi/bnx2i/bnx2i_hwi.c >> index e0640e0..9e3bf53 100644 >> --- a/drivers/scsi/bnx2i/bnx2i_hwi.c >> +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c >> @@ -547,12 +547,9 @@ int bnx2i_send_iscsi_nopout(struct bnx2i_conn >> *bnx2i_conn, >> nopout_wqe->op_attr = ISCSI_FLAG_CMD_FINAL; >> memcpy(nopout_wqe->lun, &nopout_hdr->lun, 8); >> >> - if (test_bit(BNX2I_NX2_DEV_57710, &ep->hba->cnic_dev_type)) { >> - u32 tmp = nopout_wqe->lun[0]; >> - /* 57710 requires LUN field to be swapped */ >> - nopout_wqe->lun[0] = nopout_wqe->lun[1]; >> - nopout_wqe->lun[1] = tmp; >> - } >> + /* 57710 requires LUN field to be swapped */ >> + if (test_bit(BNX2I_NX2_DEV_57710, &ep->hba->cnic_dev_type)) >> + swap(nopout_wqe->lun[0], nopout_wqe->lun[1]); >> >> nopout_wqe->itt = ((u16)task->itt | >> (ISCSI_TASK_TYPE_MPATH << >> -- >> 2.7.4 > > Thanks, > > Acked-by: Manish Rangankar > Thank you, Manish. -- Gustavo A. R. Silva From 1583939136576833433@xxx Mon Nov 13 08:34:33 +0000 2017 X-GM-THRID: 1583076264460990640 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread