netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ethernet: mtk_star_emac: fix unused variable
@ 2022-01-26 10:27 Lorenzo Bianconi
  2022-01-27 14:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2022-01-26 10:27 UTC (permalink / raw)
  To: netdev; +Cc: lorenzo.bianconi, bgolaszewski

Fix the following warning in mtk_star_emac.c if CONFIG_OF is not set:

drivers/net/ethernet/mediatek/mtk_star_emac.c:1559:34:
    warning: unused variable 'mtk_star_of_match' [-Wunused-const-variable]
    static const struct of_device_id mtk_star_of_match[] = {

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c
index 89ca7960b225..4cd0747edaff 100644
--- a/drivers/net/ethernet/mediatek/mtk_star_emac.c
+++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c
@@ -1556,6 +1556,7 @@ static int mtk_star_probe(struct platform_device *pdev)
 	return devm_register_netdev(dev, ndev);
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id mtk_star_of_match[] = {
 	{ .compatible = "mediatek,mt8516-eth", },
 	{ .compatible = "mediatek,mt8518-eth", },
@@ -1563,6 +1564,7 @@ static const struct of_device_id mtk_star_of_match[] = {
 	{ }
 };
 MODULE_DEVICE_TABLE(of, mtk_star_of_match);
+#endif
 
 static SIMPLE_DEV_PM_OPS(mtk_star_pm_ops,
 			 mtk_star_suspend, mtk_star_resume);
-- 
2.34.1


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

* Re: [PATCH net-next] net: ethernet: mtk_star_emac: fix unused variable
  2022-01-26 10:27 [PATCH net-next] net: ethernet: mtk_star_emac: fix unused variable Lorenzo Bianconi
@ 2022-01-27 14:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-27 14:00 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: netdev, lorenzo.bianconi, bgolaszewski

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed, 26 Jan 2022 11:27:05 +0100 you wrote:
> Fix the following warning in mtk_star_emac.c if CONFIG_OF is not set:
> 
> drivers/net/ethernet/mediatek/mtk_star_emac.c:1559:34:
>     warning: unused variable 'mtk_star_of_match' [-Wunused-const-variable]
>     static const struct of_device_id mtk_star_of_match[] = {
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> [...]

Here is the summary with links:
  - [net-next] net: ethernet: mtk_star_emac: fix unused variable
    https://git.kernel.org/netdev/net-next/c/a9c5eb642f53

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-01-27 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26 10:27 [PATCH net-next] net: ethernet: mtk_star_emac: fix unused variable Lorenzo Bianconi
2022-01-27 14:00 ` patchwork-bot+netdevbpf

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