lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171119230415.Horde.a49_HrYh1Mj6zcs0TRSsp0W@gator4166.hostgator.com>
Date:   Sun, 19 Nov 2017 23:04:15 -0600
From:   "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To:     "Rangankar, Manish" <Manish.Rangankar@...ium.com>
Cc:     Dept-Eng QLogic Storage Upstream 
        <QLogic-Storage-Upstream@...ium.com>,
        "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: bnx2i: bnx2i_hwi: use swap macro in
 bnx2i_send_iscsi_nopout


Quoting "Rangankar, Manish" <Manish.Rangankar@...ium.com>:

> On 04/11/17 1:28 AM, "Gustavo A. R. Silva" <garsilva@...eddedor.com> 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 <garsilva@...eddedor.com>
>> ---
>> 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 <Manish.Rangankar@...ium.com>
>

Thank you, Manish.

--
Gustavo A. R. Silva





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ