[PATCH v2] firmware: qcom: tzmem: fix qcom_tzmem_policy kernel-doc

Randy Dunlap posted 1 patch 3 months, 3 weeks ago
include/linux/firmware/qcom/qcom_tzmem.h |   15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
[PATCH v2] firmware: qcom: tzmem: fix qcom_tzmem_policy kernel-doc
Posted by Randy Dunlap 3 months, 3 weeks ago
Fix kernel-doc warnings by using correct kernel-doc syntax and
formatting to prevent warnings:

Warning: include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
 'QCOM_TZMEM_POLICY_STATIC' not described in enum 'qcom_tzmem_policy'
Warning: ../include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
 'QCOM_TZMEM_POLICY_MULTIPLIER' not described in enum 'qcom_tzmem_policy'
Warning: ../include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
 'QCOM_TZMEM_POLICY_ON_DEMAND' not described in enum 'qcom_tzmem_policy'

Fixes: 84f5a7b67b61 ("firmware: qcom: add a dedicated TrustZone buffer allocator")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
v2: drop "area:" from Subject.
    Fix kernel-doc comments to have the ending "*/" on a separate line
    by itself. Otherwise scripts/kernel-doc becomes confused and skips
    the enum and the following struct!

Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org
---
 include/linux/firmware/qcom/qcom_tzmem.h |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

--- linux-next-20251016.orig/include/linux/firmware/qcom/qcom_tzmem.h
+++ linux-next-20251016/include/linux/firmware/qcom/qcom_tzmem.h
@@ -17,11 +17,20 @@ struct qcom_tzmem_pool;
  * enum qcom_tzmem_policy - Policy for pool growth.
  */
 enum qcom_tzmem_policy {
-	/**< Static pool, never grow above initial size. */
+	/**
+	 * @QCOM_TZMEM_POLICY_STATIC: Static pool,
+	 * never grow above initial size.
+	 */
 	QCOM_TZMEM_POLICY_STATIC = 1,
-	/**< When out of memory, add increment * current size of memory. */
+	/**
+	 * @QCOM_TZMEM_POLICY_MULTIPLIER: When out of memory,
+	 * add increment * current size of memory.
+	 */
 	QCOM_TZMEM_POLICY_MULTIPLIER,
-	/**< When out of memory add as much as is needed until max_size. */
+	/**
+	 * @QCOM_TZMEM_POLICY_ON_DEMAND: When out of memory
+	 * add as much as is needed until max_size.
+	 */
 	QCOM_TZMEM_POLICY_ON_DEMAND,
 };
Re: [PATCH v2] firmware: qcom: tzmem: fix qcom_tzmem_policy kernel-doc
Posted by Konrad Dybcio 3 months, 2 weeks ago
On 10/17/25 9:13 PM, Randy Dunlap wrote:
> Fix kernel-doc warnings by using correct kernel-doc syntax and
> formatting to prevent warnings:
> 
> Warning: include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
>  'QCOM_TZMEM_POLICY_STATIC' not described in enum 'qcom_tzmem_policy'
> Warning: ../include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
>  'QCOM_TZMEM_POLICY_MULTIPLIER' not described in enum 'qcom_tzmem_policy'
> Warning: ../include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
>  'QCOM_TZMEM_POLICY_ON_DEMAND' not described in enum 'qcom_tzmem_policy'
> 
> Fixes: 84f5a7b67b61 ("firmware: qcom: add a dedicated TrustZone buffer allocator")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> v2: drop "area:" from Subject.
>     Fix kernel-doc comments to have the ending "*/" on a separate line
>     by itself. Otherwise scripts/kernel-doc becomes confused and skips
>     the enum and the following struct!

this is fun!

> 
> Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Cc: Konrad Dybcio <konradybcio@kernel.org>
> Cc: linux-arm-msm@vger.kernel.org
> ---
>  include/linux/firmware/qcom/qcom_tzmem.h |   15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> --- linux-next-20251016.orig/include/linux/firmware/qcom/qcom_tzmem.h
> +++ linux-next-20251016/include/linux/firmware/qcom/qcom_tzmem.h
> @@ -17,11 +17,20 @@ struct qcom_tzmem_pool;
>   * enum qcom_tzmem_policy - Policy for pool growth.
>   */
>  enum qcom_tzmem_policy {
> -	/**< Static pool, never grow above initial size. */
> +	/**
> +	 * @QCOM_TZMEM_POLICY_STATIC: Static pool,
> +	 * never grow above initial size.
> +	 */
>  	QCOM_TZMEM_POLICY_STATIC = 1,
> -	/**< When out of memory, add increment * current size of memory. */
> +	/**
> +	 * @QCOM_TZMEM_POLICY_MULTIPLIER: When out of memory,
> +	 * add increment * current size of memory.
> +	 */
>  	QCOM_TZMEM_POLICY_MULTIPLIER,
> -	/**< When out of memory add as much as is needed until max_size. */
> +	/**
> +	 * @QCOM_TZMEM_POLICY_ON_DEMAND: When out of memory
> +	 * add as much as is needed until max_size.
> +	 */
>  	QCOM_TZMEM_POLICY_ON_DEMAND,

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad