aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-07-01 05:28:38 +0200
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-07-01 05:36:54 +0200
commite0e06555e4f1d73c42cea1604a21a35afdf5d8cf (patch)
tree87fc1d5f048637de35c4fb98d0ce9e53b437fa4a
parentselftest/mpmc_ring: remove const qualifier from mpmc_ptr_ring_produce argument (diff)
downloadwireguard-monolithic-historical-e0e06555e4f1d73c42cea1604a21a35afdf5d8cf.tar.xz
wireguard-monolithic-historical-e0e06555e4f1d73c42cea1604a21a35afdf5d8cf.zip
selftest/mpmc_ring: add more __init/__initdata annotations
The main function, mpmc_ring_selftest, is already marked with __init, but the callback functions and the ring pointer were not. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
-rw-r--r--src/selftest/mpmc_ring.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/selftest/mpmc_ring.h b/src/selftest/mpmc_ring.h
index 41ea9f9..251456f 100644
--- a/src/selftest/mpmc_ring.h
+++ b/src/selftest/mpmc_ring.h
@@ -20,7 +20,7 @@
#define PER_CONSUMER (ELEMENT_COUNT/THREADS_CONSUMER)
#define THREADS_TOTAL (THREADS_PRODUCER + THREADS_CONSUMER)
-struct mpmc_ptr_ring *ring;
+struct mpmc_ptr_ring *ring __initdata;
struct worker_producer {
struct work_struct work;
@@ -34,7 +34,7 @@ struct worker_consumer {
long count;
};
-static void producer_function(struct work_struct *work)
+static __init void producer_function(struct work_struct *work)
{
struct worker_producer *td = container_of(work, struct worker_producer, work);
uintptr_t count = (td->thread_num * PER_PRODUCER) + 1;
@@ -45,7 +45,7 @@ static void producer_function(struct work_struct *work)
}
}
-static void consumer_function(struct work_struct *work)
+static __init void consumer_function(struct work_struct *work)
{
struct worker_consumer *td = container_of(work, struct worker_consumer, work);
int i;