2024-02-18 03:22:44

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v7 01/12] firmware: qcom: add a dedicated TrustZone buffer allocator

On Mon, Feb 05, 2024 at 07:27:59PM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <[email protected]>
[..]
> diff --git a/drivers/firmware/qcom/qcom_tzmem.c b/drivers/firmware/qcom/qcom_tzmem.c
> new file mode 100644
> index 000000000000..44a062f2abd4
> --- /dev/null
> +++ b/drivers/firmware/qcom/qcom_tzmem.c
> @@ -0,0 +1,302 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later

Could you please confirm that "-or-later" is intended?

> +/*
> + * Memory allocator for buffers shared with the TrustZone.
> + *
> + * Copyright (C) 2023 Linaro Ltd.
> + */
[..]
> +/**
> + * qcom_tzmem_pool_new() - Create a new TZ memory pool.
> + * @size: Size of the new pool in bytes.
> + *
> + * Create a new pool of memory suitable for sharing with the TrustZone.
> + *
> + * Must not be used in atomic context.

* Context: Describes whether the function can sleep, what locks it takes,
* releases, or expects to be held. It can extend over multiple
* lines.

> + *
> + * Returns:
> + * New memory pool address or ERR_PTR() on error.

* Return: Describe the return value of function_name.

both from:
https://docs.kernel.org/doc-guide/kernel-doc.html#function-documentation

Regards,
Bjorn