serial: sirf: fix line over 80 characters style issue
PATCH 1/1 serial: sirf: fix line over 80 characters style issue
From: Qipan Li <[email protected]>
According to key customer's requirement, fix "line over 80 characters".
--- drivers/tty/serial/sirfsoc_uart.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/tty/serial/sirfsoc_uart.c +9 -5
@@ -525,7 +525,8 @@ static void sirfsoc_rx_tmo_process_tl(unsigned long param)spin_lock_irqsave (&port->lock, flags);while (DMA_COMPLETE ==dmaengine_tx_status (sirfport->rx_dma_chan, - sirfport->rx_dma_items[sirfport->rx_completed].cookie, &tx_state)) { + sirfport->rx_dma_items[sirfport->rx_completed].cookie, + &tx_state)) {sirfsoc_uart_insert_rx_buf_to_tty (sirfport,SIRFSOC_RX_DMA_BUF_SIZE ); sirfport->rx_completed++;
@@ -707,7 +708,8 @@ static void sirfsoc_uart_rx_dma_complete_tl(unsigned long param)struct dma_tx_state tx_state;spin_lock_irqsave (&port->lock, flags);while (DMA_COMPLETE ==dmaengine_tx_status (sirfport->rx_dma_chan, - sirfport->rx_dma_items[sirfport->rx_completed].cookie, &tx_state)) { + sirfport->rx_dma_items[sirfport->rx_completed].cookie, + &tx_state)) {sirfsoc_uart_insert_rx_buf_to_tty (sirfport,SIRFSOC_RX_DMA_BUF_SIZE ); if (rd_regl(port, ureg->sirfsoc_int_en_reg) &
@@ -1303,7 +1305,8 @@ static int sirfsoc_uart_probe(struct platform_device *pdev) "sirf,uart-has-rtscts");if (of_device_is_compatible (pdev->dev.of_node,"sirf,prima2-uart" )) sirfport->uart_reg->uart_type =SIRF_REAL_UART ; -if (of_device_is_compatible (pdev->dev.of_node,"sirf,prima2-usp-uart" )) { +if (of_device_is_compatible (pdev->dev.of_node, +"sirf,prima2-usp-uart" )) { sirfport->uart_reg->uart_type =SIRF_USP_UART ;if (!sirfport->hw_flow_ctrl) goto usp_no_flow_control;
@@ -1360,11 +1363,12 @@ usp_no_flow_control: goto err; }tasklet_init (&sirfport->rx_dma_complete_tasklet, - sirfsoc_uart_rx_dma_complete_tl, (unsigned long )sirfport); + sirfsoc_uart_rx_dma_complete_tl, (unsigned long )sirfport);tasklet_init (&sirfport->rx_tmo_process_tasklet, sirfsoc_rx_tmo_process_tl, (unsigned long )sirfport); port->mapbase = res->start; - port->membase =devm_ioremap (&pdev->dev, res->start,resource_size (res)); + port->membase =devm_ioremap (&pdev->dev, + res->start,resource_size (res));if (!port->membase) {dev_err (&pdev->dev,"Cannot remap resource.\n" ); ret = -ENOMEM ;
Signature · 7 lines
2.0.4 Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc. New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.
Greg KH
maintainerQuoted 4 lines · Barry Song
From: Qipan Li <[email protected]>
According to key customer's requirement, fix "line over 80 characters".
Someone is forcing you to fix all upstream kernel.org code for 80 columns? Who?
Quoted 11 lines
Signed-off-by Qipan Li <[email protected]>Signed-off-by Barry Song <[email protected]>--- drivers/tty/serial/sirfsoc_uart.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)drivers/tty/serial/sirfsoc_uart.c +0
-0
drivers/tty/serial/sirfsoc_uart.c static void sirfsoc_rx_tmo_process_tl(unsigned long param) · line 529
Quoted 6 lines
drivers/tty/serial/sirfsoc_uart.c +2
-1@@ -525,7 +525,8 @@ static void sirfsoc_rx_tmo_process_tl(unsigned long param)spin_lock_irqsave (&port->lock, flags);while (DMA_COMPLETE ==dmaengine_tx_status (sirfport->rx_dma_chan, - sirfport->rx_dma_items[sirfport->rx_completed].cookie, &tx_state)) { + sirfport->rx_dma_items[sirfport->rx_completed].cookie, + &tx_state)) {
Isn't that now harder to read?
drivers/tty/serial/sirfsoc_uart.c static void sirfsoc_uart_rx_dma_complete_tl(unsigned long param) · line 712
Quoted 10 lines
drivers/tty/serial/sirfsoc_uart.c +2
-1sirfsoc_uart_insert_rx_buf_to_tty (sirfport,SIRFSOC_RX_DMA_BUF_SIZE ); sirfport->rx_completed++;@@ -707,7 +708,8 @@ static void sirfsoc_uart_rx_dma_complete_tl(unsigned long param)struct dma_tx_state tx_state;spin_lock_irqsave (&port->lock, flags);while (DMA_COMPLETE ==dmaengine_tx_status (sirfport->rx_dma_chan, - sirfport->rx_dma_items[sirfport->rx_completed].cookie, &tx_state)) { + sirfport->rx_dma_items[sirfport->rx_completed].cookie, + &tx_state)) {
Same here.
drivers/tty/serial/sirfsoc_uart.c static int sirfsoc_uart_probe(struct platform_device *pdev) · line 1309
Quoted 10 lines
drivers/tty/serial/sirfsoc_uart.c +2
-1sirfsoc_uart_insert_rx_buf_to_tty (sirfport,SIRFSOC_RX_DMA_BUF_SIZE ); if (rd_regl(port, ureg->sirfsoc_int_en_reg) &@@ -1303,7 +1305,8 @@ static int sirfsoc_uart_probe(struct platform_device *pdev) "sirf,uart-has-rtscts");if (of_device_is_compatible (pdev->dev.of_node,"sirf,prima2-uart" )) sirfport->uart_reg->uart_type =SIRF_REAL_UART ; -if (of_device_is_compatible (pdev->dev.of_node,"sirf,prima2-usp-uart" )) { +if (of_device_is_compatible (pdev->dev.of_node, +"sirf,prima2-usp-uart" )) {
Same.
drivers/tty/serial/sirfsoc_uart.c usp_no_flow_control: · line 1366
Quoted 9 lines
drivers/tty/serial/sirfsoc_uart.c +1
-1sirfport->uart_reg->uart_type =SIRF_USP_UART ;if (!sirfport->hw_flow_ctrl) goto usp_no_flow_control;@@ -1360,11 +1363,12 @@ usp_no_flow_control: goto err; }tasklet_init (&sirfport->rx_dma_complete_tasklet, - sirfsoc_uart_rx_dma_complete_tl, (unsigned long )sirfport); + sirfsoc_uart_rx_dma_complete_tl, (unsigned long )sirfport);
Same.
You can break this line at the last variable instead.
drivers/tty/serial/sirfsoc_uart.c usp_no_flow_control: · line 1371
Quoted 6 lines
drivers/tty/serial/sirfsoc_uart.c +2
-1tasklet_init (&sirfport->rx_tmo_process_tasklet, sirfsoc_rx_tmo_process_tl, (unsigned long )sirfport); port->mapbase = res->start; - port->membase =devm_ioremap (&pdev->dev, res->start,resource_size (res)); + port->membase =devm_ioremap (&pdev->dev, + res->start,resource_size (res));
same here, it could be made to look better.
Sorry, not going to take this, if your customer blames you, point them at me.
seriously.
greg k-h
Quoted 8 lines · Greg KH
Quoted 4 lines · Barry Song
From: Qipan Li <[email protected]>
According to key customer's requirement, fix "line over 80 characters".
Someone is forcing you to fix all upstream kernel.org code for 80 columns? Who?
we were asked to fix csr platform codes some days ago. They have been fixed locally.
You know, the difficulty is maintaining the difference between mainline and local codes.
So I thought this is better if you can merge it.
Quoted 76 lines
Quoted 13 lines
Signed-off-by Qipan Li <[email protected]>Signed-off-by Barry Song <[email protected]>--- drivers/tty/serial/sirfsoc_uart.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)drivers/tty/serial/sirfsoc_uart.c +0
-0drivers/tty/serial/sirfsoc_uart.c static void sirfsoc_rx_tmo_process_tl(unsigned long · line 530
Quoted 7 lines
drivers/tty/serial/sirfsoc_uart.c +2
-1@@ -525,7 +525,8 @@ static void sirfsoc_rx_tmo_process_tl(unsigned long param) spin_lock_irqsave(&port->lock, flags);while (DMA_COMPLETE ==dmaengine_tx_status (sirfport->rx_dma_chan, - sirfport->rx_dma_items[sirfport->rx_completed].cookie, &tx_state)) { + sirfport->rx_dma_items[sirfport->rx_completed].cookie, + &tx_state)) {Isn't that now harder to read?
drivers/tty/serial/sirfsoc_uart.c static void · line 713
Quoted 11 lines
drivers/tty/serial/sirfsoc_uart.c +0
-0sirfsoc_uart_insert_rx_buf_to_tty (sirfport,SIRFSOC_RX_DMA_BUF_SIZE );drivers/tty/serial/sirfsoc_uart.c +2
-1sirfport->rx_completed++;@@ -707,7 +708,8 @@ static voidsirfsoc_uart_rx_dma_complete_tl (unsigned long param ) struct dma_tx_state tx_state;spin_lock_irqsave (&port->lock, flags);while (DMA_COMPLETE ==dmaengine_tx_status (sirfport->rx_dma_chan, - sirfport->rx_dma_items[sirfport->rx_completed].cookie, &tx_state)) { + sirfport->rx_dma_items[sirfport->rx_completed].cookie, + &tx_state)) {Same here.
drivers/tty/serial/sirfsoc_uart.c static int sirfsoc_uart_probe(struct · line 1311
Quoted 12 lines
drivers/tty/serial/sirfsoc_uart.c +0
-0sirfsoc_uart_insert_rx_buf_to_tty (sirfport,SIRFSOC_RX_DMA_BUF_SIZE );drivers/tty/serial/sirfsoc_uart.c +2
-1if (rd_regl(port, ureg->sirfsoc_int_en_reg) &@@ -1303,7 +1305,8 @@ static int sirfsoc_uart_probe(struct platform_device *pdev) "sirf,uart-has-rtscts");if (of_device_is_compatible (pdev->dev.of_node,"sirf,prima2-uart" )) sirfport->uart_reg->uart_type =SIRF_REAL_UART ; -if (of_device_is_compatible (pdev->dev.of_node, "sirf,prima2-usp-uart")) { +if (of_device_is_compatible (pdev->dev.of_node, +"sirf,prima2-usp-uart" )) {Same.
drivers/tty/serial/sirfsoc_uart.c usp_no_flow_control: · line 1366
Quoted 9 lines
drivers/tty/serial/sirfsoc_uart.c +0
-0sirfport->uart_reg->uart_type =SIRF_USP_UART ;drivers/tty/serial/sirfsoc_uart.c +1
-1if (!sirfport->hw_flow_ctrl) goto usp_no_flow_control;@@ -1360,11 +1363,12 @@ usp_no_flow_control: goto err; }tasklet_init (&sirfport->rx_dma_complete_tasklet, - sirfsoc_uart_rx_dma_complete_tl, (unsigned long )sirfport); + sirfsoc_uart_rx_dma_complete_tl, (unsigned long )sirfport);Same.
You can break this line at the last variable instead.
drivers/tty/serial/sirfsoc_uart.c usp_no_flow_control: · line 1371
Quoted 7 lines
drivers/tty/serial/sirfsoc_uart.c +2
-1tasklet_init (&sirfport->rx_tmo_process_tasklet, sirfsoc_rx_tmo_process_tl, (unsigned long )sirfport); port->mapbase = res->start; - port->membase =devm_ioremap (&pdev->dev, res->start, resource_size(res)); + port->membase =devm_ioremap (&pdev->dev, + res->start,resource_size (res));same here, it could be made to look better.
Quoted 2 lines
Sorry, not going to take this, if your customer blames you, point them at me.
I understand you are very helpful. But pointing them to you will actually make things worse as I think we have no chance to convince them as we have tried our best to do that.
The benefit of this patch is making people happy. But if you are not happy, I can make myself unhappy to maintain two versions.
Quoted 5 lines
seriously.
greg k-h
-barry
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Greg KH
maintainerQuoted 7 lines · Barry Song
Quoted 3 lines · Greg KH
Quoted 2 lines · Barry Song
From: Qipan Li <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
According to key customer's requirement, fix "line over 80 characters".
Someone is forcing you to fix all upstream kernel.org code for 80 columns? Who?
we were asked to fix csr platform codes some days ago. They have been fixed locally.
What is "locally"?
And you really are forced to do foolish cleanups for no reason in mainline kernel code for no reason?
Quoted 3 lines
You know, the difficulty is maintaining the difference between mainline and local codes.
So I thought this is better if you can merge it.
I'm not taking stuff that isn't correct. Or is foolish. Neither should you.
Quoted 8 lines
Quoted 2 lines
Sorry, not going to take this, if your customer blames you, point them at me.
I understand you are very helpful. But pointing them to you will actually make things worse as I think we have no chance to convince them as we have tried our best to do that.
The benefit of this patch is making people happy. But if you are not happy, I can make myself unhappy to maintain two versions.
Try fixing the code to look better, your changes were not valid ones, you are quieting some automatic tool checker, you aren't doing the correct thing and following the "spirit" of the rule here.
Make the code look cleaner, and I'll be glad to take the change.
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 14 lines · Greg KH
Quoted 13 lines · Barry Song
Quoted 8 lines · Greg KH
Quoted 4 lines · Barry Song
From: Qipan Li <[email protected]>
According to key customer's requirement, fix "line over 80 characters".
Someone is forcing you to fix all upstream kernel.org code for 80 columns? Who?
Quoted 7 lines
Quoted 2 lines
we were asked to fix csr platform codes some days ago. They have been fixed locally.
What is "locally"?
And you really are forced to do foolish cleanups for no reason in mainline kernel code for no reason?
"Locally" means the code tree in our local git repo. Nobody asked me to cleanup all mainline codes, the asked changes are for sirf platform codes whose authors are sirf platform engineers.
Quoted 7 lines
Quoted 4 lines
You know, the difficulty is maintaining the difference between mainline and local codes.
So I thought this is better if you can merge it.I'm not taking stuff that isn't correct. Or is foolish. Neither should you.
Never. I always think we need to make codes have good readability.
Quoted 12 lines
Quoted 11 lines
Quoted 3 lines
Sorry, not going to take this, if your customer blames you, point them at me.
I understand you are very helpful. But pointing them to you will actually
make things worse as I think we have no chance to convince them as we have
tried our best to do that.
The benefit of this patch is making people happy. But if you are not happy, I can make myself unhappy to maintain two versions.
Quoted 5 lines
Try fixing the code to look better, your changes were not valid ones, you are quieting some automatic tool checker, you aren't doing the correct thing and following the "spirit" of the rule here.
Make the code look cleaner, and I'll be glad to take the change.
As you said, most old codes looks better with "line over 80 chars", so I would like to know what is the way you are happy. Is it fixing all "line over 80 chars" with changes following the "spirit", or only splitting those lines which will follow "spirit" better if we split them. If the lines over 80 chars have been good and following the "spirit", do they need to be fixed?
Quoted 2 lines
greg k-h
-barry
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Greg KH
maintainerQuoted 56 lines · Barry Song
Quoted 14 lines · Greg KH
Quoted 13 lines · Barry Song
Quoted 8 lines · Greg KH
Quoted 4 lines · Barry Song
From: Qipan Li <[email protected]>
According to key customer's requirement, fix "line over 80 characters".
Someone is forcing you to fix all upstream kernel.org code for 80 columns? Who?
Quoted 7 lines
Quoted 2 lines
we were asked to fix csr platform codes some days ago. They have been fixed locally.
What is "locally"?
And you really are forced to do foolish cleanups for no reason in mainline kernel code for no reason?
"Locally" means the code tree in our local git repo. Nobody asked me to cleanup all mainline codes, the asked changes are for sirf platform codes whose authors are sirf platform engineers.
Quoted 7 lines
Quoted 4 lines
You know, the difficulty is maintaining the difference between mainline and local codes.
So I thought this is better if you can merge it.I'm not taking stuff that isn't correct. Or is foolish. Neither should you.
Never. I always think we need to make codes have good readability.
Quoted 16 lines
Quoted 11 lines
Quoted 3 lines
Sorry, not going to take this, if your customer blames you, point them at me.
I understand you are very helpful. But pointing them to you will actually
make things worse as I think we have no chance to convince them as we have
tried our best to do that.
The benefit of this patch is making people happy. But if you are not happy, I can make myself unhappy to maintain two versions.Try fixing the code to look better, your changes were not valid ones, you are quieting some automatic tool checker, you aren't doing the correct thing and following the "spirit" of the rule here.
Quoted 8 lines
Quoted 1 line
Make the code look cleaner, and I'll be glad to take the change.
As you said, most old codes looks better with "line over 80 chars", so I would like to know what is the way you are happy. Is it fixing all "line over 80 chars" with changes following the "spirit", or only splitting those lines which will follow "spirit" better if we split them. If the lines over 80 chars have been good and following the "spirit", do they need to be fixed?
No they do not, the rule is there to make the code readable, don't go through gyrations to match the 80 column rule that makes the code less readable, as that is counter productive.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 69 lines · Greg KH
Quoted 59 lines · Barry Song
Quoted 14 lines · Greg KH
Quoted 13 lines · Barry Song
Quoted 8 lines · Greg KH
Quoted 4 lines · Barry Song
From: Qipan Li <[email protected]>
According to key customer's requirement, fix "line over 80 characters".
Someone is forcing you to fix all upstream kernel.org code for 80 columns? Who?
Quoted 7 lines
Quoted 2 lines
we were asked to fix csr platform codes some days ago. They have been fixed locally.
What is "locally"?
And you really are forced to do foolish cleanups for no reason in mainline kernel code for no reason?
"Locally" means the code tree in our local git repo. Nobody asked me to cleanup all mainline codes, the asked changes are for sirf platform codes
whose authors are sirf platform engineers.Quoted 6 lines
Quoted 4 lines
You know, the difficulty is maintaining the difference between mainline and local codes.
So I thought this is better if you can merge it.I'm not taking stuff that isn't correct. Or is foolish. Neither
should
Quoted 1 line
you.
Never. I always think we need to make codes have good readability.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Sorry, not going to take this, if your customer blames you, point
them
Quoted 14 lines
Quoted 9 lines
Quoted 1 line
at me.
I understand you are very helpful. But pointing them to you will actually
make things worse as I think we have no chance to convince them as we have
tried our best to do that.
The benefit of this patch is making people happy. But if you are not happy, I can make myself unhappy to maintain two versions.Try fixing the code to look better, your changes were not valid ones, you are quieting some automatic tool checker, you aren't doing the correct thing and following the "spirit" of the rule here.
Quoted 8 lines
Quoted 1 line
Make the code look cleaner, and I'll be glad to take the change.
As you said, most old codes looks better with "line over 80 chars", so I would like to know what is the way you are happy. Is it fixing all "line over 80 chars" with changes following the "spirit", or only splitting those lines which will follow "spirit" better if we split them. If the lines over 80 chars have been good and following the "spirit", do they need to be fixed?
Quoted 3 lines
No they do not, the rule is there to make the code readable, don't go through gyrations to match the 80 column rule that makes the code less readable, as that is counter productive.
We have been doing a checkpatch pre-commit hook in git server for a long time. As you know , a basic hook will reject any changes which have checkpatch issues including "line over 80 chars". In my original understanding, this depends on the context of codes. So we disabled "the line over 80 chars" in checkpatch.pl and moved to manual reviews for this. Finally, this triggered a quality control mechanism of users and caused many fault reports from customers who were doing serious checkpatch.pl. we were asked to fix the "bad" quality codes. This is the story.
There are still some gaps to make people understand this and finally all people become happy. But I am still happy to continue to fix the situation, and your comments will surely help.
I am still happy to take this one as a start to fix what should be fixed.
Quoted 4 lines
thanks,
greg k-h
-barry
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html