Re: [PATCH v2] staging: octeon: fix function declaration formatting

From: Dan Carpenter

Date: Fri Aug 21 2026 - 10:24:47 EST


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@xxxxxxxxxxx>
> ---
> 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