public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: atomisp: Use negation to check for NULL
@ 2026-04-23 18:14 Gabriel Sanches
       [not found] ` <69ea73c6.050a0220.2e08a.1ede@mx.google.com>
  2026-04-24  8:54 ` [PATCH] " Andy Shevchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Gabriel Sanches @ 2026-04-23 18:14 UTC (permalink / raw)
  To: linux-staging, linux-media, linux-kernel, gregkh, sakari.ailus,
	mchehab, hansg, andy
  Cc: ~lkcamp/patches, koike, Gabriel Sanches

Fix checkpath error 'CHECK: Comparison to NULL could be written
"!gmin_subdevs[i].subdev"' in atomisp_gmin_platform.c:650.

Signed-off-by: Gabriel Sanches <gabriel@gsr.dev>
---

Hey, this is my first patch ever. I would appreciate any
feedback. Thanks!
---
 drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
index 4026e98c5845..620924614ee3 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
@@ -647,7 +647,7 @@ static struct gmin_subdev *find_free_gmin_subdev_slot(void)
 	unsigned int i;
 
 	for (i = 0; i < MAX_SUBDEVS; i++)
-		if (gmin_subdevs[i].subdev == NULL)
+		if (!gmin_subdevs[i].subdev)
 			return &gmin_subdevs[i];
 	return NULL;
 }
-- 
2.52.0


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

* Re: media: atomisp: Use negation to check for NULL
       [not found] ` <69ea73c6.050a0220.2e08a.1ede@mx.google.com>
@ 2026-04-23 19:43   ` Gabriel
  0 siblings, 0 replies; 4+ messages in thread
From: Gabriel @ 2026-04-23 19:43 UTC (permalink / raw)
  To: linux-media

Looks like a CI error:

ERROR: Failed to remove container f9fa45e1527a49c9d421f98e82fd1cd23b249da7325fb34ad7b8a86bf35fcbed
ERROR: Failed to remove container d79ed1127e9d8d8945eafad2585f86e05c503acb8a78d75991bda515b7a9f20a
ERROR: Failed to cleanup volumes
ERROR: Job failed (system failure): waiting for container: error during connect: Post "http://internal.tunnel.invalid/v1.47/containers/f9fa45e1527a49c9d421f98e82fd1cd23b249da7325fb34ad7b8a86bf35fcbed/wait?condition=not-running": ssh tunnel: read tcp 10.128.0.5:39928->10.128.0.121:22: read: connection reset by peer (%!s(<nil>))

I'm not sure there's anything for me to fix in the patch, considering how simple and minimal it is...

On Thu, Apr 23, 2026, at 16:32, Patchwork Integration wrote:
> Dear Gabriel Sanches:
>
> Thanks for your patches! Unfortunately the Media CI robot detected some
> issues:
>
>
>
> Please fix your series, and upload a new version. If you have a patchwork
> account, do not forget to mark the current series as Superseded.
>
> For more details, check the full report at:
> https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/98123422/artifacts/report.htm 
> .
>
>
>
> Best regards, and Happy Hacking!
> Media CI robot on behalf of the linux-media community.
>
> ---
> Check the latest rules for contributing your patches at:
> https://docs.kernel.org/driver-api/media/maintainer-entry-profile.html
>
> If you believe that the CI is wrong, kindly open an issue at
> https://gitlab.freedesktop.org/linux-media/media-ci/-/issues or reply-all
> to this message.

-- 
Gabriel Sanches

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

* Re: [PATCH] media: atomisp: Use negation to check for NULL
  2026-04-23 18:14 [PATCH] media: atomisp: Use negation to check for NULL Gabriel Sanches
       [not found] ` <69ea73c6.050a0220.2e08a.1ede@mx.google.com>
@ 2026-04-24  8:54 ` Andy Shevchenko
  2026-04-28  1:58   ` Helen Koike
  1 sibling, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2026-04-24  8:54 UTC (permalink / raw)
  To: Gabriel Sanches
  Cc: linux-staging, linux-media, linux-kernel, gregkh, sakari.ailus,
	mchehab, hansg, andy, ~lkcamp/patches, koike

On Thu, Apr 23, 2026 at 03:14:36PM -0300, Gabriel Sanches wrote:

...

> Hey, this is my first patch ever. I would appreciate any
> feedback. Thanks!

Please, start reviewing others' patches for the same driver and read other
reviews and learn from them first.

I'm not going to repeat what I said already several times on a patches like
this over the very same driver (atomisp).

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] media: atomisp: Use negation to check for NULL
  2026-04-24  8:54 ` [PATCH] " Andy Shevchenko
@ 2026-04-28  1:58   ` Helen Koike
  0 siblings, 0 replies; 4+ messages in thread
From: Helen Koike @ 2026-04-28  1:58 UTC (permalink / raw)
  To: Andy Shevchenko, Gabriel Sanches
  Cc: linux-staging, linux-media, linux-kernel, gregkh, sakari.ailus,
	mchehab, hansg, andy, ~lkcamp/patches

Hi Gabriel,

Thanks for your patch, please see my comments below.

On 4/23/26 3:14 PM, Gabriel Sanches wrote:
 > Fix checkpath error 'CHECK: Comparison to NULL could be written

typo: checkpatch.

On 4/24/26 5:54 AM, Andy Shevchenko wrote:
> On Thu, Apr 23, 2026 at 03:14:36PM -0300, Gabriel Sanches wrote:
> 
> ...
> 
>> Hey, this is my first patch ever. I would appreciate any
>> feedback. Thanks!
> 
> Please, start reviewing others' patches for the same driver and read other
> reviews and learn from them first.

Gabriel, fyi, you can check previous reviews on this driver on 
lore.kernel.org, for instance: https://lore.kernel.org/all/?q=atomisp

> 
> I'm not going to repeat what I said already several times on a patches like
> this over the very same driver (atomisp).
> 

You can see in the previous reviews a few comments to not fix just a 
single occurrence of the issue on the driver, but to fix in a set of 
files or in the entire driver.

By running checkpatch recursively on the entire driver, I found 5 
occurrences of this same problem.

You can check with:

   find drivers/staging/media/atomisp -name "*.c" -o -name "*.h" \
     | xargs scripts/checkpatch.pl -f 2>&1 \
     | grep -A3 "Comparison to NULL"

I hope this helps.

Regards,
Helen

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

end of thread, other threads:[~2026-04-28  1:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 18:14 [PATCH] media: atomisp: Use negation to check for NULL Gabriel Sanches
     [not found] ` <69ea73c6.050a0220.2e08a.1ede@mx.google.com>
2026-04-23 19:43   ` Gabriel
2026-04-24  8:54 ` [PATCH] " Andy Shevchenko
2026-04-28  1:58   ` Helen Koike

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