linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table
@ 2023-03-10 21:44 Krzysztof Kozlowski
  2023-03-10 21:44 ` [PATCH 2/3] ufs: exynos: drop of_match_ptr for " Krzysztof Kozlowski
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-10 21:44 UTC (permalink / raw)
  To: Alim Akhtar, James E.J. Bottomley, Martin K. Petersen,
	Krzysztof Kozlowski, Manivannan Sadhasivam, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, linux-scsi, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-arm-msm

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(-)

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"},
 	{},
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] ufs: exynos: drop of_match_ptr for ID table
  2023-03-10 21:44 [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table Krzysztof Kozlowski
@ 2023-03-10 21:44 ` Krzysztof Kozlowski
  2023-03-11  2:03   ` Alim Akhtar
  2023-03-10 21:44 ` [PATCH 3/3] ufs: hisi: " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-10 21:44 UTC (permalink / raw)
  To: Alim Akhtar, James E.J. Bottomley, Martin K. Petersen,
	Krzysztof Kozlowski, Manivannan Sadhasivam, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, linux-scsi, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-arm-msm

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant here).

  drivers/ufs/host/ufs-exynos.c:1738:34: error: ‘exynos_ufs_of_match’ defined but not used [-Werror=unused-const-variable=]

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

diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c
index 7c985fc38db1..0bf5390739e1 100644
--- a/drivers/ufs/host/ufs-exynos.c
+++ b/drivers/ufs/host/ufs-exynos.c
@@ -1761,7 +1761,7 @@ static struct platform_driver exynos_ufs_pltform = {
 	.driver	= {
 		.name	= "exynos-ufshc",
 		.pm	= &exynos_ufs_pm_ops,
-		.of_match_table = of_match_ptr(exynos_ufs_of_match),
+		.of_match_table = exynos_ufs_of_match,
 	},
 };
 module_platform_driver(exynos_ufs_pltform);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] ufs: hisi: drop of_match_ptr for ID table
  2023-03-10 21:44 [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table Krzysztof Kozlowski
  2023-03-10 21:44 ` [PATCH 2/3] ufs: exynos: drop of_match_ptr for " Krzysztof Kozlowski
@ 2023-03-10 21:44 ` Krzysztof Kozlowski
  2023-03-11  0:06 ` [PATCH 1/3] ufs: qcom: add __maybe_unused to OF " Konrad Dybcio
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-10 21:44 UTC (permalink / raw)
  To: Alim Akhtar, James E.J. Bottomley, Martin K. Petersen,
	Krzysztof Kozlowski, Manivannan Sadhasivam, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, linux-scsi, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, linux-arm-msm

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant here).

  drivers/ufs/host/ufs-hisi.c:561:34: error: ‘ufs_hisi_of_match’ defined but not used [-Werror=unused-const-variable=]

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

diff --git a/drivers/ufs/host/ufs-hisi.c b/drivers/ufs/host/ufs-hisi.c
index 2eed13bc82ca..4c423eba8aa9 100644
--- a/drivers/ufs/host/ufs-hisi.c
+++ b/drivers/ufs/host/ufs-hisi.c
@@ -597,7 +597,7 @@ static struct platform_driver ufs_hisi_pltform = {
 	.driver	= {
 		.name	= "ufshcd-hisi",
 		.pm	= &ufs_hisi_pm_ops,
-		.of_match_table = of_match_ptr(ufs_hisi_of_match),
+		.of_match_table = ufs_hisi_of_match,
 	},
 };
 module_platform_driver(ufs_hisi_pltform);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table
  2023-03-10 21:44 [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table Krzysztof Kozlowski
  2023-03-10 21:44 ` [PATCH 2/3] ufs: exynos: drop of_match_ptr for " Krzysztof Kozlowski
  2023-03-10 21:44 ` [PATCH 3/3] ufs: hisi: " Krzysztof Kozlowski
@ 2023-03-11  0:06 ` Konrad Dybcio
  2023-03-17  3:46 ` Martin K. Petersen
  2023-03-24 21:06 ` Martin K. Petersen
  4 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2023-03-11  0:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Alim Akhtar, James E.J. Bottomley,
	Martin K. Petersen, Manivannan Sadhasivam, Andy Gross,
	Bjorn Andersson, linux-scsi, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, linux-arm-msm



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"},
>  	{},
>  };

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH 2/3] ufs: exynos: drop of_match_ptr for ID table
  2023-03-10 21:44 ` [PATCH 2/3] ufs: exynos: drop of_match_ptr for " Krzysztof Kozlowski
@ 2023-03-11  2:03   ` Alim Akhtar
  0 siblings, 0 replies; 7+ messages in thread
From: Alim Akhtar @ 2023-03-11  2:03 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski', 'James E.J. Bottomley',
	'Martin K. Petersen', 'Manivannan Sadhasivam',
	'Andy Gross', 'Bjorn Andersson',
	'Konrad Dybcio',
	linux-scsi, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	linux-arm-msm

Hi Krzysztof,

> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Saturday, March 11, 2023 3:15 AM
> To: Alim Akhtar <alim.akhtar@samsung.com>; James E.J. Bottomley
> <jejb@linux.ibm.com>; Martin K. Petersen <martin.petersen@oracle.com>;
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>; Manivannan Sadhasivam
> <mani@kernel.org>; Andy Gross <agross@kernel.org>; Bjorn Andersson
> <andersson@kernel.org>; Konrad Dybcio <konrad.dybcio@linaro.org>; linux-
> scsi@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-samsung-
> soc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-
> msm@vger.kernel.org
> Subject: [PATCH 2/3] ufs: exynos: drop of_match_ptr for ID table
> 
> The driver can match only via the DT table so the table should be always used
> and the of_match_ptr does not have any sense (this also allows ACPI matching
> via PRP0001, even though it is not relevant here).
> 
>   drivers/ufs/host/ufs-exynos.c:1738:34: error: ‘exynos_ufs_of_match’ defined
> but not used [-Werror=unused-const-variable=]
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

>  drivers/ufs/host/ufs-exynos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index
> 7c985fc38db1..0bf5390739e1 100644
> --- a/drivers/ufs/host/ufs-exynos.c
> +++ b/drivers/ufs/host/ufs-exynos.c
> @@ -1761,7 +1761,7 @@ static struct platform_driver exynos_ufs_pltform = {
>  	.driver	= {
>  		.name	= "exynos-ufshc",
>  		.pm	= &exynos_ufs_pm_ops,
> -		.of_match_table = of_match_ptr(exynos_ufs_of_match),
> +		.of_match_table = exynos_ufs_of_match,
>  	},
>  };
>  module_platform_driver(exynos_ufs_pltform);
> --
> 2.34.1




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table
  2023-03-10 21:44 [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-03-11  0:06 ` [PATCH 1/3] ufs: qcom: add __maybe_unused to OF " Konrad Dybcio
@ 2023-03-17  3:46 ` Martin K. Petersen
  2023-03-24 21:06 ` Martin K. Petersen
  4 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2023-03-17  3:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Alim Akhtar, James E.J. Bottomley, Martin K. Petersen,
	Manivannan Sadhasivam, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, linux-scsi, linux-arm-kernel, linux-samsung-soc,
	linux-kernel, linux-arm-msm


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	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table
  2023-03-10 21:44 [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2023-03-17  3:46 ` Martin K. Petersen
@ 2023-03-24 21:06 ` Martin K. Petersen
  4 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2023-03-24 21:06 UTC (permalink / raw)
  To: Alim Akhtar, James E.J. Bottomley, Manivannan Sadhasivam,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, linux-scsi,
	linux-arm-kernel, linux-samsung-soc, linux-kernel, linux-arm-msm,
	Krzysztof Kozlowski
  Cc: Martin K . Petersen

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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-24 21:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10 21:44 [PATCH 1/3] ufs: qcom: add __maybe_unused to OF ID table Krzysztof Kozlowski
2023-03-10 21:44 ` [PATCH 2/3] ufs: exynos: drop of_match_ptr for " Krzysztof Kozlowski
2023-03-11  2:03   ` Alim Akhtar
2023-03-10 21:44 ` [PATCH 3/3] ufs: hisi: " Krzysztof Kozlowski
2023-03-11  0:06 ` [PATCH 1/3] ufs: qcom: add __maybe_unused to OF " Konrad Dybcio
2023-03-17  3:46 ` Martin K. Petersen
2023-03-24 21:06 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).