Skip to contentSkip to conversation

drivers/staging/crystalhd/: cleanup typedefs

PATCH Greg KH 1 participant 1 message Sep 12, 2011 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Greg KH

author
#2 lore raw
Quoted 36 lines · Arvydas Sidorenko

Cleans the typedef declarations in bc_dts_types.h file. Most of them aren't used. The ones are used are 'uint32_t' and similar ones, but I don't see the point of them since they are declared in stdint.h, unless some sort of embeded systems don't have it (no experience with it).
So simply removing them doesn't cause any compilation errors or warnings on my laptop.

---
 drivers/staging/crystalhd/bc_dts_types.h |   41 +-----------------------------
 1 files changed, 1 insertions(+), 40 deletions(-)
drivers/staging/crystalhd/bc_dts_types.h +0 -14
index d2131e7..42d7cfd 100644
@@ -29,29 +29,8 @@
 #include <stdint.h>
 #endif
 
-#ifndef PVOID
-typedef void	*PVOID;
-#endif
-
-#ifndef BOOL
-typedef int	BOOL;
-#endif
-
 #if defined(__KERNEL__) || defined(__LINUX_USER__)
 
-#ifdef __LINUX_USER__	/* Don't include these for KERNEL */
-typedef uint32_t	ULONG;
-typedef int32_t		LONG;
-typedef void		*HANDLE;
-#ifndef VOID
-typedef void		VOID;

drivers/staging/crystalhd/bc_dts_types.h line 36

Quoted 10 lines
drivers/staging/crystalhd/bc_dts_types.h +0 -7
-#endif
-typedef void		*LPVOID;
-typedef uint32_t	DWORD;
-typedef uint32_t	UINT32;
-typedef uint32_t	*LPDWORD;
-typedef unsigned char	*PUCHAR;
-
 #ifndef TRUE
 	#define TRUE		1
 #endif

You can drop this too, right?

drivers/staging/crystalhd/bc_dts_types.h typedef unsigned char *PUCHAR; · line 56

Quoted 10 lines
drivers/staging/crystalhd/bc_dts_types.h +1 -1
@@ -70,28 +49,10 @@ typedef unsigned char	*PUCHAR;
 #else
 
 #ifndef uint64_t
-typedef struct _uint64_t {
+struct _uint64_t {
 	uint32_t low_dw;
 	uint32_t hi_dw;
 } uint64_t;
 #endif

This whole thing should also be removed.

Care to redo this?

greg k-h