staging: comedi: Fix dereference warning style
PATCH 1/1 staging: comedi: Fix dereference warning style
This patch fixes the checkpatch.pl warning:
WARNING: Avoid multiple line dereference - prefer 'devpriv->ao_buffer_bus_addr[i]' \#1494: FILE: drivers/staging/comedi/drivers/cb_pcidas64.c:1494:
+ &devpriv->
+ ao_buffer_bus_addr[i],
--- 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 ;
Signature · 1 line
2.14.3
Review
Quoted 6 lines · Eisha Chen-yen-su
This patch fixes the checkpatch.pl warning:
WARNING: Avoid multiple line dereference - prefer 'devpriv->ao_buffer_bus_addr[i]' \#1494: FILE:
drivers/staging/comedi/drivers/cb_pcidas64.c:1494:(quoted diff) +2
-0+ &devpriv-> + ao_buffer_bus_addr[i],
Thank you for your patch. For the subject line and the commit log, please try to focus on what you did, rather than what you fixed, as fixing can typically be done in multiple ways. Basically what you have done is to remove a newline inside a dereference. Also, while it's ok to include the checkpatch message, it is probably not necessary to cinlude the cited line, since one can easily see that from what changes in the patch.
Please send a v2.
julia
Quoted 30 lines
Signed-off-by Eisha Chen-yen-su <[email protected]>--- 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/20180217001446.6261-1-chenyensu0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 18 lines · Julia Lawall
Review
Quoted 6 lines · Eisha Chen-yen-su
This patch fixes the checkpatch.pl warning:
WARNING: Avoid multiple line dereference - prefer 'devpriv->ao_buffer_bus_addr[i]' \#1494: FILE:
drivers/staging/comedi/drivers/cb_pcidas64.c:1494:(quoted diff) +2
-0+ &devpriv-> + ao_buffer_bus_addr[i],Thank you for your patch. For the subject line and the commit log, please try to focus on what you did, rather than what you fixed, as fixing can typically be done in multiple ways. Basically what you have done is to remove a newline inside a dereference. Also, while it's ok to include the checkpatch message, it is probably not necessary to cinlude the cited line, since one can easily see that from what changes in the patch.
Quoted 3 lines
Please send a v2.
julia
Hello,
I was wondering if the lineWARNING: Avoid multiple line dereference - prefer 'devpriv->ao_buffer_bus_addr[i]'
wasn't too long in the commit body, as it is more than 80 characters long. Unless it is acceptable because I'm quoting something?
Eisha
Ps: I've sent a v2 without answering here before. Maybe it was a little bit rude.
Sorry, if it was the case.
Quoted 30 lines
Quoted 30 lines
Signed-off-by Eisha Chen-yen-su <[email protected]>--- 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/20180217001446.6261-1-chenyensu0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 23 lines · Eisha Chen-yen-su
Quoted 18 lines · Julia Lawall
Review
Quoted 6 lines · Eisha Chen-yen-su
This patch fixes the checkpatch.pl warning:
WARNING: Avoid multiple line dereference - prefer 'devpriv->ao_buffer_bus_addr[i]' \#1494: FILE:
drivers/staging/comedi/drivers/cb_pcidas64.c:1494:(quoted diff) +2
-0+ &devpriv-> + ao_buffer_bus_addr[i],Thank you for your patch. For the subject line and the commit log, please try to focus on what you did, rather than what you fixed, as fixing can typically be done in multiple ways. Basically what you have done is to remove a newline inside a dereference. Also, while it's ok to include the checkpatch message, it is probably not necessary to cinlude the cited line, since one can easily see that from what changes in the patch.
Quoted 3 lines
Please send a v2.
julia
Quoted 7 lines
Hello,
I was wondering if the line
WARNING: Avoid multiple line dereference - prefer 'devpriv->ao_buffer_bus_addr[i]'
wasn't too long in the commit body, as it is more than 80 characters long. Unless it is acceptable because I'm quoting something?
Long lines in the coomit log are better avoided. It is not necessary to put the full checkpatch message. If it is straightforward, you don't need to show it all. Just put something like Problem detected by checkpatch.
Quoted 6 lines
Eisha
Ps: I've sent a v2 without answering here before. Maybe it was a little bit rude.
Sorry, if it was the case.
No problem. You only have to reply if there is something you didn't understand or want to discuss.
julia
Quoted 31 lines
Quoted 30 lines
Quoted 30 lines
Signed-off-by Eisha Chen-yen-su <[email protected]>--- 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/20180217001446.6261-1-chenyensu0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.