Drivers: comedi: drivers: ssv_dnp: fixed a brace coding style issue
PATCH 1/1 Drivers: comedi: drivers: ssv_dnp: fixed a brace coding style issue
From: dimaaac <[email protected]>
Fixed a coding style issue, as well as a typo (lowercased word) and removed unnecessary filename comment.
Signed-off-by dimaaac <[email protected]>
--- drivers/comedi/drivers/ssv_dnp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/comedi/drivers/ssv_dnp.c +4 -6
@@ -1,7 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* ssv_dnp.c -* generic comedi driver for SSV Embedded Systems' DIL/Net-PCs +* Generic comedi driver for SSV Embedded Systems' DIL/Net-PCs * Copyright (C) 2001 Robert Schwebel <[email protected]> * * COMEDI - Linux Control and Measurement Device Interface
@@ -91,13 +90,13 @@ static int dnp_dio_insn_config(struct comedi_device *dev,if (ret)return ret; -if (chan <8 ) {/* Port A */ +if (chan <8 )/* Port A */ mask =1 << chan;outb (PAMR ,CSCIR ); - }else if (chan <16 ) {/* Port B */ + else if (chan < 16) /* Port B */ mask =1 << (chan -8 );outb (PBMR ,CSCIR ); - }else {/* Port C */ + else/* Port C */ /* * We have to pay attention with port C. * This is the meaning of PCMR:
@@ -109,7 +108,6 @@ static int dnp_dio_insn_config(struct comedi_device *dev,*/ mask =1 << ((chan -16 ) *2 );outb (PCMR ,CSCIR ); - } val =inb (CSCDR );if (data[0 ] ==COMEDI_OUTPUT )
Signature · 1 line
2.42.0
Le 31/10/2023 à 17:25, [email protected] a écrit :
Quoted 27 lines
From: dimaaac <[email protected]>
Fixed a coding style issue, as well as a typo (lowercased word) and removed unnecessary filename comment.
Signed-off-by dimaaac <[email protected]>--- drivers/comedi/drivers/ssv_dnp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/comedi/drivers/ssv_dnp.c +1
-2@@ -1,7 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* ssv_dnp.c -* generic comedi driver for SSV Embedded Systems' DIL/Net-PCs +* Generic comedi driver for SSV Embedded Systems' DIL/Net-PCs * Copyright (C) 2001 Robert Schwebel <[email protected]> * * COMEDI - Linux Control and Measurement Device Interface @@ -91,13 +90,13 @@ static int dnp_dio_insn_config(struct comedi_device *dev,if (ret)return ret;
drivers/comedi/drivers/ssv_dnp.c static int dnp_dio_insn_config(struct comedi_device *dev, · line 99
Quoted 10 lines
drivers/comedi/drivers/ssv_dnp.c +3
-3-if (chan <8 ) {/* Port A */ +if (chan <8 )/* Port A */ mask =1 << chan;outb (PAMR ,CSCIR ); - }else if (chan <16 ) {/* Port B */ + else if (chan < 16) /* Port B */ mask =1 << (chan -8 );outb (PBMR ,CSCIR ); - }else {/* Port C */ + else/* Port C */
Hi,
did you compile your change?
I don't think that it compiles. The {} looks needed here.
CJ
Quoted 11 lines
drivers/comedi/drivers/ssv_dnp.c +0
-1/* * We have to pay attention with port C. * This is the meaning of PCMR: @@ -109,7 +108,6 @@ static int dnp_dio_insn_config(struct comedi_device *dev,*/ mask =1 << ((chan -16 ) *2 );outb (PCMR ,CSCIR ); - } val =inb (CSCDR );if (data[0 ] ==COMEDI_OUTPUT )