All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Tiago Panizio Gottardo <tiago.panizio@hotmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: octeon: fix function declaration formatting
Date: Fri, 21 Aug 2026 17:15:02 +0300	[thread overview]
Message-ID: <aohdZq8Hyn6Nus8i@stanley.mountain> (raw)
In-Reply-To: <CPYP284MB0854550BAD16664CD1110456FFA32@CPYP284MB0854.BRAP284.PROD.OUTLOOK.COM>

On Fri, Aug 21, 2026 at 11:04:09AM -0300, Tiago Panizio Gottardo wrote:
> Move the cvm_oct_of_get_child() return type to a separate line and keep
> the function name with its arguments.
> 
> No functional changes intended.
> 
> Signed-off-by: Tiago Panizio Gottardo <tiago.panizio@hotmail.com>
> ---
> Changes in v2:
> - Split out one focused formatting cleanup.
> - Dropped RGMII formatting and parentheses changes.
> - Dropped unrelated alignment cleanups.
> 
>  drivers/staging/octeon/ethernet.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
> index 42ec4b8324a8..e668e3baaa31 100644
> --- a/drivers/staging/octeon/ethernet.c
> +++ b/drivers/staging/octeon/ethernet.c
> @@ -621,8 +621,8 @@ static const struct net_device_ops cvm_oct_pow_netdev_ops = {
>  #endif
>  };
>  
> -static struct device_node *cvm_oct_of_get_child
> -				(const struct device_node *parent, int reg_val)
> +static struct device_node *
> +cvm_oct_of_get_child(const struct device_node *parent, int reg_val)

So, in the end, checkpatch is just a perl script.  It's not a king.  If
it isn't useful, then just ignore it...

None of the other functions are declared this way.  The thinking in the
original code was that they wanted to do:

static struct device_node *cvm_oct_of_get_child(const struct device_node *parent,
					        int reg_val)

But that's 82 characters and checkpatch used to complain if you went
over 80 characters.  Probably the right thing here is to do the original
thing because checkpatch doesn't complain until 100 characters now.

Really, the original code is kind of fine as-is...

regards,
dan carpenter


      reply	other threads:[~2026-08-21 14:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260821041255.1616843-1-tiago.panizio@hotmail.com>
2026-08-21  4:12 ` [PATCH 1/3] staging: octeon: fix style issues in ethernet.c Tiago Panizio Gottardo
2026-08-21  6:58   ` Dan Carpenter
2026-08-21 13:46     ` Tiago Panizio Gottardo
2026-08-21  4:12 ` [PATCH 2/3] staging: octeon: fix RGMII condition formatting Tiago Panizio Gottardo
2026-08-21  6:59   ` Dan Carpenter
2026-08-21  4:12 ` [PATCH 3/3] staging: octeon: remove unnecessary parentheses Tiago Panizio Gottardo
2026-08-21 14:04 ` [PATCH v2] staging: octeon: fix function declaration formatting Tiago Panizio Gottardo
2026-08-21 14:15   ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aohdZq8Hyn6Nus8i@stanley.mountain \
    --to=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=tiago.panizio@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.