[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zs9MHv+ljZUMfTqj@opensource.cirrus.com>
Date: Wed, 28 Aug 2024 17:11:10 +0100
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Richard Fitzgerald <rf@...nsource.cirrus.com>
CC: Thomas Gleixner <tglx@...utronix.de>, Yan Zhen <yanzhen@...o.com>,
<linus.walleij@...aro.org>, <linux-sound@...r.kernel.org>,
<patches@...nsource.cirrus.com>, <linux-kernel@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, <opensource.kernel@...o.com>
Subject: Re: [PATCH v1] cirrus: Simplify with dev_err_probe()
On Wed, Aug 28, 2024 at 03:59:50PM +0100, Richard Fitzgerald wrote:
> On 28/08/2024 15:47, Thomas Gleixner wrote:
> > On Wed, Aug 28 2024 at 13:27, Charles Keepax wrote:
> > > On Wed, Aug 28, 2024 at 08:01:18PM +0800, Yan Zhen wrote:
> > > > @@ -1064,10 +1064,9 @@ static int madera_pin_probe(struct platform_device *pdev)
> > > > ret = pinctrl_register_mappings(pdata->gpio_configs,
> > > > pdata->n_gpio_configs);
> > > > if (ret) {
> > > > - dev_err(priv->dev,
> > > > - "Failed to register pdata mappings (%d)\n",
> > > > - ret);
> > > > - return ret;
> > > > + return dev_err_probe(priv->dev, ret,
> > > > + "Failed to register pdata mappings (%d)\n",
> > > > + ret);
> > > > }
> > >
> > > Since we are doing a respin anyway also the brackets on the if
> > > should be dropped on both of these as well.
> >
> > No. https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#bracket-rules
> >
>
> https://www.kernel.org/doc/html/latest/process/coding-style.html#codingstyle
>
> does not say that. It says:
>
> "Do not unnecessarily use braces where a single statement will do."
>
> Note: single statement, not single line.
>
> coding-style.rst is the coding style. If you disagree with the coding
> style, send a patch to change coding-style.rst.
>
I mean certainly having two documents with apparently conflicting
guidelines for the coding style is not a helpful situation at
all. I would definitely second the call for patching the
coding-style doc to be more explicit there.
And to be clear I really don't care if we keep the brackets or
not, was just trying to follow what I thought was the coding style
guidance.
Thanks,
Charles
Powered by blists - more mailing lists