lkml.org 
[lkml]   [2018]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] scsi:qlogicfas408: remove the same check in qlogicfas408_detect
Date
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?

Bart.

\
 
 \ /
  Last update: 2018-08-02 05:23    [W:0.056 / U:1.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site