Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Anup Patel" <anup.patel@oss.qualcomm.com>
Cc: linux-clk@vger.kernel.org
Subject: Re: [PATCH v3 5/5] mailbox: convert RISC-V SBI MPXY to direct transmit
Date: Fri, 04 Dec 2026 13:30:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-249868@kernel.org> (raw)
In-Reply-To: <20261204111504.3362889-6-anup.patel@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mailbox: unreachable RPMI branch left in mpxy_mbox_send_data()
--

commit 236cec5e09e977002a36822668bce1817d3838a1
Author: Jassi Brar <jassisinghbrar@gmail.com>

mailbox: convert RISC-V SBI MPXY to direct transmit

This commit converts RISC-V SBI MPXY RPMI channels from the queued mailbox
transmit path to direct synchronous transmit via send_data_sync() and
mbox_send_message_sync(), and drops the obsolete client flags from the RPMI
drivers.

> diff --git a/drivers/mailbox/riscv-sbi-mpxy-mbox.c b/drivers/mailbox/riscv-sbi-mpxy-mbox.c
> index 432972195e468..5134a88fa984c 100644
> --- a/drivers/mailbox/riscv-sbi-mpxy-mbox.c
> +++ b/drivers/mailbox/riscv-sbi-mpxy-mbox.c

[ ... ]

> @@ -586,8 +605,14 @@ static int mpxy_mbox_probe(struct platform_device *pdev)
>  						   mbox->channel_count);
>  	if (!mbox->controller.chans)
>  		return -ENOMEM;
> -	for (i = 0; i < mbox->channel_count; i++)
> -		mbox->controller.chans[i].con_priv = &mbox->channels[i];
> +	for (i = 0; i < mbox->channel_count; i++) {
> +		struct mbox_chan *chan = &mbox->controller.chans[i];
> +		struct mpxy_mbox_channel *mchan = &mbox->channels[i];
> +
> +		chan->con_priv = mchan;
> +		if (mchan->attrs.msg_proto_id == SBI_MPXY_MSGPROTO_RPMI_ID)
> +			chan->sync_caps = MBOX_CHAN_CAP_SYNC_ATOMIC;
> +	}

[Severity: Low]
Can the SBI_MPXY_MSGPROTO_RPMI_ID branch in mpxy_mbox_send_data() be removed
now?

Every RPMI channel gets MBOX_CHAN_CAP_SYNC_ATOMIC here, so
mbox_send_message() and the other queued-path entry points return early
before msg_submit() can call ops->send_data().  Leaving that dead branch in
place suggests RPMI channels can still take the queued path.

Since mbox_controller_register() still requires a non-NULL .send_data for any
non-RPMI MPXY channel, mpxy_mbox_send_data() can simply return -EOPNOTSUPP.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204111504.3362889-1-anup.patel@oss.qualcomm.com?part=5

      reply	other threads:[~2026-12-04 13:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 11:14 [PATCH v3 0/5] Parallel message send using SBI MPXY Anup Patel
2026-12-04 11:15 ` [PATCH v3 1/5] RISC-V: Move common MPXY helper routines to arch/riscv Anup Patel
2026-12-04 11:47   ` sashiko-bot
2026-12-04 11:15 ` [PATCH v3 2/5] RISC-V: Prevent interrupt when accessing MPXY shared memory Anup Patel
2026-12-04 12:06   ` sashiko-bot
2026-12-04 11:15 ` [PATCH v3 3/5] mailbox: add direct synchronous transmit API Anup Patel
2026-12-04 12:26   ` sashiko-bot
2026-12-04 11:15 ` [PATCH v3 4/5] mailbox: document direct synchronous transmit Anup Patel
2026-12-04 12:34   ` sashiko-bot
2026-12-04 11:15 ` [PATCH v3 5/5] mailbox: convert RISC-V SBI MPXY to direct transmit Anup Patel
2026-12-04 13:30   ` 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-249868@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=anup.patel@oss.qualcomm.com \
    --cc=linux-clk@vger.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