All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: gregkh@linuxfoundation.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	Lee Jones <lee.jones@linaro.org>, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Felipe Balbi <balbi@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-arm-msm@vger.kernel.org
Subject: [PATCH 29/32] usb: dwc3: dwc3-qcom: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
Date: Mon,  6 Jul 2020 14:33:38 +0100	[thread overview]
Message-ID: <20200706133341.476881-30-lee.jones@linaro.org> (raw)
In-Reply-To: <20200706133341.476881-1-lee.jones@linaro.org>

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
struct dwc3_qcom_acpi_match becomes defined by unused.

Also need to place the platform data obtained via the matching process
inside the #ifdef, else that becomes unused too.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/dwc3/dwc3-qcom.c:761:36: warning: ‘dwc3_qcom_acpi_match’ defined but not used [-Wunused-const-variable=]
 761 | static const struct acpi_device_id dwc3_qcom_acpi_match[] = {
 | ^~~~~~~~~~~~~~~~~~~~

Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc3/dwc3-qcom.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 1dfd024cd06b1..e1e78e9824b16 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -540,16 +540,6 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct dwc3_acpi_pdata sdm845_acpi_pdata = {
-	.qscratch_base_offset = SDM845_QSCRATCH_BASE_OFFSET,
-	.qscratch_base_size = SDM845_QSCRATCH_SIZE,
-	.dwc3_core_base_size = SDM845_DWC3_CORE_SIZE,
-	.hs_phy_irq_index = 1,
-	.dp_hs_phy_irq_index = 4,
-	.dm_hs_phy_irq_index = 3,
-	.ss_phy_irq_index = 2
-};
-
 static int dwc3_qcom_probe(struct platform_device *pdev)
 {
 	struct device_node	*np = pdev->dev.of_node;
@@ -758,11 +748,23 @@ static const struct of_device_id dwc3_qcom_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, dwc3_qcom_of_match);
 
+#ifdef CONFIG_ACPI
+static const struct dwc3_acpi_pdata sdm845_acpi_pdata = {
+	.qscratch_base_offset = SDM845_QSCRATCH_BASE_OFFSET,
+	.qscratch_base_size = SDM845_QSCRATCH_SIZE,
+	.dwc3_core_base_size = SDM845_DWC3_CORE_SIZE,
+	.hs_phy_irq_index = 1,
+	.dp_hs_phy_irq_index = 4,
+	.dm_hs_phy_irq_index = 3,
+	.ss_phy_irq_index = 2
+};
+
 static const struct acpi_device_id dwc3_qcom_acpi_match[] = {
 	{ "QCOM2430", (unsigned long)&sdm845_acpi_pdata },
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, dwc3_qcom_acpi_match);
+#endif
 
 static struct platform_driver dwc3_qcom_driver = {
 	.probe		= dwc3_qcom_probe,
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: gregkh@linuxfoundation.org
Cc: Felipe Balbi <balbi@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Lee Jones <lee.jones@linaro.org>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 29/32] usb: dwc3: dwc3-qcom: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
Date: Mon,  6 Jul 2020 14:33:38 +0100	[thread overview]
Message-ID: <20200706133341.476881-30-lee.jones@linaro.org> (raw)
In-Reply-To: <20200706133341.476881-1-lee.jones@linaro.org>

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
struct dwc3_qcom_acpi_match becomes defined by unused.

Also need to place the platform data obtained via the matching process
inside the #ifdef, else that becomes unused too.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/dwc3/dwc3-qcom.c:761:36: warning: ‘dwc3_qcom_acpi_match’ defined but not used [-Wunused-const-variable=]
 761 | static const struct acpi_device_id dwc3_qcom_acpi_match[] = {
 | ^~~~~~~~~~~~~~~~~~~~

Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc3/dwc3-qcom.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 1dfd024cd06b1..e1e78e9824b16 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -540,16 +540,6 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct dwc3_acpi_pdata sdm845_acpi_pdata = {
-	.qscratch_base_offset = SDM845_QSCRATCH_BASE_OFFSET,
-	.qscratch_base_size = SDM845_QSCRATCH_SIZE,
-	.dwc3_core_base_size = SDM845_DWC3_CORE_SIZE,
-	.hs_phy_irq_index = 1,
-	.dp_hs_phy_irq_index = 4,
-	.dm_hs_phy_irq_index = 3,
-	.ss_phy_irq_index = 2
-};
-
 static int dwc3_qcom_probe(struct platform_device *pdev)
 {
 	struct device_node	*np = pdev->dev.of_node;
@@ -758,11 +748,23 @@ static const struct of_device_id dwc3_qcom_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, dwc3_qcom_of_match);
 
+#ifdef CONFIG_ACPI
+static const struct dwc3_acpi_pdata sdm845_acpi_pdata = {
+	.qscratch_base_offset = SDM845_QSCRATCH_BASE_OFFSET,
+	.qscratch_base_size = SDM845_QSCRATCH_SIZE,
+	.dwc3_core_base_size = SDM845_DWC3_CORE_SIZE,
+	.hs_phy_irq_index = 1,
+	.dp_hs_phy_irq_index = 4,
+	.dm_hs_phy_irq_index = 3,
+	.ss_phy_irq_index = 2
+};
+
 static const struct acpi_device_id dwc3_qcom_acpi_match[] = {
 	{ "QCOM2430", (unsigned long)&sdm845_acpi_pdata },
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, dwc3_qcom_acpi_match);
+#endif
 
 static struct platform_driver dwc3_qcom_driver = {
 	.probe		= dwc3_qcom_probe,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-07-06 13:34 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 13:33 [PATCH 00/32] Fix the final bunch of W=1 issues in USB Lee Jones
2020-07-06 13:33 ` Lee Jones
2020-07-06 13:33 ` [PATCH 01/32] usb: misc: legousbtower: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 02/32] usb: chipidea: ci_hdrc_pci: Fix improper use of kerneldoc format Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 03/32] usb: gadget: legacy: printer: Remove unused variable 'driver_desc' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 04/32] usb: gadget: udc: amd5536udc_pci: Remove unused variable 'mod_desc' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 05/32] usb: gadget: function: u_ether: Downgrade kerneldoc headers which to not make the mark Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 06/32] usb: gadget: udc: pxa27x_udc: Fix a bunch of kerneldoc issues Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-08 10:32   ` Robert Jarzmik
2020-07-08 10:32     ` Robert Jarzmik
2020-07-06 13:33 ` [PATCH 07/32] usb: misc: legousbtower: Demote function header which is clearly not kerneldoc Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 08/32] usb: typec: tcpm: tcpm: Remove dangling unused 'struct tcpm_altmode_ops' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 14:00   ` Hans de Goede
2020-07-06 14:00     ` Hans de Goede
2020-07-06 14:20     ` Lee Jones
2020-07-06 14:20       ` Lee Jones
2020-07-09 12:50       ` Hans de Goede
2020-07-09 12:50         ` Hans de Goede
2020-07-09 13:04         ` Lee Jones
2020-07-09 13:04           ` Lee Jones
2020-07-14 12:01       ` Hans de Goede
2020-07-14 12:01         ` Hans de Goede
2020-07-14 13:54         ` Lee Jones
2020-07-14 13:54           ` Lee Jones
2020-09-01  2:32           ` Badhri Jagan Sridharan
2020-09-01  2:32             ` Badhri Jagan Sridharan
2020-09-01  7:20             ` Hans de Goede
2020-09-01  7:20               ` Hans de Goede
2020-07-06 13:33 ` [PATCH 09/32] usb: gadget: udc: atmel_usba_udc: Remove set but unused variable 'pp' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 10/32] usb: gadget: legacy: nokia: Remove unused static variable 'product_nokia' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 11/32] usb: gadget: function: f_fs: Demote function header which is clearly not kerneldoc Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 12/32] usb: gadget: udc: lpc32xx_udc: Staticify 2 local functions Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-07  6:16   ` Vladimir Zapolskiy
2020-07-07  6:16     ` Vladimir Zapolskiy
2020-07-06 13:33 ` [PATCH 13/32] usb: host: r8a66597-hcd: Remove set, then over-written, but never used variable 'tmp' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 14/32] usb: gadget: udc: mv_udc_core: Remove unused static const variable 'driver_desc' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 15/32] usb: gadget: udc: pch_udc: Fix a plethora of function documentation related issues Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 16/32] usb: host: imx21-hcd: Demote function header which is clearly not kerneldoc Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 17/32] usb: host: ehci-fsl: Fix incorrectly named function argument Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 18/32] usb: host: fotg210-hcd: Remove unused variable 'hcc_params' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 19/32] usb: gadget: function: u_uac1_legacy: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 20/32] usb: host: bcma-hcd: " Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 21/32] usb: host: fotg210-hcd: " Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 22/32] usb: gadget: udc: mv_u3d_core: Remove unused static const 'driver_desc' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 23/32] usb: gadget: udc: max3420_udc: Remove set, but never checked variable 'addr' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 16:08   ` Jassi Brar
2020-07-06 16:08     ` Jassi Brar
2020-07-06 13:33 ` [PATCH 24/32] usb: typec: ucsi: ucsi: Staticify and stop export of ucsi_init() Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 25/32] usb: early: ehci-dbgp: Remove set but never checked variable 'ret' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 16:56   ` Eric W. Biederman
2020-07-06 16:56     ` Eric W. Biederman
2020-07-06 17:57     ` Lee Jones
2020-07-06 17:57       ` Lee Jones
2020-07-06 13:33 ` [PATCH 26/32] usb: early: xhci-dbc: Supply missing 'xhci-dbgp.h' headerfile Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:50   ` Jann Horn
2020-07-06 13:50     ` Jann Horn
2020-07-06 13:33 ` [PATCH 27/32] usb: early: xhci-dbc: File headers are not good candidates for kerneldoc Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 28/32] usb: host: ehci-platform: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` Lee Jones [this message]
2020-07-06 13:33   ` [PATCH 29/32] usb: dwc3: dwc3-qcom: " Lee Jones
2020-07-06 13:33 ` [PATCH 30/32] usb: host: fhci-tds: Remove unused variables 'buf' and 'extra_data' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 31/32] usb: host: fhci-sched: Remove unused variable 'td' Lee Jones
2020-07-06 13:33   ` Lee Jones
2020-07-06 13:33 ` [PATCH 32/32] usb: host: xhci-plat: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Lee Jones
2020-07-06 13:33   ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200706133341.476881-30-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=agross@kernel.org \
    --cc=balbi@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.