staging: comedi: ni_tio: Reformat function call arguments
PATCH 1/1 staging: comedi: ni_tio: Reformat function call arguments
Reformat function call arguments so that the function call is clearly visible. Issue detected by checkpatch.
Signed-off-by Deepak R Varma <[email protected]>
--- drivers/staging/comedi/drivers/ni_tio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/comedi/drivers/ni_tio.c +4 -4
@@ -1342,8 +1342,8 @@ static int ni_m_gate2_to_generic_gate(unsigned int gate, unsigned int *src)static inline unsigned int ni_tio_get_gate_mode (struct ni_gpct *counter) { -unsigned int mode =ni_tio_get_soft_copy ( - counter,NITIO_MODE_REG (counter->counter_index)); +unsigned int mode =ni_tio_get_soft_copy (counter, +NITIO_MODE_REG (counter->counter_index));unsigned int ret =0 ;if ((mode &GI_GATING_MODE_MASK ) ==GI_GATING_DISABLED )
@@ -1358,8 +1358,8 @@ static inline unsigned int ni_tio_get_gate_mode(struct ni_gpct *counter)static inline unsigned int ni_tio_get_gate2_mode (struct ni_gpct *counter) { -unsigned int mode =ni_tio_get_soft_copy ( - counter,NITIO_GATE2_REG (counter->counter_index)); +unsigned int mode =ni_tio_get_soft_copy (counter, +NITIO_GATE2_REG (counter->counter_index));unsigned int ret =0 ;if (!(mode &GI_GATE2_MODE ))
Signature · 1 line
2.17.1
Quoted 24 lines · On Sun, 15 Mar 2020 03:12:57 +0530 Deepak R Varma <[email protected]> wrote:
Reformat function call arguments so that the function call is clearly visible. Issue detected by checkpatch.
Signed-off-by Deepak R Varma <[email protected]>--- drivers/staging/comedi/drivers/ni_tio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/staging/comedi/drivers/ni_tio.c +2
-2@@ -1342,8 +1342,8 @@ static int ni_m_gate2_to_generic_gate(unsigned int gate, unsigned int *src)static inline unsigned int ni_tio_get_gate_mode (struct ni_gpct *counter) { -unsigned int mode =ni_tio_get_soft_copy ( - counter,NITIO_MODE_REG (counter->counter_index)); +unsigned int mode =ni_tio_get_soft_copy (counter, +NITIO_MODE_REG (counter->counter_index));unsigned int ret =0 ;if ((mode &GI_GATING_MODE_MASK ) ==GI_GATING_DISABLED )
drivers/staging/comedi/drivers/ni_tio.c static inline unsigned int ni_tio_get_gate_mode(struct ni_gpct *counter) · line 1365
Quoted 10 lines
drivers/staging/comedi/drivers/ni_tio.c +2
-2@@ -1358,8 +1358,8 @@ static inline unsigned int ni_tio_get_gate_mode(struct ni_gpct *counter)static inline unsigned int ni_tio_get_gate2_mode (struct ni_gpct *counter) { -unsigned int mode =ni_tio_get_soft_copy ( - counter,NITIO_GATE2_REG (counter->counter_index)); +unsigned int mode =ni_tio_get_soft_copy (counter, +NITIO_GATE2_REG (counter->counter_index));unsigned int ret =0 ;if (!(mode &GI_GATE2_MODE ))
I think both the original version and the "fixed" one are quite hard to read, the proper way to fix this is to initialise 'mode' after the declaration.
Signature · 1 line
Stefano