From: sashiko-bot@kernel.org
To: "Jonas Jelonek" <jelonek.jonas@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v11 3/4] net: pse-pd: realtek-pse-mcu: add I2C transport
Date: Mon, 03 Aug 2026 10:01:36 +0000 [thread overview]
Message-ID: <20260803100136.ED3081F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260802100114.720594-4-jelonek.jonas@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `const` qualifier is discarded via casting when passing `req` to `i2c_smbus_write_i2c_block_data`.
--
--- Patch [3]: [PATCH net-next v11 3/4] net: pse-pd: realtek-pse-mcu: add I2C transport ---
commit 3cb487f7edfeb05d920f7d12d74317a730a8187a
Author: Jonas Jelonek <jelonek.jonas@gmail.com>
net: pse-pd: realtek-pse-mcu: add I2C transport
Add the I2C/SMBus transport for the Realtek PSE MCU core. It registers
the MCU on an I2C bus and provides the send/recv callbacks the core
uses to exchange the 12-byte frames.
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
> diff --git a/drivers/net/pse-pd/realtek-pse-mcu-i2c.c b/drivers/net/pse-pd/realtek-pse-mcu-i2c.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/net/pse-pd/realtek-pse-mcu-i2c.c
[ ... ]
> +static int rtpse_mcu_i2c_smbus_send(struct rtpse_mcu_ctrl *pse, const struct rtpse_mcu_msg *req)
> +{
> + struct i2c_client *client = to_i2c_client(pse->dev);
> +
> + /* Send opcode as SMBus command byte; remaining 11 bytes as block data */
> + return i2c_smbus_write_i2c_block_data(client, req->opcode, RTPSE_MCU_MSG_SIZE - 1,
> + (u8 *)req + 1);
[Severity: Low]
This isn't a bug, but could we use a const cast here to avoid discarding the
const qualifier from the req parameter?
The i2c_smbus_write_i2c_block_data() function takes a const u8 * for the
values array, so a cast to (const u8 *) would preserve the const-correctness
of the req pointer.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260802100114.720594-1-jelonek.jonas@gmail.com?part=3
next prev parent reply other threads:[~2026-08-03 10:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 10:01 [PATCH net-next v11 0/4] net: pse-pd: add Realtek PSE MCU support Jonas Jelonek
2026-08-02 10:01 ` [PATCH net-next v11 1/4] dt-bindings: net: pse-pd: add bindings for Realtek PSE MCU Jonas Jelonek
2026-08-06 1:11 ` Jakub Kicinski
2026-08-06 7:19 ` Jonas Jelonek
2026-08-02 10:01 ` [PATCH net-next v11 2/4] net: pse-pd: add Realtek PSE MCU core Jonas Jelonek
2026-08-06 1:11 ` Jakub Kicinski
2026-08-06 8:15 ` Jonas Jelonek
2026-08-02 10:01 ` [PATCH net-next v11 3/4] net: pse-pd: realtek-pse-mcu: add I2C transport Jonas Jelonek
2026-08-03 10:01 ` sashiko-bot [this message]
2026-08-06 1:11 ` Jakub Kicinski
2026-08-06 8:29 ` Jonas Jelonek
2026-08-02 10:01 ` [PATCH net-next v11 4/4] net: pse-pd: realtek-pse-mcu: add UART transport Jonas Jelonek
2026-08-06 1:11 ` Jakub Kicinski
2026-08-06 8:59 ` Jonas Jelonek
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=20260803100136.ED3081F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jelonek.jonas@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox