diff mbox series

[v1] drivers: scsi: remove duplicate logical judgments

Message ID 20230704073752.5498-1-duminjie@vivo.com
State New
Headers show
Series [v1] drivers: scsi: remove duplicate logical judgments | expand

Commit Message

Minjie Du July 4, 2023, 7:37 a.m. UTC
Fix: delate duplicate logical judgments.
Please check this. Thank you!

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 drivers/scsi/qlogicfas408.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Bart Van Assche July 4, 2023, 3:27 p.m. UTC | #1
On 7/4/23 00:37, Minjie Du wrote:
> Please check this.

Without feedback from someone who has access to the datasheet this patch 
probably should not be applied. The repeated inb() calls may be on purpose.

Thanks,

Bart.
diff mbox series

Patch

diff --git a/drivers/scsi/qlogicfas408.c b/drivers/scsi/qlogicfas408.c
index 3e065d5fc..d2f92672b 100644
--- a/drivers/scsi/qlogicfas408.c
+++ b/drivers/scsi/qlogicfas408.c
@@ -594,8 +594,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);
 }
 
 /*