[PATCH v2 17/18] firmware: arm_ffa: Add support for handling framework notifications
Sudeep Holla
sudeep.holla at arm.com
Wed Feb 12 02:57:21 PST 2025
On Mon, Feb 10, 2025 at 03:47:43PM +0530, Viresh Kumar wrote:
> On 31-01-25, 11:24, Sudeep Holla wrote:
> > +static void handle_fwk_notif_callbacks(u32 bitmap)
> > +{
> > + void *buf;
> > + uuid_t uuid;
> > + int notify_id = 0, target;
> > + struct ffa_indirect_msg_hdr *msg;
> > + struct notifier_cb_info *cb_info = NULL;
> > +
> > + /* Only one framework notification defined and supported for now */
> > + if (!(bitmap & FRAMEWORK_NOTIFY_RX_BUFFER_FULL))
> > + return;
> > +
> > + mutex_lock(&drv_info->rx_lock);
> > +
> > + msg = drv_info->rx_buffer;
> > + buf = kmalloc(msg->size, GFP_KERNEL);
> > + if (!buf) {
> > + mutex_unlock(&drv_info->rx_lock);
> > + return;
> > + }
> > + memcpy(buf, (void *)msg + msg->offset, msg->size);
>
> Can use kmemdup() here instead.
>
Thanks for the suggestion. I have fixed locally. I will not respin the
series if there are no other major changes needed, will apply with this
suggestion included directly.
--
Regards,
Sudeep
More information about the linux-arm-kernel
mailing list