public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: media: atomisp: ov2722: clean up ov2722_startup()
@ 2026-04-29  2:03 auth
  2026-04-29  5:48 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: auth @ 2026-04-29  2:03 UTC (permalink / raw)
  To: Andy Shevchenko, Hans de Goede, Mauro Carvalho Chehab,
	Sakari Ailus, Greg Kroah-Hartman, Kees Cook, auth, Josh Poimboeuf,
	Ingo Molnar,
	open list:INTEL MID (Mobile Internet Device) PLATFORM,
	open list:STAGING - ATOMISP DRIVER, open list:STAGING SUBSYSTEM

Replace misleading comment with description of the function's purpose. Also replace return ret with return 0 since ret is guaranteed to be zero at that point.

Signed-off-by: auth <skunkolee@gmail.com>
---
 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
index 2c41c496daa6..5f3712d6b81f 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
@@ -599,7 +599,7 @@ static int ov2722_s_power(struct v4l2_subdev *sd, int on)
 	return ret;
 }
 
-/* TODO: remove it. */
+/* Initialize OV2722 sensor */
 static int ov2722_startup(struct v4l2_subdev *sd)
 {
 	struct ov2722_device *dev = to_ov2722_sensor(sd);
@@ -619,7 +619,7 @@ static int ov2722_startup(struct v4l2_subdev *sd)
 		return ret;
 	}
 
-	return ret;
+	return 0;
 }
 
 static int ov2722_set_fmt(struct v4l2_subdev *sd,
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: media: atomisp: ov2722: clean up ov2722_startup()
  2026-04-29  2:03 [PATCH] staging: media: atomisp: ov2722: clean up ov2722_startup() auth
@ 2026-04-29  5:48 ` Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-04-29  5:48 UTC (permalink / raw)
  To: auth
  Cc: Andy Shevchenko, Hans de Goede, Mauro Carvalho Chehab,
	Sakari Ailus, Greg Kroah-Hartman, Kees Cook, Josh Poimboeuf,
	Ingo Molnar,
	open list:INTEL MID (Mobile Internet Device) PLATFORM,
	open list:STAGING - ATOMISP DRIVER, open list:STAGING SUBSYSTEM

On Wed, Apr 29, 2026 at 5:04 AM auth <skunkolee@gmail.com> wrote:
>
> Replace misleading comment with description of the function's purpose. Also replace return ret with return 0 since ret is guaranteed to be zero at that point.

First of all, wrap the commit message to the ~72 characters per line.
Second, Why do you think the comment is misleading? It's a TODO item.
Perhaps the better change is to address that?

> Signed-off-by: auth <skunkolee@gmail.com>

Last but not least, use your real name.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] staging: media: atomisp: ov2722: clean up ov2722_startup()
@ 2026-04-29 23:41 Jack Lee
  2026-04-30  6:05 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Lee @ 2026-04-29 23:41 UTC (permalink / raw)
  To: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
	Andy Shevchenko, Greg Kroah-Hartman, Jack Lee, Josh Poimboeuf,
	Kees Cook, Ingo Molnar, open list:STAGING - ATOMISP DRIVER,
	open list:INTEL MID (Mobile Internet Device) PLATFORM,
	open list:STAGING SUBSYSTEM

Remove stale TODO comment that has been present since the file
was first added to staging in 2017 and was never really acted on.
Also replace return ret with return 0 since ret is guaranteed
to be zero at that point, both write calls return early on
failure.

Signed-off-by: Jack Lee <skunkolee@gmail.com>
---
 drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
index 2c41c496daa6..fcd71cc55731 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
@@ -599,7 +599,6 @@ static int ov2722_s_power(struct v4l2_subdev *sd, int on)
 	return ret;
 }
 
-/* TODO: remove it. */
 static int ov2722_startup(struct v4l2_subdev *sd)
 {
 	struct ov2722_device *dev = to_ov2722_sensor(sd);
@@ -619,7 +618,7 @@ static int ov2722_startup(struct v4l2_subdev *sd)
 		return ret;
 	}
 
-	return ret;
+	return 0;
 }
 
 static int ov2722_set_fmt(struct v4l2_subdev *sd,
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: media: atomisp: ov2722: clean up ov2722_startup()
  2026-04-29 23:41 Jack Lee
@ 2026-04-30  6:05 ` Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-04-30  6:05 UTC (permalink / raw)
  To: Jack Lee
  Cc: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
	Andy Shevchenko, Greg Kroah-Hartman, Josh Poimboeuf, Kees Cook,
	Ingo Molnar, open list:STAGING - ATOMISP DRIVER,
	open list:INTEL MID (Mobile Internet Device) PLATFORM,
	open list:STAGING SUBSYSTEM

On Wed, Apr 29, 2026 at 05:41:06PM -0600, Jack Lee wrote:
> Remove stale TODO comment that has been present since the file
> was first added to staging in 2017 and was never really acted on.
> Also replace return ret with return 0 since ret is guaranteed
> to be zero at that point, both write calls return early on
> failure.

NAK. This is not a real change. It has no value on itself.
Moreover, it removes a comment without actually addressing it.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-30  6:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29  2:03 [PATCH] staging: media: atomisp: ov2722: clean up ov2722_startup() auth
2026-04-29  5:48 ` Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2026-04-29 23:41 Jack Lee
2026-04-30  6:05 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox