Re: [PATCH] mailbox: Document the behavior of mbox_send_message() w/ NULL mssg

From: Jassi Brar

Date: Tue Jan 06 2026 - 19:04:15 EST


On Tue, Jan 6, 2026 at 11:42 AM Doug Anderson <dianders@xxxxxxxxxxxx> wrote:
>
> > > Anyway, I'm not 100% set on any one solution, I just see that the NULL
> > > case is (unexpectedly) different and either want it documented or to
> > > fix it so it's not different (ideally without angry people with
> > > pitchforks coming after me because I changed behavior). :-)
> > >
> > Yes, I too think we should leave the existing api alone to be safe.
> > For new pure-doorbell clients, how about something like
> > #define MBOX_NODATA ERR_PTR(-ENOMEM)
> > mailbox_ring_doorbell(chan)
> > {
> > mailbox_send_message(chan, MBOX_NODATA)
> > }
> > because the underlying controller driver anyway ignores the submitted
> > 'mssg' pointer.
> >
> > And of course add the clarification comment in this patch.
>
> OK, how about this for a plan:
>
> 1. A patch to introduce the new mbox_ring_doorbell() API, which will
> behave nearly the same as the existing mailbox_send_message(chan,
> NULL) case.
>
> 2. A series of patches transitioning all existing upstream users that
> are passing NULL to use mbox_ring_doorbell().
>
> 3. A patch making it an error to pass NULL as the `mmsg`.
>
> Does that work for you?
>
Sounds good. Thank you!