From: vignesh babu Date: Fri, 12 Oct 2007 14:11:39 +0000 (+0200) Subject: [S390] is_power_of_2 in drivers/s390/block/dasd_int.h X-Git-Tag: v2.6.24-rc1~1420 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e108cebb21316714de43767e242316c784471740;p=linux-2.6 [S390] is_power_of_2 in drivers/s390/block/dasd_int.h Replacing n & (n - 1) for power of 2 check by is_power_of_2(n) Signed-off-by: vignesh babu Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens --- diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index aeda526824..d427daeef5 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -456,7 +457,7 @@ dasd_free_chunk(struct list_head *chunk_list, void *mem) static inline int dasd_check_blocksize(int bsize) { - if (bsize < 512 || bsize > 4096 || (bsize & (bsize - 1)) != 0) + if (bsize < 512 || bsize > 4096 || !is_power_of_2(bsize)) return -EMEDIUMTYPE; return 0; }