lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <wpmjgqvxzzowc36wtwxlht23pvvuzdpijhtkiojlayr66cktxp@dnj2ss4fu6x7>
Date: Thu, 12 Sep 2024 17:13:08 -0300
From: "Ricardo B. Marliere" <ricardo.marliere@...e.com>
To: Abhishek Tamboli <abhishektamboli9@...il.com>
Cc: gregkh@...uxfoundation.org, skhan@...uxfoundation.org, 
	rbmarliere@...il.com, linux-kernel-mentees@...ts.linuxfoundation.org, 
	linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: octeon: Use new initialization api for tasklet

Hi Abhishek,

On 12 Sep 24 22:52, Abhishek Tamboli wrote:
> Use the new api DECLARE_TASKLET instead of DECLARE_TASKLET_OLD
> introduced in commit 12cc923f1ccc ("tasklet: Introduce new
> initialization API").
> 
> Signed-off-by: Abhishek Tamboli <abhishektamboli9@...il.com>
> ---
>  drivers/staging/octeon/ethernet-tx.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
> index bbf33b88bb7c..ae1bac99b461 100644
> --- a/drivers/staging/octeon/ethernet-tx.c
> +++ b/drivers/staging/octeon/ethernet-tx.c
> @@ -40,8 +40,8 @@
>  #define GET_SKBUFF_QOS(skb) 0
>  #endif
>  
> -static void cvm_oct_tx_do_cleanup(unsigned long arg);
> -static DECLARE_TASKLET_OLD(cvm_oct_tx_cleanup_tasklet, cvm_oct_tx_do_cleanup);
> +static void cvm_oct_tx_do_cleanup(struct tasklet_struct clean);
> +static DECLARE_TASKLET(cvm_oct_tx_cleanup_tasklet, cvm_oct_tx_do_cleanup);

This fails to compile for me:

In file included from ./include/linux/kernel_stat.h:8,
                 from ./include/linux/cgroup.h:25,
                 from ./include/net/netprio_cgroup.h:11,
                 from ./include/linux/netdevice.h:42,
                 from drivers/staging/octeon/ethernet-tx.c:10:
drivers/staging/octeon/ethernet-tx.c:44:52: error: initialization of ‘void (*)(struct tasklet_struct *)’ from incompatible pointer type ‘void (*)(struct tasklet_struct)’ [-Wincompatible-pointer-types]
   44 | static DECLARE_TASKLET(cvm_oct_tx_cleanup_tasklet, cvm_oct_tx_do_cleanup);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~
./include/linux/interrupt.h:665:21: note: in definition of macro ‘DECLARE_TASKLET’
  665 |         .callback = _callback,                          \
      |                     ^~~~~~~~~
drivers/staging/octeon/ethernet-tx.c:44:52: note: (near initialization for ‘cvm_oct_tx_cleanup_tasklet.<anonymous>.callback’)
   44 | static DECLARE_TASKLET(cvm_oct_tx_cleanup_tasklet, cvm_oct_tx_do_cleanup);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~
./include/linux/interrupt.h:665:21: note: in definition of macro ‘DECLARE_TASKLET’
  665 |         .callback = _callback,                          \
      |                     ^~~~~~~~~
  CC      mm/memfd.o
  CC      fs/proc/fd.o
  CC      fs/jbd2/transaction.o
  CC      drivers/firmware/efi/libstub/gop.o
make[5]: *** [scripts/Makefile.build:244: drivers/staging/octeon/ethernet-tx.o] Error 1
make[4]: *** [scripts/Makefile.build:485: drivers/staging/octeon] Error 2
make[3]: *** [scripts/Makefile.build:485: drivers/staging] Error 2


>  
>  /* Maximum number of SKBs to try to free per xmit packet. */
>  #define MAX_SKB_TO_FREE (MAX_OUT_QUEUE_DEPTH * 2)
> @@ -670,7 +670,7 @@ void cvm_oct_tx_shutdown_dev(struct net_device *dev)
>  	}
>  }
>  
> -static void cvm_oct_tx_do_cleanup(unsigned long arg)
> +static void cvm_oct_tx_do_cleanup(struct tasklet_struct clean)
>  {
>  	int port;
>  
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ