From: zhong jiang <zhongjiang@huawei.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
"aacraid@microsemi.com" <aacraid@microsemi.com>,
"jejb@linux.vnet.ibm.com" <jejb@linux.vnet.ibm.com>,
"john.garry@huawei.com" <john.garry@huawei.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] scsi:qlogicfas408: remove the same check in qlogicfas408_detect
Date: Thu, 2 Aug 2018 11:29:54 +0800 [thread overview]
Message-ID: <5B627AB2.8000101@huawei.com> (raw)
In-Reply-To: <dc1f8e81007466172d383cc63a4be246c568a2d4.camel@wdc.com>
On 2018/8/2 11:21, Bart Van Assche wrote:
> On Thu, 2018-08-02 at 10:45 +0800, zhong jiang wrote:
>> we should not use same check in a expression. just remove one
>> of them.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>> drivers/scsi/qlogicfas408.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/scsi/qlogicfas408.c b/drivers/scsi/qlogicfas408.c
>> index 8b471a9..1409ac1 100644
>> --- a/drivers/scsi/qlogicfas408.c
>> +++ b/drivers/scsi/qlogicfas408.c
>> @@ -567,8 +567,7 @@ void qlogicfas408_setup(int qbase, int id, int int_type)
>> int qlogicfas408_detect(int qbase, int int_type)
>> {
>> REG1;
>> - return (((inb(qbase + 0xe) ^ inb(qbase + 0xe)) == 7) &&
>> - ((inb(qbase + 0xe) ^ inb(qbase + 0xe)) == 7));
>> + return (inb(qbase + 0xe) ^ inb(qbase + 0xe)) == 7;
>> }
> Does inb() have any side effects?
just redundant. is it necessary for this . Maybe I miss something.
Thanks,
zhong jiang
> Bart.
>
>
>
next prev parent reply other threads:[~2018-08-02 3:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 2:44 [PATCH 0/2] remove double test condition zhong jiang
2018-08-02 2:45 ` [PATCH 1/2] scsi:qla1280: remove unnessary same condition check zhong jiang
2018-08-02 3:22 ` Bart Van Assche
2018-08-02 2:45 ` [PATCH 2/2] scsi:qlogicfas408: remove the same check in qlogicfas408_detect zhong jiang
2018-08-02 3:21 ` Bart Van Assche
2018-08-02 3:29 ` zhong jiang [this message]
2018-08-02 3:52 ` Bart Van Assche
2018-08-02 4:00 ` zhong jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5B627AB2.8000101@huawei.com \
--to=zhongjiang@huawei.com \
--cc=Bart.VanAssche@wdc.com \
--cc=aacraid@microsemi.com \
--cc=andy.shevchenko@gmail.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox