Staging: hv: osd.h: codingstyle cleanups

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Wednesday, September 16, 2009 - 9:07 am

Gitweb:     http://git.kernel.org/linus/0ccafb365803b3256aa75fd07bf9e5c6814a260d
Commit:     0ccafb365803b3256aa75fd07bf9e5c6814a260d
Parent:     4983b39a0687b00688478e6748b979a02934b234
Author:     Greg Kroah-Hartman <gregkh@suse.de>
AuthorDate: Wed Aug 19 16:16:21 2009 -0700
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Tue Sep 15 12:01:56 2009 -0700

    Staging: hv: osd.h: codingstyle cleanups
    
    This fixes up the coding style issues in osd.h, with the exception of
    the typedefs, they will be removed later.
    
    Cc: Hank Janssen <hjanssen@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/osd.h |   36 ++++++++++++++++--------------------
 1 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/hv/osd.h b/drivers/staging/hv/osd.h
index 949c273..1723248 100644
--- a/drivers/staging/hv/osd.h
+++ b/drivers/staging/hv/osd.h
@@ -27,32 +27,28 @@
 
 
 /* Defines */
+#define ALIGN_UP(value, align)	(((value) & (align-1)) ?		\
+				 (((value) + (align-1)) & ~(align-1)) :	\
+				 (value))
+#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)
 
-
-
-#define ALIGN_UP(value, align)			( ((value) & (align-1))? ( ((value) + (align-1)) & ~(align-1) ): (value) )
-#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 )
-
-#define LOWORD(dw)		((unsigned short) (dw))
-#define HIWORD(dw)		((unsigned short) (((unsigned int) (dw) >> 16) & 0xFFFF))
+#define LOWORD(dw)	((unsigned short)(dw))
+#define HIWORD(dw)	((unsigned short)(((unsigned int) (dw) >> 16) & 0xFFFF))
 
 typedef struct _DLIST_ENTRY {
-   struct _DLIST_ENTRY *Flink;
-   struct _DLIST_ENTRY *Blink;
+	struct _DLIST_ENTRY *Flink;
+	struct _DLIST_ENTRY *Blink;
 } DLIST_ENTRY;
 
-
-/* Other types */
-
-/* typedef unsigned char		GUID[16]; */
-
 typedef struct {
-	unsigned char	Data[16];
+	unsigned char Data[16];
 } GUID;
 
 struct osd_waitevent {
-	int	condition;
+	int condition;
 	wait_queue_head_t event;
 };
 
@@ -61,15 +57,15 @@ struct osd_waitevent {
 extern void *osd_VirtualAllocExec(unsigned int size);
 
 extern void *osd_PageAlloc(unsigned int count);
-extern void osd_PageFree(void* page, unsigned int count);
+extern void osd_PageFree(void *page, unsigned int count);
 
 extern struct osd_waitevent *osd_WaitEventCreate(void);
 extern void osd_WaitEventSet(struct osd_waitevent *waitEvent);
 extern int osd_WaitEventWait(struct osd_waitevent *waitEvent);
 
 /* If >0, waitEvent got signaled. If ==0, timeout. If < 0, error */
-extern int osd_WaitEventWaitEx(struct osd_waitevent *waitEvent, u32 TimeoutInMs);
-
+extern int osd_WaitEventWaitEx(struct osd_waitevent *waitEvent,
+			       u32 TimeoutInMs);
 
 int osd_schedule_callback(struct workqueue_struct *wq,
 			  void (*func)(void *),
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Staging: hv: osd.h: codingstyle cleanups, Linux Kernel Mailing ..., (Wed Sep 16, 9:07 am)