All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dave Stevenson" <dave.stevenson@raspberrypi.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
	media-ci@linuxtv.org
Subject: Re: [PATCH v2 13/13] media: sony-starvis2: Add support for IMX585
Date: Tue, 13 Oct 2026 15:29:21 +0000	[thread overview]
Message-ID: <sashiko-outbox-169998@kernel.org> (raw)
In-Reply-To: <20261013-media-starvis2-v2-13-3670722d250a@raspberrypi.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] media: duplicate .active_area initialization in imx585_variant_def leaves .native_area zeroed
--

commit 189fbc745613583120b9ef2ff05d5e60a02d4cb3
Author: Dave Stevenson <dave.stevenson@raspberrypi.com>

media: sony-starvis2: Add support for IMX585

This commit adds support for the IMX585 8MPix Starvis 2 sensor.

> diff --git a/drivers/media/i2c/sony-starvis2.c b/drivers/media/i2c/sony-starvis2.c
> index 1ce2b86c57acc..c9a3dd4fe529b 100644
> --- a/drivers/media/i2c/sony-starvis2.c
> +++ b/drivers/media/i2c/sony-starvis2.c

[ ... ]

> +const struct starvis2_variant imx585_variant_def = {
> +	.name = "imx585",
> +	.id_reg = CCI_REG16_LE(0x5a1d),
> +	.id_mask = 0x3ff,
> +	.id_value = 0x259,
> +	.active_area = {
> +		.top = 0,
> +		.left = 0,
> +		.width = 3857,
> +		.height = 2201,
> +	},
> +	.active_area = {
> +		.top = 20,
> +		.left = 0,
> +		.width = 3856,
> +		.height = 2180,
> +	},

[Severity: High]
Does this code inadvertently leave .native_area uninitialized?

By defining .active_area twice, the second definition overwrites the first,
leaving .native_area implicitly zero-initialized. When userspace queries
V4L2_SEL_TGT_NATIVE_SIZE via starvis2_get_selection(), it will inadvertently
receive a 0x0 native area.

Was the first .active_area initialization intended to be .native_area?

> +	.pixel_rate = 594000000,
> +	.pix_per_clk = 8,
> +	.common_regs = imx585_common_regs,
> +	.num_common_regs = ARRAY_SIZE(imx585_common_regs),
> +	.vmax_default = 2250,
> +	.hmax_min_link_freq = imx585_min_hmax_2lane,
> +	.hmax_min_pixel_array = 550,
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261013-media-starvis2-v2-0-3670722d250a@raspberrypi.com?part=13

      reply	other threads:[~2026-10-13 15:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13 15:16 [PATCH v2 00/13] Update imx678 to act as a common Sony Starvis 2 driver Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 01/13] media: imx678: Rework into generic Starvis 2 sensor driver Dave Stevenson
2026-10-13 15:32   ` sashiko-bot
2026-10-13 15:17 ` [PATCH v2 02/13] media: sony-starvis2: Reorder link frequencies to remove lookup Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 03/13] media: sony-starvis2: Always program the sensor in window mode Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 04/13] media: sony-starvis2: Parameterise the configuration to allow for other models Dave Stevenson
2026-10-13 15:35   ` sashiko-bot
2026-10-13 15:17 ` [PATCH v2 05/13] media: sony-starvis2: Rework 2 lane support for higher link freqs Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 06/13] media: sony-starvis2: Allow runtime control of link frequency Dave Stevenson
2026-10-13 15:33   ` sashiko-bot
2026-10-13 15:17 ` [PATCH v2 07/13] media: sony-starvis2: Correct the minimum exposure Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 08/13] media: dt-bindings: sony,imx678: Add other Starvis 2 family members Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 09/13] media: sony-starvis2: Add support for IMX662 Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 10/13] media: sony-starvis2: Add support for IMX675 Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 11/13] media: sony-starvis2: Add support for IMX832 Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 12/13] media: sony-starvis2: Only update bits for window mode Dave Stevenson
2026-10-13 15:17 ` [PATCH v2 13/13] media: sony-starvis2: Add support for IMX585 Dave Stevenson
2026-10-13 15:29   ` sashiko-bot [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=sashiko-outbox-169998@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=media-ci@linuxtv.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.