]> git.baikalelectronics.ru Git - kernel.git/commitdiff
treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()
authorKees Cook <keescook@chromium.org>
Mon, 13 Jul 2020 22:01:26 +0000 (15:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:43:42 +0000 (16:43 +0100)
[ Upstream commit 5cc550dbef1f5273e4d89e0b1ece2d5f33877109 ]

This converts all the existing DECLARE_TASKLET() (and ...DISABLED)
macros with DECLARE_TASKLET_OLD() in preparation for refactoring the
tasklet callback type. All existing DECLARE_TASKLET() users had a "0"
data argument, it has been removed here as well.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Stable-dep-of: 1fdeb8b9f29d ("wifi: iwl3945: Add missing check for create_singlethread_workqueue")
Signed-off-by: Sasha Levin <sashal@kernel.org>
16 files changed:
drivers/input/keyboard/omap-keypad.c
drivers/input/serio/hil_mlc.c
drivers/net/wan/farsync.c
drivers/s390/crypto/ap_bus.c
drivers/staging/most/dim2/dim2.c
drivers/staging/octeon/ethernet-tx.c
drivers/tty/vt/keyboard.c
drivers/usb/gadget/udc/snps_udc_core.c
drivers/usb/host/fhci-sched.c
include/linux/interrupt.h
kernel/backtracetest.c
kernel/debug/debug_core.c
kernel/irq/resend.c
net/atm/pppoatm.c
net/iucv/iucv.c
sound/drivers/pcsp/pcsp_lib.c

index 5fe7a5633e33bb9c8f511d47d6e0d46303b1ffbf..dbe836c7ff47353812015c68cdf513bf555ac68f 100644 (file)
@@ -46,7 +46,7 @@ struct omap_kp {
        unsigned short keymap[];
 };
 
-static DECLARE_TASKLET_DISABLED(kp_tasklet, omap_kp_tasklet, 0);
+static DECLARE_TASKLET_DISABLED_OLD(kp_tasklet, omap_kp_tasklet);
 
 static unsigned int *row_gpios;
 static unsigned int *col_gpios;
index 4c039e4125d92d968ea2948cca2309b744c2004b..d36e89d6fc546ad73f22f3577a7110c7363ea1f5 100644 (file)
@@ -77,7 +77,7 @@ static struct timer_list      hil_mlcs_kicker;
 static int                     hil_mlcs_probe, hil_mlc_stop;
 
 static void hil_mlcs_process(unsigned long unused);
-static DECLARE_TASKLET_DISABLED(hil_mlcs_tasklet, hil_mlcs_process, 0);
+static DECLARE_TASKLET_DISABLED_OLD(hil_mlcs_tasklet, hil_mlcs_process);
 
 
 /* #define HIL_MLC_DEBUG */
index a2527351f8a7abb96847167a3cd1a892cd3ecb47..6ac6a649d4c2d855575e97b456bb40e553d99e96 100644 (file)
@@ -569,8 +569,8 @@ static void do_bottom_half_rx(struct fst_card_info *card);
 static void fst_process_tx_work_q(unsigned long work_q);
 static void fst_process_int_work_q(unsigned long work_q);
 
-static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0);
-static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0);
+static DECLARE_TASKLET_OLD(fst_tx_task, fst_process_tx_work_q);
+static DECLARE_TASKLET_OLD(fst_int_task, fst_process_int_work_q);
 
 static struct fst_card_info *fst_card_array[FST_MAX_CARDS];
 static spinlock_t fst_work_q_lock;
index 5256e3ce84e56a5144368d9017c17da5bb336c12..fb1de363fb288f9df280444bb3a916e3cef2fbda 100644 (file)
@@ -91,7 +91,7 @@ static DECLARE_WORK(ap_scan_work, ap_scan_bus);
  * Tasklet & timer for AP request polling and interrupts
  */
 static void ap_tasklet_fn(unsigned long);
-static DECLARE_TASKLET(ap_tasklet, ap_tasklet_fn, 0);
+static DECLARE_TASKLET_OLD(ap_tasklet, ap_tasklet_fn);
 static DECLARE_WAIT_QUEUE_HEAD(ap_poll_wait);
 static struct task_struct *ap_poll_kthread;
 static DEFINE_MUTEX(ap_poll_thread_mutex);
index 64c979155a49f382f410096c0a3a760e38f1ac8f..774abedad98736d3d5ddf6453385f760a35d7dfc 100644 (file)
@@ -47,7 +47,7 @@ MODULE_PARM_DESC(fcnt, "Num of frames per sub-buffer for sync channels as a powe
 static DEFINE_SPINLOCK(dim_lock);
 
 static void dim2_tasklet_fn(unsigned long data);
-static DECLARE_TASKLET(dim2_tasklet, dim2_tasklet_fn, 0);
+static DECLARE_TASKLET_OLD(dim2_tasklet, dim2_tasklet_fn);
 
 /**
  * struct hdm_channel - private structure to keep channel specific data
index fe6e1ae73460a913f37d4e5a192fb5198941a807..100b235b5688e1d4a588836391133a72c41e846b 100644 (file)
@@ -41,7 +41,7 @@
 #endif
 
 static void cvm_oct_tx_do_cleanup(unsigned long arg);
-static DECLARE_TASKLET(cvm_oct_tx_cleanup_tasklet, cvm_oct_tx_do_cleanup, 0);
+static DECLARE_TASKLET_OLD(cvm_oct_tx_cleanup_tasklet, cvm_oct_tx_do_cleanup);
 
 /* Maximum number of SKBs to try to free per xmit packet. */
 #define MAX_SKB_TO_FREE (MAX_OUT_QUEUE_DEPTH * 2)
index 68643f61f6f90107bcf743b939223531d7ce0651..0da9e0ab045bd6d125d21ffeae233f7496fd7ab3 100644 (file)
@@ -1241,7 +1241,7 @@ static void kbd_bh(unsigned long dummy)
        }
 }
 
-DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0);
+DECLARE_TASKLET_DISABLED_OLD(keyboard_tasklet, kbd_bh);
 
 #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\
     defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\
index afdd28f332ced2990a2c1258170ab95fdd59ac4b..e76f1a50b0fc951f3c8d574dd5a192d26139c109 100644 (file)
@@ -96,7 +96,7 @@ static int stop_pollstall_timer;
 static DECLARE_COMPLETION(on_pollstall_exit);
 
 /* tasklet for usb disconnect */
-static DECLARE_TASKLET(disconnect_tasklet, udc_tasklet_disconnect, 0);
+static DECLARE_TASKLET_OLD(disconnect_tasklet, udc_tasklet_disconnect);
 
 /* endpoint names used for print */
 static const char ep0_string[] = "ep0in";
index 3235d530740389e67dafe3cc06f9b69eded49b83..5c423f240a1f0782961c02a49918688df5289620 100644 (file)
@@ -677,7 +677,7 @@ static void process_done_list(unsigned long data)
        enable_irq(fhci_to_hcd(fhci)->irq);
 }
 
-DECLARE_TASKLET(fhci_tasklet, process_done_list, 0);
+DECLARE_TASKLET_OLD(fhci_tasklet, process_done_list);
 
 /* transfer complted callback */
 u32 fhci_transfer_confirm_callback(struct fhci_hcd *fhci)
index 89fc59dab57d2605edc21a96a478e79d84de2c17..30e92536c78cc4099676606e39fe181f604b4c0c 100644 (file)
@@ -598,12 +598,17 @@ struct tasklet_struct
        unsigned long data;
 };
 
-#define DECLARE_TASKLET(name, func, data) \
-struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }
-
-#define DECLARE_TASKLET_DISABLED(name, func, data) \
-struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data }
+#define DECLARE_TASKLET_OLD(name, _func)               \
+struct tasklet_struct name = {                         \
+       .count = ATOMIC_INIT(0),                        \
+       .func = _func,                                  \
+}
 
+#define DECLARE_TASKLET_DISABLED_OLD(name, _func)      \
+struct tasklet_struct name = {                         \
+       .count = ATOMIC_INIT(1),                        \
+       .func = _func,                                  \
+}
 
 enum
 {
index a2a97fa3071b1c7ee6595d61a172f7ccc73ea40b..370217dd7e39a42ba6943a96c27c3d1101408cb5 100644 (file)
@@ -29,7 +29,7 @@ static void backtrace_test_irq_callback(unsigned long data)
        complete(&backtrace_work);
 }
 
-static DECLARE_TASKLET(backtrace_tasklet, &backtrace_test_irq_callback, 0);
+static DECLARE_TASKLET_OLD(backtrace_tasklet, &backtrace_test_irq_callback);
 
 static void backtrace_test_irq(void)
 {
index 565987557ad893dc45daf22004143e9050ac7486..f88611fadb195d9bd26a50582c33797532cd8b08 100644 (file)
@@ -1043,7 +1043,7 @@ static void kgdb_tasklet_bpt(unsigned long ing)
        atomic_set(&kgdb_break_tasklet_var, 0);
 }
 
-static DECLARE_TASKLET(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt, 0);
+static DECLARE_TASKLET_OLD(kgdb_tasklet_breakpoint, kgdb_tasklet_bpt);
 
 void kgdb_schedule_breakpoint(void)
 {
index 98c04ca5fa43d6a4515fff52a2d956c250777083..b7af39e36341bf5fd25c8290d3047e7856e3f422 100644 (file)
@@ -45,7 +45,7 @@ static void resend_irqs(unsigned long arg)
 }
 
 /* Tasklet to handle resend: */
-static DECLARE_TASKLET(resend_tasklet, resend_irqs, 0);
+static DECLARE_TASKLET_OLD(resend_tasklet, resend_irqs);
 
 #endif
 
index 45d8e1d5d033e0c77f7171bf15967c6357edb08c..579b66da1d95d446412f1ac6f5ad9f3c384c10d4 100644 (file)
@@ -393,7 +393,7 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg)
         * Each PPPoATM instance has its own tasklet - this is just a
         * prototypical one used to initialize them
         */
-       static const DECLARE_TASKLET(tasklet_proto, pppoatm_wakeup_sender, 0);
+       static const DECLARE_TASKLET_OLD(tasklet_proto, pppoatm_wakeup_sender);
        if (copy_from_user(&be, arg, sizeof be))
                return -EFAULT;
        if (be.encaps != PPPOATM_ENCAPS_AUTODETECT &&
index 9a2d023842fe754a4c07746c30dc86019f809c60..a4d1b5b7a154393c92697ab362e725f689bc1b78 100644 (file)
@@ -128,7 +128,7 @@ static LIST_HEAD(iucv_task_queue);
  * The tasklet for fast delivery of iucv interrupts.
  */
 static void iucv_tasklet_fn(unsigned long);
-static DECLARE_TASKLET(iucv_tasklet, iucv_tasklet_fn,0);
+static DECLARE_TASKLET_OLD(iucv_tasklet, iucv_tasklet_fn);
 
 /*
  * Queue of interrupt buffers for delivery via a work queue
index 8f0f05bbc0819e7f187975e6a1c4ddd4c4672f4c..ce5bab7425d5e23643b7d48e0727cac529aa66a0 100644 (file)
@@ -36,7 +36,7 @@ static void pcsp_call_pcm_elapsed(unsigned long priv)
        }
 }
 
-static DECLARE_TASKLET(pcsp_pcm_tasklet, pcsp_call_pcm_elapsed, 0);
+static DECLARE_TASKLET_OLD(pcsp_pcm_tasklet, pcsp_call_pcm_elapsed);
 
 /* write the port and returns the next expire time in ns;
  * called at the trigger-start and in hrtimer callback