[PATCH v5 2/3] mailbox: add Samsung Exynos driver
Jassi Brar
jassisinghbrar at gmail.com
Wed Dec 18 08:58:09 PST 2024
On Tue, Dec 17, 2024 at 3:40 AM Tudor Ambarus <tudor.ambarus at linaro.org> wrote:
....
> +
> +static int exynos_mbox_chan_index(struct mbox_chan *chan)
> +{
> + struct mbox_controller *mbox = chan->mbox;
> + int i;
> +
> + for (i = 0; i < mbox->num_chans; i++)
> + if (chan == &mbox->chans[i])
> + return i;
> + return -EINVAL;
> +}
>
Maybe simply return (chan - mbox->chans) ?
Cheers!
More information about the linux-arm-kernel
mailing list