aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-03-06 00:33:59 -0500
committerTejun Heo <tj@kernel.org>2009-03-06 00:33:59 -0500
commitcafe8816b217b98dc3f268d3b77445da498beb4f (patch)
tree7ebbb4e9fc2c4f6ec0035170d4736aecc00d2501 /include
parent61ace7fa2fff9c4b6641c506b6b3f1a9394a1b11 (diff)
percpu: use negative for auto for pcpu_setup_first_chunk() arguments
Impact: argument semantic cleanup In pcpu_setup_first_chunk(), zero @unit_size and @dyn_size meant auto-sizing. It's okay for @unit_size as 0 doesn't make sense but 0 dynamic reserve size is valid. Alos, if arch @dyn_size is calculated from other parameters, it might end up passing in 0 @dyn_size and malfunction when the size is automatically adjusted. This patch makes both @unit_size and @dyn_size ssize_t and use -1 for auto sizing. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/percpu.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index a0b4ea2a3354..a96fc53bbd62 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -117,8 +117,9 @@ typedef struct page * (*pcpu_get_page_fn_t)(unsigned int cpu, int pageno);
117typedef void (*pcpu_populate_pte_fn_t)(unsigned long addr); 117typedef void (*pcpu_populate_pte_fn_t)(unsigned long addr);
118 118
119extern size_t __init pcpu_setup_first_chunk(pcpu_get_page_fn_t get_page_fn, 119extern size_t __init pcpu_setup_first_chunk(pcpu_get_page_fn_t get_page_fn,
120 size_t static_size, size_t unit_size, 120 size_t static_size,
121 size_t dyn_size, void *base_addr, 121 ssize_t unit_size, ssize_t dyn_size,
122 void *base_addr,
122 pcpu_populate_pte_fn_t populate_pte_fn); 123 pcpu_populate_pte_fn_t populate_pte_fn);
123 124
124/* 125/*