staging: comedi: Remove a newline inside a dereference
PATCH v2 1/1 staging: comedi: Remove a newline inside a dereference
This patch fixes the checkpatch.pl warning:
WARNING: Avoid multiple line dereference - prefer 'devpriv->ao_buffer_bus_addr[i]'
---
Changes in v2:
- Change the commit log to mention what I have done.
- Remove the unnecessary cited lines from checkpatch inside the commit body.
drivers/staging/comedi/drivers/cb_pcidas64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/comedi/drivers/cb_pcidas64.c +1 -2
@@ -1490,8 +1490,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev) devpriv->ao_buffer[i] =dma_alloc_coherent (&pcidev->dev,DMA_BUFFER_SIZE , - &devpriv-> - ao_buffer_bus_addr[i], + &devpriv->ao_buffer_bus_addr[i],GFP_KERNEL );if (!devpriv->ao_buffer[i])return -ENOMEM ;
--
2.14.3
Quoted 3 lines · Eisha Chen-yen-su
This patch fixes the checkpatch.pl warning:
WARNING: Avoid multiple line dereference - prefer 'devpriv->ao_buffer_bus_addr[i]'
Hi Eisha,
Good work on subject.
For the commit log, as Julia mentioned in her previous comments it's not necessary to keep the checkpatch.pl's warning message in the commit log. Instead you can write about what change you with the reason of doing that change. And at the end to give credit to the tool, you can add something like 'Problem detected by checkpatch.pl'.
Quoted 32 lines
Signed-off-by Eisha Chen-yen-su <[email protected]>---
Changes in v2:
- Change the commit log to mention what I have done.
- Remove the unnecessary cited lines from checkpatch inside the commit body.drivers/staging/comedi/drivers/cb_pcidas64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/comedi/drivers/cb_pcidas64.c +1
-3@@ -1490,8 +1490,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev) devpriv->ao_buffer[i] =dma_alloc_coherent (&pcidev->dev,DMA_BUFFER_SIZE , - &devpriv-> - ao_buffer_bus_addr[i], + &devpriv->ao_buffer_bus_addr[i],GFP_KERNEL );if (!devpriv->ao_buffer[i])return -ENOMEM ; --2.14.3
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20180217081047.5763-1-chenyensu0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 18 lines · Eisha Chen-yen-su
This patch fixes the checkpatch.pl warning:
WARNING: Avoid multiple line dereference - prefer 'devpriv->ao_buffer_bus_addr[i]'
Signed-off-by Eisha Chen-yen-su <[email protected]>---
Changes in v2:
- Change the commit log to mention what I have done.
- Remove the unnecessary cited lines from checkpatch inside the commit body.drivers/staging/comedi/drivers/cb_pcidas64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/comedi/drivers/cb_pcidas64.c +0
-0
drivers/staging/comedi/drivers/cb_pcidas64.c static int alloc_and_init_dma_members(struct comedi_device *dev) · line 1494
Quoted 7 lines
drivers/staging/comedi/drivers/cb_pcidas64.c +1
-2@@ -1490,8 +1490,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev) devpriv->ao_buffer[i] =dma_alloc_coherent (&pcidev->dev,DMA_BUFFER_SIZE , - &devpriv-> - ao_buffer_bus_addr[i], + &devpriv->ao_buffer_bus_addr[i],GFP_KERNEL );
That makes the line go over 80 columns. You could avoid that by moving the whole dma_alloc_coherent() call back 4 columns (so the amount of indentation after the line break following the '=' is reduced from 8 to 4). You could even move it back by 8 columns (so the amount of indentation would be 0), but I think it looks better with *some* indentation.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-