Commit 749d811f authored by Dan Carpenter's avatar Dan Carpenter Committed by Herbert Xu

padata: add parenthesis in MAX_SEQ_NR macro

MAX_SEQ_NR is used in padata_alloc_pd() like this:

        pd->max_seq_nr = (MAX_SEQ_NR / num_cpus) * num_cpus - 1;

It needs parenthesis or the divide by num_cpus takes precedence over the
subtraction.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 50d1e930
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#define MAX_SEQ_NR INT_MAX - NR_CPUS #define MAX_SEQ_NR (INT_MAX - NR_CPUS)
#define MAX_OBJ_NUM 1000 #define MAX_OBJ_NUM 1000
static int padata_index_to_cpu(struct parallel_data *pd, int cpu_index) static int padata_index_to_cpu(struct parallel_data *pd, int cpu_index)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment