Checkpatch emits multiple WARNING: Avoid multiple line dereference. Removing these warnings will result in line over 80 warnings being introduced. However, Documentation/process/coding-style.rst: "Statements longer than 80 columns will be broken into sensible chunks, unless exceeding 80 columns significantly increases readability and does not hide information" Exceeding the 80 columns limit helps readabilty when it means we don't have to break apart dereferences. Remove line breaks from the middle of struct variable member dereferences. Introduce new line over 80 checkpatch warnings. Signed-off-by: Tobin C. Harding <me@xxxxxxxx> --- drivers/staging/comedi/drivers/adl_pci9118.c | 3 +-- drivers/staging/comedi/drivers/cb_pcidas64.c | 19 ++++++------------- drivers/staging/comedi/drivers/dt3000.c | 3 +-- drivers/staging/comedi/drivers/jr3_pci.c | 3 +-- drivers/staging/comedi/drivers/ni_atmio.c | 4 ++-- drivers/staging/comedi/drivers/ni_labpc_common.c | 3 +-- drivers/staging/comedi/drivers/ni_mio_common.c | 3 +-- drivers/staging/comedi/drivers/rtd520.c | 3 +-- drivers/staging/comedi/drivers/s626.c | 11 ++++------- 9 files changed, 18 insertions(+), 34 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index 86450c0..29ccb0b 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -1279,8 +1279,7 @@ static int pci9118_ai_cmdtest(struct comedi_device *dev, } else { arg = cmd->convert_arg * cmd->chanlist_len; } - err |= comedi_check_trigger_arg_min(&cmd-> - scan_begin_arg, + err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg, arg); } } diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 352f754..62438cbf 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1500,11 +1500,9 @@ static int alloc_and_init_dma_members(struct comedi_device *dev) if (!ao_cmd_is_supported(board)) continue; devpriv->ao_buffer[i] = - dma_alloc_coherent(&pcidev->dev, - DMA_BUFFER_SIZE, - &devpriv-> - ao_buffer_bus_addr[i], - GFP_KERNEL); + dma_alloc_coherent(&pcidev->dev, DMA_BUFFER_SIZE, + &devpriv->ao_buffer_bus_addr[i], + GFP_KERNEL); if (!devpriv->ao_buffer[i]) return -ENOMEM; } @@ -2476,18 +2474,13 @@ static int setup_channel_queue(struct comedi_device *dev, for (i = 0; i < cmd->chanlist_len; i++) { bits = 0; /* set channel */ - bits |= adc_chan_bits(CR_CHAN(cmd-> - chanlist[i])); + bits |= adc_chan_bits(CR_CHAN(cmd->chanlist[i])); /* set gain */ bits |= ai_range_bits_6xxx(dev, - CR_RANGE(cmd-> - chanlist - [i])); + CR_RANGE(cmd->chanlist[i])); /* set single-ended / differential */ bits |= se_diff_bit_6xxx(dev, - CR_AREF(cmd-> - chanlist[i]) == - AREF_DIFF); + CR_AREF(cmd->chanlist[i]) == AREF_DIFF); if (CR_AREF(cmd->chanlist[i]) == AREF_COMMON) bits |= ADC_COMMON_BIT; /* mark end of queue */ diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c index 19e0b7b..38b94d4 100644 --- a/drivers/staging/comedi/drivers/dt3000.c +++ b/drivers/staging/comedi/drivers/dt3000.c @@ -448,8 +448,7 @@ static int dt3k_ai_cmdtest(struct comedi_device *dev, if (cmd->scan_begin_src == TRIG_TIMER) { arg = cmd->convert_arg * cmd->scan_end_arg; - err |= comedi_check_trigger_arg_min(&cmd-> - scan_begin_arg, + err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg, arg); } } diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index 70390de..386e79f 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -760,8 +760,7 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, msleep_interruptible(25); for (i = 0; i < 0x18; i++) { dev_dbg(dev->class_dev, "%c\n", - get_u16(&devpriv->iobase->channel[0]. - data.copyright[i]) >> 8); + get_u16(&devpriv->iobase->channel[0].data.copyright[i]) >> 8); } /* Start card timer */ diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index ffcf7af..9017315 100644 --- a/drivers/staging/comedi/drivers/ni_atmio.c +++ b/drivers/staging/comedi/drivers/ni_atmio.c @@ -235,8 +235,8 @@ static int ni_isapnp_find_board(struct pnp_dev **dev) for (i = 0; i < ARRAY_SIZE(ni_boards); i++) { isapnp_dev = pnp_find_dev(NULL, ISAPNP_VENDOR('N', 'I', 'C'), - ISAPNP_FUNCTION(ni_boards[i]. - isapnp_id), NULL); + ISAPNP_FUNCTION(ni_boards[i].isapnp_id), + NULL); if (!isapnp_dev || !isapnp_dev->card) continue; diff --git a/drivers/staging/comedi/drivers/ni_labpc_common.c b/drivers/staging/comedi/drivers/ni_labpc_common.c index b0dfb8e..a38910e 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_common.c +++ b/drivers/staging/comedi/drivers/ni_labpc_common.c @@ -569,8 +569,7 @@ static int labpc_ai_cmdtest(struct comedi_device *dev, /* make sure scan timing is not too fast */ if (cmd->scan_begin_src == TRIG_TIMER) { if (cmd->convert_src == TRIG_TIMER) { - err |= comedi_check_trigger_arg_min(&cmd-> - scan_begin_arg, + err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg, cmd->convert_arg * cmd->chanlist_len); } diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index b2e3828..07c1c56 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -732,8 +732,7 @@ static void ni_release_gpct_mite_channel(struct comedi_device *dev, ni_set_bitfield(dev, NI_E_DMA_G0_G1_SEL_REG, NI_E_DMA_G0_G1_SEL_MASK(gpct_index), 0); - ni_tio_set_mite_channel(&devpriv-> - counter_dev->counters[gpct_index], + ni_tio_set_mite_channel(&devpriv->counter_dev->counters[gpct_index], NULL); mite_release_channel(mite_chan); } diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index e00e9c6..adecad3 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -824,8 +824,7 @@ static int rtd_ai_cmdtest(struct comedi_device *dev, if (cmd->scan_begin_src == TRIG_TIMER) { arg = cmd->convert_arg * cmd->scan_end_arg; - err |= comedi_check_trigger_arg_min(&cmd-> - scan_begin_arg, + err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg, arg); } } diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 0dd5fe2..afdd0f7 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -1371,11 +1371,9 @@ static void s626_reset_adc(struct comedi_device *dev, u8 *ppl) * than is possible with NOPs because each S626_RPS_JUMP * flushes the RPS' instruction prefetch pipeline. */ - jmp_adrs = - (u32)devpriv->rps_buf.physical_base + - (u32)((unsigned long)rps - - (unsigned long)devpriv-> - rps_buf.logical_base); + jmp_adrs = (u32)devpriv->rps_buf.physical_base + + (u32)((unsigned long)rps - + (unsigned long)devpriv->rps_buf.logical_base); for (i = 0; i < (10 * S626_RPSCLK_PER_US / 2); i++) { jmp_adrs += 8; /* Repeat to implement time delay: */ /* Jump to next RPS instruction. */ @@ -1892,8 +1890,7 @@ static int s626_ai_cmdtest(struct comedi_device *dev, if (cmd->scan_begin_src == TRIG_TIMER) { arg = cmd->convert_arg * cmd->scan_end_arg; - err |= comedi_check_trigger_arg_min(&cmd-> - scan_begin_arg, + err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg, arg); } } -- 2.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel