]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
padata: add parenthesis in MAX_SEQ_NR macro
authorDan Carpenter <error27@gmail.com>
Thu, 3 Jun 2010 10:19:28 +0000 (20:19 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 3 Jun 2010 10:19:28 +0000 (20:19 +1000)
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: Dan Carpenter <error27@gmail.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
kernel/padata.c

index b1c9857f8402d8ae66ae651153b917239d08d512..ff8de1b71e4eb1174e0aa857d1bcb09ca34dd13c 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/slab.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
 
 static int padata_index_to_cpu(struct parallel_data *pd, int cpu_index)