Staging: hv: remove TRUE, FALSE, and NULL usage
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 15 Jul 2009 19:46:44 +0000 (12:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:01:47 +0000 (12:01 -0700)
Don't define things that are either already provided (like NULL), or you
shouldn't use (like TRUE and FALSE).

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/ChannelMgmt.c
drivers/staging/hv/Hv.c
drivers/staging/hv/NetVsc.c
drivers/staging/hv/RndisFilter.c
drivers/staging/hv/include/osd.h

index b10db081a19a7a70678a97c3a39288b10631054a..ff9c9d033f7a8670f10a74dc21fabb90e39e11dd 100644 (file)
@@ -240,7 +240,7 @@ VmbusChannelProcessOffer(
        VMBUS_CHANNEL* newChannel=(VMBUS_CHANNEL*)context;
        LIST_ENTRY* anchor;
        LIST_ENTRY* curr;
-       bool fNew=TRUE;
+       bool fNew = true;
        VMBUS_CHANNEL* channel;
 
        DPRINT_ENTER(VMBUS);
@@ -255,7 +255,7 @@ VmbusChannelProcessOffer(
                if (!memcmp(&channel->OfferMsg.Offer.InterfaceType, &newChannel->OfferMsg.Offer.InterfaceType,sizeof(GUID)) &&
                        !memcmp(&channel->OfferMsg.Offer.InterfaceInstance, &newChannel->OfferMsg.Offer.InterfaceInstance, sizeof(GUID)))
                {
-                       fNew = FALSE;
+                       fNew = false;
                        break;
                }
        }
index 0e7397793ed92dc1c9efbe4b41c1507cc39fb083..0e543ee9d5a680e0ec1b91443a79a7cf37b82a1a 100644 (file)
@@ -31,7 +31,7 @@
 
 // The one and only
 HV_CONTEXT gHvContext={
-       .SynICInitialized = FALSE,
+       .SynICInitialized = false,
        .HypercallPage = NULL,
        .SignalEventParam = NULL,
        .SignalEventBuffer = NULL,
@@ -571,8 +571,8 @@ HvSynicInit (
 
        sharedSint.AsUINT64 = 0;
     sharedSint.Vector = irqVector; //HV_SHARED_SINT_IDT_VECTOR + 0x20;
-    sharedSint.Masked = FALSE;
-    sharedSint.AutoEoi = TRUE;
+    sharedSint.Masked = false;
+    sharedSint.AutoEoi = true;
 
        DPRINT_DBG(VMBUS, "HV_X64_MSR_SINT1 msr set to: %llx", sharedSint.AsUINT64);
 
@@ -584,7 +584,7 @@ HvSynicInit (
 
     WriteMsr(HV_X64_MSR_SCONTROL, sctrl.AsUINT64);
 
-       gHvContext.SynICInitialized = TRUE;
+       gHvContext.SynICInitialized = true;
 
        DPRINT_EXIT(VMBUS);
 
index ca0348aa55eb9b02c2114166d9284d95d287e49a..f3fd69ae18b98fd9575c6c94b2339defee60237a 100644 (file)
@@ -1345,7 +1345,7 @@ NetVscOnReceiveCompletion(
        DEVICE_OBJECT *device = (DEVICE_OBJECT*)packet->Device;
        NETVSC_DEVICE* netDevice;
        u64     transactionId=0;
-       bool fSendReceiveComp = FALSE;
+       bool fSendReceiveComp = false;
 
        DPRINT_ENTER(NETVSC);
 
@@ -1371,7 +1371,7 @@ NetVscOnReceiveCompletion(
        // Return the xfer page packet itself to the freelist
        if (packet->XferPagePacket->Count == 0)
        {
-               fSendReceiveComp = TRUE;
+               fSendReceiveComp = true;
                transactionId = packet->Completion.Recv.ReceiveCompletionTid;
 
                INSERT_TAIL_LIST(&netDevice->ReceivePacketList, &packet->XferPagePacket->ListEntry);
index 92fc0520842b8f61f7e8fac2d779bead559fde88..01507339e50371a3558390270c6b51db843d25fa 100644 (file)
@@ -357,7 +357,7 @@ RndisFilterSendRequest(
        // Setup the packet to send it
        packet = &Request->Packet;
 
-       packet->IsDataPacket = FALSE;
+       packet->IsDataPacket = false;
        packet->TotalDataBufferLength = Request->RequestMessage.MessageLength;
        packet->PageBufferCount = 1;
 
@@ -384,7 +384,7 @@ RndisFilterReceiveResponse(
        LIST_ENTRY *anchor;
        LIST_ENTRY *curr;
        RNDIS_REQUEST *request=NULL;
-       bool found=FALSE;
+       bool found = false;
 
        DPRINT_ENTER(NETVSC);
 
@@ -399,7 +399,7 @@ RndisFilterReceiveResponse(
                        DPRINT_DBG(NETVSC, "found rndis request for this response (id 0x%x req type 0x%x res type 0x%x)",
                                request->RequestMessage.Message.InitializeRequest.RequestId, request->RequestMessage.NdisMessageType, Response->NdisMessageType);
 
-                       found = TRUE;
+                       found = true;
                        break;
                }
        }
@@ -485,7 +485,7 @@ RndisFilterReceiveData(
        Packet->PageBuffers[0].Offset += dataOffset;
        Packet->PageBuffers[0].Length -= dataOffset;
 
-       Packet->IsDataPacket = TRUE;
+       Packet->IsDataPacket = true;
 
        gRndisFilter.InnerDriver.OnReceiveCallback(Device->NetDevice->Device, Packet);
 
@@ -1112,7 +1112,7 @@ RndisFilterOnSend(
        rndisPacket->DataOffset = sizeof(RNDIS_PACKET);
        rndisPacket->DataLength = Packet->TotalDataBufferLength;
 
-       Packet->IsDataPacket = TRUE;
+       Packet->IsDataPacket = true;
        Packet->PageBuffers[0].Pfn              = GetPhysicalAddress(rndisMessage) >> PAGE_SHIFT;
        Packet->PageBuffers[0].Offset   = (unsigned long)rndisMessage & (PAGE_SIZE-1);
        Packet->PageBuffers[0].Length   = rndisMessageSize;
index ba44e685bf1f36c6809290650568d294ff891fc9..e4bbea8c3bd9d6187f1ea6ab7882d926d55a7a9a 100644 (file)
 #define LOWORD(dw)             ((unsigned short) (dw))
 #define HIWORD(dw)             ((unsigned short) (((unsigned int) (dw) >> 16) & 0xFFFF))
 
-#ifdef FALSE
-#undef FALSE
-#endif
-#define FALSE 0
-
-#ifdef TRUE
-#undef TRUE
-#endif
-#define TRUE  1
-
-#ifndef NULL
-#define NULL  (void *)0
-#endif
-
 typedef struct _DLIST_ENTRY {
    struct _DLIST_ENTRY *Flink;
    struct _DLIST_ENTRY *Blink;