[openwrt/openwrt] ralink: mt76x8: fix compilation warning in esw driver
LEDE Commits
lede-commits at lists.infradead.org
Thu May 11 18:24:58 PDT 2023
ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/4ea21e31610d59ee5cf840f601338e32181d3d40
commit 4ea21e31610d59ee5cf840f601338e32181d3d40
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sat May 6 23:21:27 2023 +0200
ralink: mt76x8: fix compilation warning in esw driver
Fix compilation warning for debug string in esw driver:
drivers/net/ethernet/ralink/esw_rt3050.c:1535:9: note: in expansion of macro 'dev_info'
1535 | dev_info(&pdev->dev, "mediatek esw at 0x%08lx, irq %d initialized\n",
| ^~~~~~~~
drivers/net/ethernet/ralink/esw_rt3050.c:1535:53: note: format string is defined here
1535 | dev_info(&pdev->dev, "mediatek esw at 0x%08lx, irq %d initialized\n",
| ~~~~^
| |
| long unsigned int
| %08p
cc1: all warnings being treated as errors
Fix unused variable causing compilation warning:
drivers/net/ethernet/ralink/esw_rt3050.c: In function 'esw_interrupt':
drivers/net/ethernet/ralink/esw_rt3050.c:769:13: error: unused variable 'i' [-Werror=unused-variable]
769 | int i;
| ^
cc1: all warnings being treated as errors
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c
index fe787fe92f..47471eb197 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c
@@ -766,7 +766,6 @@ static irqreturn_t esw_interrupt(int irq, void *_esw)
{
struct rt305x_esw *esw = (struct rt305x_esw *) _esw;
u32 status;
- int i;
status = esw_r32(esw, RT305X_ESW_REG_ISR);
if (status & RT305X_ESW_PORT_ST_CHG) {
@@ -1533,7 +1532,7 @@ int rt3050_esw_init(struct fe_priv *priv)
}
dev_info(&pdev->dev, "mediatek esw at 0x%08lx, irq %d initialized\n",
- esw->base, esw->irq);
+ (long unsigned int)esw->base, esw->irq);
return 0;
}
More information about the lede-commits
mailing list