All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: linux-ide@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	linux-renesas-soc@vger.kernel.org,
	Sergey Shtylyov <s.shtylyov@omp.ru>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: [PATCH 1/6] ata: ahci_st: Fix compilation warning
Date: Mon, 17 Oct 2022 12:22:00 +0900	[thread overview]
Message-ID: <20221017032205.2210188-2-damien.lemoal@opensource.wdc.com> (raw)
In-Reply-To: <20221017032205.2210188-1-damien.lemoal@opensource.wdc.com>

If CONFIG_OF is disabled and the ahci_st driver is builtin (or
CONFIG_MODULES is disabled), then using the macro of_match_ptr()
results in the st_ahci_match variable being unused, which generates a
compilation warning and a compilation error if CONFIG_WERROR is enabled.

Fix this by directly assigning st_ahci_match to .of_match_table in the
st_ahci_driver platform driver definition.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 drivers/ata/ahci_st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c
index 5a2cac60a29a..8607b68eee53 100644
--- a/drivers/ata/ahci_st.c
+++ b/drivers/ata/ahci_st.c
@@ -236,7 +236,7 @@ static struct platform_driver st_ahci_driver = {
 	.driver = {
 		.name = DRV_NAME,
 		.pm = &st_ahci_pm_ops,
-		.of_match_table = of_match_ptr(st_ahci_match),
+		.of_match_table = st_ahci_match,
 	},
 	.probe = st_ahci_probe,
 	.remove = ata_platform_remove_one,
-- 
2.37.3


WARNING: multiple messages have this Message-ID (diff)
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: linux-ide@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	linux-renesas-soc@vger.kernel.org,
	Sergey Shtylyov <s.shtylyov@omp.ru>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: [PATCH 1/6] ata: ahci_st: Fix compilation warning
Date: Mon, 17 Oct 2022 12:22:00 +0900	[thread overview]
Message-ID: <20221017032205.2210188-2-damien.lemoal@opensource.wdc.com> (raw)
In-Reply-To: <20221017032205.2210188-1-damien.lemoal@opensource.wdc.com>

If CONFIG_OF is disabled and the ahci_st driver is builtin (or
CONFIG_MODULES is disabled), then using the macro of_match_ptr()
results in the st_ahci_match variable being unused, which generates a
compilation warning and a compilation error if CONFIG_WERROR is enabled.

Fix this by directly assigning st_ahci_match to .of_match_table in the
st_ahci_driver platform driver definition.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 drivers/ata/ahci_st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c
index 5a2cac60a29a..8607b68eee53 100644
--- a/drivers/ata/ahci_st.c
+++ b/drivers/ata/ahci_st.c
@@ -236,7 +236,7 @@ static struct platform_driver st_ahci_driver = {
 	.driver = {
 		.name = DRV_NAME,
 		.pm = &st_ahci_pm_ops,
-		.of_match_table = of_match_ptr(st_ahci_match),
+		.of_match_table = st_ahci_match,
 	},
 	.probe = st_ahci_probe,
 	.remove = ata_platform_remove_one,
-- 
2.37.3


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

  reply	other threads:[~2022-10-17  3:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17  3:21 [PATCH 0/6] Fix compilation warnings Damien Le Moal
2022-10-17  3:21 ` Damien Le Moal
2022-10-17  3:22 ` Damien Le Moal [this message]
2022-10-17  3:22   ` [PATCH 1/6] ata: ahci_st: Fix compilation warning Damien Le Moal
2022-10-17  3:22 ` [PATCH 2/6] ata: sata_rcar: " Damien Le Moal
2022-10-17  3:22   ` Damien Le Moal
2022-10-17  7:13   ` Geert Uytterhoeven
2022-10-17  7:13     ` Geert Uytterhoeven
2022-10-17 19:08   ` Sergey Shtylyov
2022-10-17 19:08     ` Sergey Shtylyov
2022-10-17  3:22 ` [PATCH 3/6] ata: ahci_brcm: " Damien Le Moal
2022-10-17  3:22   ` Damien Le Moal
2022-10-17 19:57   ` Florian Fainelli
2022-10-17 19:57     ` Florian Fainelli
2022-10-17  3:22 ` [PATCH 4/6] ata: ahci_xgene: " Damien Le Moal
2022-10-17  3:22   ` Damien Le Moal
2022-10-17  3:22 ` [PATCH 5/6] ata: ahci_imx: " Damien Le Moal
2022-10-17  3:22   ` Damien Le Moal
2022-10-17  3:22 ` [PATCH 6/6] ata: ahci_qoriq: " Damien Le Moal
2022-10-17  3:22   ` Damien Le Moal
2022-10-17  7:25 ` [PATCH 0/6] Fix compilation warnings Arnd Bergmann
2022-10-17  7:25   ` Arnd Bergmann

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=20221017032205.2210188-2-damien.lemoal@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=arnd@arndb.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=s.hauer@pengutronix.de \
    --cc=s.shtylyov@omp.ru \
    --cc=shawnguo@kernel.org \
    /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.