[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc1f8e81007466172d383cc63a4be246c568a2d4.camel@wdc.com>
Date: Thu, 2 Aug 2018 03:21:50 +0000
From: Bart Van Assche <Bart.VanAssche@....com>
To: "andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
"zhongjiang@...wei.com" <zhongjiang@...wei.com>,
"aacraid@...rosemi.com" <aacraid@...rosemi.com>,
"jejb@...ux.vnet.ibm.com" <jejb@...ux.vnet.ibm.com>,
"john.garry@...wei.com" <john.garry@...wei.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] scsi:qlogicfas408: remove the same check in
qlogicfas408_detect
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@...wei.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?
Bart.
Powered by blists - more mailing lists