The patch titled
rtc-s3c: Use is_power_of_2() macro for simplicity.
has been added to the -mm tree. Its filename is
rtc-s3c-use-is_power_of_2-macro-for-simplicity.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: rtc-s3c: Use is_power_of_2() macro for simplicity.
From: "Robert P. J. Day" <[EMAIL PROTECTED]>
Use is_power_of_2() macro for simplicity.
Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>
Signed-off-by: Alessandro Zummo <[EMAIL PROTECTED]>
Cc: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
drivers/rtc/rtc-s3c.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff -puN drivers/rtc/rtc-s3c.c~rtc-s3c-use-is_power_of_2-macro-for-simplicity
drivers/rtc/rtc-s3c.c
--- a/drivers/rtc/rtc-s3c.c~rtc-s3c-use-is_power_of_2-macro-for-simplicity
+++ a/drivers/rtc/rtc-s3c.c
@@ -20,6 +20,7 @@
#include <linux/rtc.h>
#include <linux/bcd.h>
#include <linux/clk.h>
+#include <linux/log2.h>
#include <asm/hardware.h>
#include <asm/uaccess.h>
@@ -309,9 +310,7 @@ static int s3c_rtc_ioctl(struct device *
break;
case RTC_IRQP_SET:
- /* check for power of 2 */
-
- if ((arg & (arg-1)) != 0 || arg < 1) {
+ if (!is_power_of_2(arg)) {
ret = -EINVAL;
goto exit;
}
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
origin.patch
arm-remove-reference-to-non-existent-mtd_obsolete_chips.patch
lvm-use-rounddown_pow_of_two-macro-for-simplicity.patch
hwmon-replace-power-of-two-test-in-drivers-hwmon-adt7470c.patch
pcmcia-net-use-roundup_pow_of_two-macro-instead-of-grotesque-loop.patch
blackfin-typo-config_rtc_bfin_module.patch
frv-move-dma-macros-to-scatterlisth-for-consistency.patch
m68knommu-remove-vestiges-of-non-existent-disktel.patch
uml-delete-some-unused-headers.patch
rtc-s3c-use-is_power_of_2-macro-for-simplicity.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html