diff mbox series

[net] net: ethernet: lantiq_etop: Fix compilation error

Message ID 20211109222354.3688-1-olek2@wp.pl (mailing list archive)
State Accepted
Commit 68eabc348148ae051631e8dab13c3b1a85c82896
Delegated to: Netdev Maintainers
Headers show
Series [net] net: ethernet: lantiq_etop: Fix compilation error | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: line length of 81 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Aleksander Jan Bajkowski Nov. 9, 2021, 10:23 p.m. UTC
This fixes the error detected when compiling the driver.

Fixes: 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
---
 drivers/net/ethernet/lantiq_etop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Randy Dunlap Nov. 10, 2021, 1:33 a.m. UTC | #1
On 11/9/21 2:23 PM, Aleksander Jan Bajkowski wrote:
> This fixes the error detected when compiling the driver.
> 
> Fixes: 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
> ---
>   drivers/net/ethernet/lantiq_etop.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
> index 2258e3f19161..6433c909c6b2 100644
> --- a/drivers/net/ethernet/lantiq_etop.c
> +++ b/drivers/net/ethernet/lantiq_etop.c
> @@ -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':
>> 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.
patchwork-bot+netdevbpf@kernel.org Nov. 10, 2021, 2:50 p.m. UTC | #2
Hello:

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

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")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
> ---
>  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!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 2258e3f19161..6433c909c6b2 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -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;