diff mbox series

[1/3] ufs: qcom: add __maybe_unused to OF ID table

Message ID 20230310214435.275127-1-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted
Headers show
Series [1/3] ufs: qcom: add __maybe_unused to OF ID table | expand

Commit Message

Krzysztof Kozlowski March 10, 2023, 9:44 p.m. UTC
The driver can be built on ACPI and its .of_match_table uses
of_match_ptr(), thus annotate the actual table as maybe unused.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/ufs/host/ufs-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Konrad Dybcio March 11, 2023, 12:06 a.m. UTC | #1
On 10.03.2023 22:44, Krzysztof Kozlowski wrote:
> The driver can be built on ACPI and its .of_match_table uses
> of_match_ptr(), thus annotate the actual table as maybe unused.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/ufs/host/ufs-qcom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index a02cd866e2f8..82d02e7f3b4f 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -1693,7 +1693,7 @@ static int ufs_qcom_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static const struct of_device_id ufs_qcom_of_match[] = {
> +static const struct of_device_id ufs_qcom_of_match[] __maybe_unused = {
>  	{ .compatible = "qcom,ufshc"},
>  	{},
>  };
Martin K. Petersen March 17, 2023, 3:46 a.m. UTC | #2
Krzysztof,

> The driver can be built on ACPI and its .of_match_table uses
> of_match_ptr(), thus annotate the actual table as maybe unused.

Applied #1-#3 to 6.4/scsi-staging, thanks!
Martin K. Petersen March 24, 2023, 9:06 p.m. UTC | #3
On Fri, 10 Mar 2023 22:44:33 +0100, Krzysztof Kozlowski wrote:

> The driver can be built on ACPI and its .of_match_table uses
> of_match_ptr(), thus annotate the actual table as maybe unused.
> 
> 

Applied to 6.4/scsi-queue, thanks!

[1/3] ufs: qcom: add __maybe_unused to OF ID table
      https://git.kernel.org/mkp/scsi/c/dd3f53301181
[2/3] ufs: exynos: drop of_match_ptr for ID table
      https://git.kernel.org/mkp/scsi/c/cd6a6893ac05
[3/3] ufs: hisi: drop of_match_ptr for ID table
      https://git.kernel.org/mkp/scsi/c/d43250ed0fec
diff mbox series

Patch

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index a02cd866e2f8..82d02e7f3b4f 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1693,7 +1693,7 @@  static int ufs_qcom_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct of_device_id ufs_qcom_of_match[] = {
+static const struct of_device_id ufs_qcom_of_match[] __maybe_unused = {
 	{ .compatible = "qcom,ufshc"},
 	{},
 };