Re: [PATCH] drivers: atm: Follow the indentation coding standard on printks

From: Andrew Lunn
Date: Thu Jul 08 2021 - 11:48:11 EST


On Thu, Jul 08, 2021 at 11:19:19AM -0400, Carlos Bilbao wrote:
> Fix indentation of printks that start at the beginning of the line. Change this
> for the right number of space characters, or tabs if the file uses them.
>
> Signed-off-by: Carlos Bilbao <bilbao@xxxxxx>
> ---
> Changelog: Replaced printk for DPRINTK on suni.c
> ---
> drivers/atm/eni.c | 2 +-
> drivers/atm/iphase.c | 2 +-
> drivers/atm/suni.c | 4 ++--
> drivers/atm/zatm.c | 8 ++++----
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
> index 422753d52244..6d10fd62ba7e 100644
> --- a/drivers/atm/eni.c
> +++ b/drivers/atm/eni.c
> @@ -1456,7 +1456,7 @@ static int start_tx(struct atm_dev *dev)
>
> static void foo(void)
> {
> -printk(KERN_INFO
> + printk(KERN_INFO
> "tx_complete=%d,dma_complete=%d,queued=%d,requeued=%d,sub=%d,\n"
> "backlogged=%d,rx_enqueued=%d,rx_dequeued=%d,putting=%d,pushed=%d\n",
> tx_complete,dma_complete,queued,requeued,submitted,backlogged,

Did you just blindly fix the warning, or look at the surrounding code
and think a bit?

There is the comment:

/* may become useful again when tuning things */

What does git log show? When was the last tuning? When was the last
serious change made to this driver which was not an automated/manual
cleanup? My guess is, you need to go back to at least 2005.

So maybe it is time to remove this #if 0 code?

Please also read

https://www.kernel.org/doc/Documentation/process/submitting-patches.rst

and

https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html

Andrew