From: zhong jiang <zhongjiang@huawei.com>
To: <andy.shevchenko@gmail.com>, <john.garry@huawei.com>,
<jejb@linux.vnet.ibm.com>, <martin.petersen@oracle.com>,
<aacraid@microsemi.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] scsi:qlogicfas408: remove the same check in qlogicfas408_detect
Date: Thu, 2 Aug 2018 10:45:01 +0800 [thread overview]
Message-ID: <1533177901-19514-3-git-send-email-zhongjiang@huawei.com> (raw)
In-Reply-To: <1533177901-19514-1-git-send-email-zhongjiang@huawei.com>
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;
}
/*
--
1.7.12.4
next prev parent reply other threads:[~2018-08-02 2:56 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 ` zhong jiang [this message]
2018-08-02 3:21 ` [PATCH 2/2] scsi:qlogicfas408: remove the same check in qlogicfas408_detect Bart Van Assche
2018-08-02 3:29 ` zhong jiang
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=1533177901-19514-3-git-send-email-zhongjiang@huawei.com \
--to=zhongjiang@huawei.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
all inboxes | Powered by JetHome®