Skip to contentSkip to conversation

net: ethernet: lantiq_etop: Fix compilation error

PATCH Applied Aleksander Jan Bajkowski 3 participants 3 messages Nov 9, 2021 – Nov 10, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: lantiq_etop: Fix compilation error

This fixes the error detected when compiling the driver.

Fixes 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers")
---
 drivers/net/ethernet/lantiq_etop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/lantiq_etop.c +1 -1
index 2258e3f19161..6433c909c6b2 100644
@@ -262,7 +262,7 @@ ltq_etop_hw_init(struct net_device *dev)
 	/* enable crc generation */
 	ltq_etop_w32(PPE32_CGEN, LQ_PPE32_ENET_MAC_CFG);
 
-	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
+	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, priv->rx_burst_len);
 
 	for (i = 0; i < MAX_DMA_CHAN; i++) {
 		int irq = LTQ_DMA_CH0_INT + i;
Signature · 1 line
2.30.2
#1 lore raw
Quoted 15 lines · Aleksander Jan Bajkowski

This fixes the error detected when compiling the driver.

Fixes 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers")
---
  drivers/net/ethernet/lantiq_etop.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/lantiq_etop.c +0 -0
index 2258e3f19161..6433c909c6b2 100644

drivers/net/ethernet/lantiq_etop.c ltq_etop_hw_init(struct net_device *dev) · line 268

Quoted 8 lines
drivers/net/ethernet/lantiq_etop.c +1 -1
@@ -262,7 +262,7 @@ ltq_etop_hw_init(struct net_device *dev)
  	/* enable crc generation */
  	ltq_etop_w32(PPE32_CGEN, LQ_PPE32_ENET_MAC_CFG);
 
-	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
+	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, priv->rx_burst_len);
 
  	for (i = 0; i < MAX_DMA_CHAN; i++) {
  		int irq = LTQ_DMA_CH0_INT + i;

Hi Aleksander,

That does indeed fix the first build problem that kernel test robot reported.

I was hoping that you would address the others also (quoting here):

drivers/net/ethernet/lantiq_etop.c: In function 'ltq_etop_probe':

Quoted 1 line
Quoted 1 line

drivers/net/ethernet/lantiq_etop.c:673:15: error: implicit declaration of function 'device_property_read_u32' [-Werror=implicit-function-declaration]

     673 |         err = device_property_read_u32(&pdev->dev, "lantiq,tx-burst-length", &priv->tx_burst_len);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/lantiq_etop.c: At top level:
   drivers/net/ethernet/lantiq_etop.c:730:1: warning: no previous prototype for 'init_ltq_etop' [-Wmissing-prototypes]
     730 | init_ltq_etop(void)
         | ^~~~~~~~~~~~~
   drivers/net/ethernet/lantiq_etop.c: In function 'ltq_etop_hw_init':
   drivers/net/ethernet/lantiq_etop.c:276:25: warning: ignoring return value of 'request_irq' declared with attribute 'warn_unused_result' [-Wunused-result]
     276 |                         request_irq(irq, ltq_etop_dma_irq, 0, "etop_tx", priv);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/lantiq_etop.c:284:25: warning: ignoring return value of 'request_irq' declared with attribute 'warn_unused_result' [-Wunused-result]
     284 |                         request_irq(irq, ltq_etop_dma_irq, 0, "etop_rx", priv);
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: some warnings being treated as errors

If not, I can send the patch that I have prepared.

thanks.

Signature · 1 line
~Randy
#2 lore raw
In reply to Aleksander Jan Bajkowski
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Tue, 9 Nov 2021 23:23:54 +0100 you wrote:

This fixes the error detected when compiling the driver.

Fixes 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers")
---
 drivers/net/ethernet/lantiq_etop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [net] net: ethernet: lantiq_etop: Fix compilation error

    https://git.kernel.org/netdev/net/c/68eabc348148

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html