From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
Cc: "sakari.ailus@linux.intel.com" <sakari.ailus@linux.intel.com>,
"Himanshu Bhavani" <himanshu.bhavani@siliconsignals.io>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Hans Verkuil" <hverkuil@xs4all.nl>,
"André Apitzsch" <git@apitzsch.eu>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"Hans de Goede" <hansg@kernel.org>,
"Tarang Raval" <tarang.raval@siliconsignals.io>,
"Jingjing Xiong" <jingjing.xiong@intel.com>,
"Dongcheng Yan" <dongcheng.yan@intel.com>,
"Sylvain Petinot" <sylvain.petinot@foss.st.com>,
"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
"Matthias Fend" <matthias.fend@emfend.at>,
"Arnd Bergmann" <arnd@arndb.de>,
"Heimir Thor Sverrisson" <heimir.sverrisson@gmail.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] media: i2c: add ov2735 image sensor driver
Date: Tue, 8 Jul 2025 16:10:15 +0300 [thread overview]
Message-ID: <aG0Yt4bewAgqsYLd@smile.fi.intel.com> (raw)
In-Reply-To: <PN3P287MB351968C7B57C3C97D799D1E1FF4EA@PN3P287MB3519.INDP287.PROD.OUTLOOK.COM>
On Tue, Jul 08, 2025 at 07:04:48AM +0000, Hardevsinh Palaniya wrote:
> > On Mon, Jul 07, 2025 at 08:31:06PM +0530, Hardevsinh Palaniya wrote:
...
> > > +static int ov2735_disable_streams(struct v4l2_subdev *sd,
> > > + struct v4l2_subdev_state *state, u32 pad,
> > > + u64 streams_mask)
> > > +{
> > > + struct ov2735 *ov2735 = to_ov2735(sd);
> > > + int ret = 0;
> > > +
> > > + /* set stream off register */
> > > + ret = cci_write(ov2735->cci, OV2735_REG_PAGE_SELECT, 0x01, NULL);
> > > + ret |= cci_write(ov2735->cci, OV2735_REG_STREAM_CTRL, OV2735_STREAM_OFF, NULL);
> >
> > Why not using the ret parameter? Same for other similar cases above and beyond.
>
> I am not sure what you want to suggest here.
>
> Do I need to check ret like this?
>
> ret = cci_write(ov2735->cci, OV2735_REG_PAGE_SELECT, 0x01, NULL);
> if (ret) {
> // error message
> }
>
> ret = cci_write(ov2735->cci, OV2735_REG_STREAM_CTRL, OV2735_STREAM_OFF, NULL);
> if (ret) {
> // error message
> }
No, this is the idea behind it, you check only when you need it.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-07-08 13:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 15:01 [PATCH 0/2] media: i2c: Add ov2735 camera " Hardevsinh Palaniya
2025-07-07 15:01 ` [PATCH 1/2] dt-bindings: media: i2c: Add ov2735 sensor Hardevsinh Palaniya
2025-07-07 15:01 ` [PATCH 2/2] media: i2c: add ov2735 image sensor driver Hardevsinh Palaniya
2025-07-07 20:29 ` Andy Shevchenko
2025-07-08 7:04 ` Hardevsinh Palaniya
2025-07-08 7:41 ` Yan, Dongcheng
2025-07-08 13:10 ` Andy Shevchenko [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=aG0Yt4bewAgqsYLd@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=benjamin.mugnier@foss.st.com \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dongcheng.yan@intel.com \
--cc=git@apitzsch.eu \
--cc=hansg@kernel.org \
--cc=hardevsinh.palaniya@siliconsignals.io \
--cc=heimir.sverrisson@gmail.com \
--cc=himanshu.bhavani@siliconsignals.io \
--cc=hverkuil@xs4all.nl \
--cc=jingjing.xiong@intel.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=matthias.fend@emfend.at \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sylvain.petinot@foss.st.com \
--cc=tarang.raval@siliconsignals.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®