Re: [PATCH 02/10] accel/amdxdna: Support hardware mailbox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



…
> +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
> @@ -0,0 +1,582 @@
…
> +int xdna_mailbox_send_msg(struct mailbox_channel *mb_chann,
> +			  const struct xdna_mailbox_msg *msg, u64 tx_timeout)
> +{
> +	struct xdna_msg_header *header;
> +	struct mailbox_msg *mb_msg;

I propose to take another software design option better into account
also according to the application of scope-based resource management.

* You may reduce the scopes of such local variables.

* Would you like to use the attribute “__free(kfree)” accordingly?
  https://elixir.bootlin.com/linux/v6.10/source/include/linux/slab.h#L282

…
> +	mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
…


Regards,
Markus




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux