From: sashiko-bot@kernel.org
To: "Wenmeng Liu" <wenmeng.liu@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v4 3/4] media: i2c: og0ve1b: Introduce per-sensor data structure
Date: Wed, 29 Jul 2026 08:22:17 +0000 [thread overview]
Message-ID: <20260729082217.9461A1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260729-og0va1b-v4-3-ec7e7ed87b2b@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Build failure on 32-bit architectures due to 64-bit division without kernel math helpers.
--
--- Patch [3]: [PATCH v4 3/4] media: i2c: og0ve1b: Introduce per-sensor data structure ---
commit 44a11606f1ac2c69b89a34ee20cb6650216651a9
Author: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com>
Subject: media: i2c: og0ve1b: Introduce per-sensor data structure
This commit refactors the driver to separate sensor-specific data from the
common driver code. It introduces a sensor_data structure, populated through
i2c_get_match_data(), to hold chip ID, MCLK frequency, link frequencies, and
supported modes.
> diff --git a/drivers/media/i2c/og0ve1b.c b/drivers/media/i2c/og0ve1b.c
> index da5c8e49d4a81..df428137cfdc1 100644
> --- a/drivers/media/i2c/og0ve1b.c
> +++ b/drivers/media/i2c/og0ve1b.c
[ ... ]
> @@ -330,10 +354,19 @@ static const struct v4l2_ctrl_ops og0ve1b_ctrl_ops = {
> .s_ctrl = og0ve1b_set_ctrl,
> };
>
> +static s64 og0ve1b_pixel_rate(const struct og0ve1b_sensor_data *data)
> +{
> + const struct og0ve1b_mode *mode = &data->modes[0];
> + unsigned int bpp = mode->code == MEDIA_BUS_FMT_Y8_1X8 ? 8 : 10;
> +
> + return data->link_freq_menu[0] / bpp;
[Severity: Low]
Will this 64-bit division cause a linker error on 32-bit architectures?
Because data->link_freq_menu[0] is an s64 and the bpp divisor is evaluated at
runtime, the compiler can no longer constant-fold the division. On 32-bit
architectures (like i386 or arm32), a native 64-bit division by a 32-bit
variable results in an undefined reference to __divdi3 or similar.
Does this code need to use div_s64() or div_u64() instead?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260729-og0va1b-v4-0-ec7e7ed87b2b@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-07-29 8:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 8:04 [PATCH v4 0/4] media: i2c: Add OmniVision OG0VA1B camera sensor driver Wenmeng Liu
2026-07-29 8:04 ` [PATCH v4 1/4] dt-bindings: media: i2c: og0ve1b: Add OmniVision OG0VA1B camera sensor Wenmeng Liu
2026-07-29 8:04 ` [PATCH v4 2/4] media: i2c: og0ve1b: Use monochrome-appropriate test pattern name Wenmeng Liu
2026-07-29 8:04 ` [PATCH v4 3/4] media: i2c: og0ve1b: Introduce per-sensor data structure Wenmeng Liu
2026-07-29 8:22 ` sashiko-bot [this message]
2026-07-29 8:04 ` [PATCH v4 4/4] media: i2c: og0ve1b: Add support for OmniVision OG0VA1B Wenmeng Liu
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=20260729082217.9461A1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=media-ci@linuxtv.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wenmeng.liu@oss.qualcomm.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.