All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Tommaso Merciai <tomm.merciai@gmail.com>
Cc: Umang Jain <umang.jain@ideasonboard.com>,
	linux-media@vger.kernel.org, dave.stevenson@raspberrypi.com,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH] media: i2c: imx219: Use dev_err_probe on probe
Date: Fri, 15 Mar 2024 06:38:00 +0000	[thread overview]
Message-ID: <ZfPsyFXrlep9sQco@kekkonen.localdomain> (raw)
In-Reply-To: <ZfMQpPyRrLAiRk6I@tom-HP-ZBook-Fury-15-G7-Mobile-Workstation>

On Thu, Mar 14, 2024 at 03:58:44PM +0100, Tommaso Merciai wrote:
> > > > @@ -1025,15 +1026,15 @@ static int imx219_identify_module(struct imx219 *imx219)
> > > >   	ret = cci_read(imx219->regmap, IMX219_REG_CHIP_ID, &val, NULL);
> > > >   	if (ret) {
> > > > -		dev_err(&client->dev, "failed to read chip id %x\n",
> > > > -			IMX219_CHIP_ID);
> > > > -		return ret;
> > > > +		return dev_err_probe(&client->dev, ret,
> > > > +				     "failed to read chip id %x\n",
> > > > +				     IMX219_CHIP_ID);
> > > >   	}
> > > I think you can remove also here the curve brakets we don't need that
> > > anymore.
> > 
> > I think multi-line single statement like this one, is better with { ... }
> > and is actually preferred?
> 
> Yep, some driver is using your pattern some other not.
> I'm curious about the truth :) (for my education :))

I'd prefer it without braces.

See the end of section 3 in Documentation/process/coding-style.rst .

-- 
Sakari Ailus

  reply	other threads:[~2024-03-15  6:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11  9:00 [PATCH] media: i2c: imx219: Use dev_err_probe on probe Umang Jain
2024-03-11 11:35 ` Tommaso Merciai
2024-03-14 13:21   ` Umang Jain
2024-03-14 14:58     ` Tommaso Merciai
2024-03-15  6:38       ` Sakari Ailus [this message]
2024-03-14 15:21     ` Laurent Pinchart
2024-03-15  6:43       ` Umang Jain
2024-03-28 10:53         ` Laurent Pinchart
2024-03-28 10:59           ` Umang Jain
2024-03-28 11:09             ` Laurent Pinchart
2024-03-28 11:22               ` Umang Jain
2024-04-15  9:13               ` Sakari Ailus

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=ZfPsyFXrlep9sQco@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=tomm.merciai@gmail.com \
    --cc=umang.jain@ideasonboard.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.