lkml.org 
[lkml]   [2010]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Staging: vt6656: Remove the ULONG_PTR and DWORD_PTR defines from ttype.h
On Tue, Jul 13, 2010 at 12:49:57AM +0200, Roel Van Nyen wrote:
> Remove the ULONG and DWORD PTR defines from ttype.h
>
> Signed-of-by: Roel Van Nyen <roel.vannyen@gmail.com>
> ---
> drivers/staging/vt6656/bssdb.c | 8 ++++----
> drivers/staging/vt6656/ttype.h | 3 ---
> 2 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
> index 830dd23..0b8584b 100644
> --- a/drivers/staging/vt6656/bssdb.c
> +++ b/drivers/staging/vt6656/bssdb.c
> @@ -469,7 +469,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
> unsigned int uLen = pRSNWPA->len + 2;
>
> if (uLen <= (uIELength -
> - (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
> + (unsigned int) (unsigned long) ((PBYTE) pRSNWPA - pbyIEs))) {
> pBSSList->wWPALen = uLen;
> memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
> WPA_ParseRSN(pBSSList, pRSNWPA);
> @@ -482,7 +482,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
> unsigned int uLen = pRSN->len + 2;
>
> if (uLen <= (uIELength -
> - (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
> + (unsigned int) (unsigned long) ((PBYTE) pRSN - pbyIEs))) {
> pBSSList->wRSNLen = uLen;
> memcpy(pBSSList->byRSNIE, pRSN, uLen);
> WPA2vParseRSN(pBSSList, pRSN);
> @@ -674,7 +674,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
> if (pRSNWPA != NULL) {
> unsigned int uLen = pRSNWPA->len + 2;
> if (uLen <= (uIELength -
> - (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
> + (unsigned int) (unsigned long) ((PBYTE) pRSNWPA - pbyIEs))) {
> pBSSList->wWPALen = uLen;
> memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
> WPA_ParseRSN(pBSSList, pRSNWPA);
> @@ -686,7 +686,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
> if (pRSN != NULL) {
> unsigned int uLen = pRSN->len + 2;
> if (uLen <= (uIELength -
> - (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
> + (unsigned int) (unsigned long) ((PBYTE) pRSN - pbyIEs))) {
> pBSSList->wRSNLen = uLen;
> memcpy(pBSSList->byRSNIE, pRSN, uLen);
> WPA2vParseRSN(pBSSList, pRSN);
> diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h
> index 3425773..42091c4 100644
> --- a/drivers/staging/vt6656/ttype.h
> +++ b/drivers/staging/vt6656/ttype.h
> @@ -83,9 +83,6 @@ typedef UQuadWord QWORD; // 64-bit
>
> /****** Common pointer types ***********************************************/
>
> -typedef unsigned long ULONG_PTR; // 32-bit
> -typedef unsigned long DWORD_PTR; // 32-bit
> -
> // boolean pointer
> typedef unsigned int * PUINT;
>
> --
> 1.7.0.4
>

Hi Greg,

I have re-done my patch and this time without any checkpatch.pl errors.

Remove DWORD_PTR and ULONG_PTR from ttype.h

Signed-off-by: Roel Van Nyen <roel.vannyen@gmail.com>
---
drivers/staging/vt6656/bssdb.c | 8 ++++----
drivers/staging/vt6656/ttype.h | 4 ----
2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
index a9f68bd..024dff3 100644
--- a/drivers/staging/vt6656/bssdb.c
+++ b/drivers/staging/vt6656/bssdb.c
@@ -466,7 +466,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
unsigned int uLen = pRSNWPA->len + 2;

if (uLen <= (uIELength -
- (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
+ (unsigned int) (unsigned long) ((PBYTE) pRSNWPA - pbyIEs))) {
pBSSList->wWPALen = uLen;
memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
WPA_ParseRSN(pBSSList, pRSNWPA);
@@ -479,7 +479,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
unsigned int uLen = pRSN->len + 2;

if (uLen <= (uIELength -
- (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
+ (unsigned int) (unsigned long) ((PBYTE) pRSN - pbyIEs))) {
pBSSList->wRSNLen = uLen;
memcpy(pBSSList->byRSNIE, pRSN, uLen);
WPA2vParseRSN(pBSSList, pRSN);
@@ -671,7 +671,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
if (pRSNWPA != NULL) {
unsigned int uLen = pRSNWPA->len + 2;
if (uLen <= (uIELength -
- (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
+ (unsigned int) (unsigned long) ((PBYTE) pRSNWPA - pbyIEs))) {
pBSSList->wWPALen = uLen;
memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
WPA_ParseRSN(pBSSList, pRSNWPA);
@@ -683,7 +683,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
if (pRSN != NULL) {
unsigned int uLen = pRSN->len + 2;
if (uLen <= (uIELength -
- (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
+ (unsigned int) (unsigned long) ((PBYTE) pRSN - pbyIEs))) {
pBSSList->wRSNLen = uLen;
memcpy(pBSSList->byRSNIE, pRSN, uLen);
WPA2vParseRSN(pBSSList, pRSN);
diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h
index 8e9450e..e8ed3ff 100644
--- a/drivers/staging/vt6656/ttype.h
+++ b/drivers/staging/vt6656/ttype.h
@@ -59,10 +59,6 @@ typedef union tagUQuadWord {
typedef UQuadWord QWORD; // 64-bit

/****** Common pointer types ***********************************************/
-
-typedef unsigned long ULONG_PTR; // 32-bit
-typedef unsigned long DWORD_PTR; // 32-bit
-
// boolean pointer

typedef BYTE * PBYTE;
--
1.7.0.4


\
 
 \ /
  Last update: 2010-08-05 18:25    [W:0.073 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site