LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] staging/hv/osd: don't reimplement ALIGN macro
@ 2011-01-18 15:39 Uwe Kleine-König
  2011-01-19  5:37 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2011-01-18 15:39 UTC (permalink / raw)
  To: Haiyang Zhang, Hank Janssen; +Cc: Greg Kroah-Hartman, devel, linux-kernel

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/staging/hv/osd.h |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/hv/osd.h b/drivers/staging/hv/osd.h
index ce064e8..61ae54c 100644
--- a/drivers/staging/hv/osd.h
+++ b/drivers/staging/hv/osd.h
@@ -28,10 +28,9 @@
 #include <linux/workqueue.h>
 
 /* Defines */
-#define ALIGN_UP(value, align)	(((value) & (align-1)) ?		\
-				 (((value) + (align-1)) & ~(align-1)) :	\
-				 (value))
+#define ALIGN_UP(value, align)		ALIGN((value), (align))
 #define ALIGN_DOWN(value, align)	((value) & ~(align-1))
+
 #define NUM_PAGES_SPANNED(addr, len)	((ALIGN_UP(addr+len, PAGE_SIZE) - \
 					 ALIGN_DOWN(addr, PAGE_SIZE)) >>  \
 					 PAGE_SHIFT)
-- 
1.7.2.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-20  8:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 15:39 [PATCH] staging/hv/osd: don't reimplement ALIGN macro Uwe Kleine-König
2011-01-19  5:37 ` Greg KH
2011-01-19  8:54   ` Uwe Kleine-König
2011-01-19 12:43     ` Jiri Slaby
2011-01-19 13:07       ` Uwe Kleine-König
2011-01-20  5:01         ` Greg KH
2011-01-20  8:32           ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).