Re: [PATCH 2/2] scsi:qlogicfas408: remove the same check in qlogicfas408_detect

From: Bart Van Assche
Date: Wed Aug 01 2018 - 23:52:21 EST

On Thu, 2018-08-02 at 11:29 +-0800, zhong jiang wrote:
+AD4- On 2018/8/2 11:21, Bart Van Assche wrote:
+AD4- +AD4- On Thu, 2018-08-02 at 10:45 +-0800, zhong jiang wrote:
+AD4- +AD4- +AD4- we should not use same check in a expression. just remove one
+AD4- +AD4- +AD4- of them.
+AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- Signed-off-by: zhong jiang
+AD4- +AD4- +AD4- ---
+AD4- +AD4- +AD4- drivers/scsi/qlogicfas408.c +AHw- 3 +---
+AD4- +AD4- +AD4- 1 file changed, 1 insertion(+-), 2 deletions(-)
+AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- diff --git a/drivers/scsi/qlogicfas408.c b/drivers/scsi/qlogicfas408.c
+AD4- +AD4- +AD4- index 8b471a9..1409ac1 100644
+AD4- +AD4- +AD4- --- a/drivers/scsi/qlogicfas408.c
+AD4- +AD4- +AD4- +-+-+- b/drivers/scsi/qlogicfas408.c
+AD4- +AD4- +AD4- +AEAAQA- -567,8 +-567,7 +AEAAQA- void qlogicfas408+AF8-setup(int qbase, int id, int int+AF8-type)
+AD4- +AD4- +AD4- int qlogicfas408+AF8-detect(int qbase, int int+AF8-type)
+AD4- +AD4- +AD4- +AHs-
+AD4- +AD4- +AD4- REG1+ADs-
+AD4- +AD4- +AD4- - return (((inb(qbase +- 0xe) +AF4- inb(qbase +- 0xe)) +AD0APQ- 7) +ACYAJg-
+AD4- +AD4- +AD4- - ((inb(qbase +- 0xe) +AF4- inb(qbase +- 0xe)) +AD0APQ- 7))+ADs-
+AD4- +AD4- +AD4- +- return (inb(qbase +- 0xe) +AF4- inb(qbase +- 0xe)) +AD0APQ- 7+ADs-
+AD4- +AD4- +AD4- +AH0-
+AD4- +AD4-
+AD4- +AD4- Does inb() have any side effects?
+AD4- just redundant. is it necessary for this . Maybe I miss something.

If doubletest.cocci came up with this patch, I think that script is
wrong and needs a thorough review.