win-pvdrivers

changeset 702:93b98effc8e7 0.10.0.141

Clean up obsolete FUNCTION_XXX macros
author James Harper <james.harper@bendigoit.com.au>
date Wed Nov 25 21:41:33 2009 +1100 (2009-11-25)
parents c3e410ac288f
children b94dda2b30d6
files xennet/xennet.c xennet/xennet_oid.c xenpci/xenpci_fdo.c xenpci/xenpci_pdo.c
line diff
     1.1 --- a/xennet/xennet.c	Wed Nov 25 21:41:03 2009 +1100
     1.2 +++ b/xennet/xennet.c	Wed Nov 25 21:41:33 2009 +1100
     1.3 @@ -196,7 +196,7 @@ XenNet_ConnectBackend(struct xennet_info
     1.4        {
     1.5          KdPrint((__DRIVER_NAME "     vectors mismatch (magic = %08x, length = %d)\n",
     1.6            ((PXENPCI_VECTORS)value)->magic, ((PXENPCI_VECTORS)value)->length));
     1.7 -        FUNCTION_ERROR_EXIT();
     1.8 +        FUNCTION_EXIT();
     1.9          return NDIS_STATUS_ADAPTER_NOT_FOUND;
    1.10        }
    1.11        else
    1.12 @@ -491,7 +491,7 @@ XenNet_Init(
    1.13        {
    1.14          KdPrint((__DRIVER_NAME "     vectors mismatch (magic = %08x, length = %d)\n",
    1.15            ((PXENPCI_VECTORS)value)->magic, ((PXENPCI_VECTORS)value)->length));
    1.16 -        FUNCTION_ERROR_EXIT();
    1.17 +        FUNCTION_EXIT();
    1.18          return NDIS_STATUS_FAILURE;
    1.19        }
    1.20        else
    1.21 @@ -695,7 +695,7 @@ XenNet_Init(
    1.22  err:
    1.23    NdisFreeMemory(xi, 0, 0);
    1.24    *OpenErrorStatus = status;
    1.25 -  FUNCTION_ERROR_EXIT();
    1.26 +  FUNCTION_EXIT_STATUS(status);
    1.27    return status;
    1.28  }
    1.29  
    1.30 @@ -712,7 +712,8 @@ XenNet_PnPEventNotify(
    1.31    UNREFERENCED_PARAMETER(InformationBuffer);
    1.32    UNREFERENCED_PARAMETER(InformationBufferLength);
    1.33  
    1.34 -  FUNCTION_CALLED();
    1.35 +  FUNCTION_ENTER();
    1.36 +  FUNCTION_EXIT();
    1.37  }
    1.38  
    1.39  /* Called when machine is shutting down, so just quiesce the HW and be done fast. */
    1.40 @@ -724,7 +725,8 @@ XenNet_Shutdown(
    1.41    UNREFERENCED_PARAMETER(MiniportAdapterContext);
    1.42  
    1.43    /* remember we are called at >= DIRQL here */
    1.44 -  FUNCTION_CALLED();
    1.45 +  FUNCTION_ENTER();
    1.46 +  FUNCTION_EXIT();
    1.47  }
    1.48  
    1.49  /* Opposite of XenNet_Init */
     2.1 --- a/xennet/xennet_oid.c	Wed Nov 25 21:41:03 2009 +1100
     2.2 +++ b/xennet/xennet_oid.c	Wed Nov 25 21:41:33 2009 +1100
     2.3 @@ -383,7 +383,7 @@ XenNet_QueryInformation(
     2.4  
     2.5    if (!NT_SUCCESS(status))
     2.6    {
     2.7 -    // FUNCTION_ERROR_EXIT();
     2.8 +    //FUNCTION_EXIT_STATUS(status);
     2.9      return status;
    2.10    }
    2.11  
     3.1 --- a/xenpci/xenpci_fdo.c	Wed Nov 25 21:41:03 2009 +1100
     3.2 +++ b/xenpci/xenpci_fdo.c	Wed Nov 25 21:41:33 2009 +1100
     3.3 @@ -180,6 +180,9 @@ XenPci_SysrqHandler(char *path, PVOID co
     3.4    case 'B': /* cause a bug check */
     3.5      KeBugCheckEx(('X' << 16)|('E' << 8)|('N'), 0x00000001, 0x00000000, 0x00000000, 0x00000000);
     3.6      break;
     3.7 +  case 'A': /* cause an assert */
     3.8 +    ASSERT(1 == 0);
     3.9 +    break;
    3.10    default:
    3.11      KdPrint(("     Unhandled sysrq letter %c\n", letter));
    3.12      break;
    3.13 @@ -689,7 +692,10 @@ XenPci_EvtDeviceD0Entry(WDFDEVICE device
    3.14        reservation.nr_extents = 1;
    3.15        #pragma warning(disable: 4127) /* conditional expression is constant */
    3.16        set_xen_guest_handle(reservation.extent_start, &pfn);
    3.17 +      
    3.18 +      //KdPrint((__DRIVER_NAME "     Calling HYPERVISOR_memory_op - pfn = %x\n", (ULONG)pfn));
    3.19        ret = HYPERVISOR_memory_op(xpdd, XENMEM_decrease_reservation, &reservation);
    3.20 +      //KdPrint((__DRIVER_NAME "     decreased %d pages\n", ret));
    3.21      }
    3.22      
    3.23    // use the memory_op(unsigned int op, void *arg) hypercall to adjust memory
     4.1 --- a/xenpci/xenpci_pdo.c	Wed Nov 25 21:41:03 2009 +1100
     4.2 +++ b/xenpci/xenpci_pdo.c	Wed Nov 25 21:41:33 2009 +1100
     4.3 @@ -965,7 +965,7 @@ XenPciPdo_EvtDeviceWdmIrpPreprocess_STAR
     4.4          {
     4.5            RtlStringCbPrintfA(path, ARRAY_SIZE(path), "%s/state", xppdd->backend_path);
     4.6            XenBus_RemWatch(xpdd, XBT_NIL, path, XenPci_BackendStateHandler, device);
     4.7 -          FUNCTION_ERROR_EXIT();
     4.8 +          FUNCTION_EXIT_STATUS(status);
     4.9            return status;
    4.10          }
    4.11  #endif
    4.12 @@ -1097,7 +1097,7 @@ XenPciPdo_EvtDeviceD0Entry(WDFDEVICE dev
    4.13    if (!NT_SUCCESS(status))
    4.14    {
    4.15      WdfDeviceSetFailed(device, WdfDeviceFailedNoRestart);
    4.16 -    FUNCTION_ERROR_EXIT();
    4.17 +    FUNCTION_EXIT_STATUS(status);
    4.18      return status;
    4.19    }
    4.20    status = XenPci_XenConfigDevice(device);
    4.21 @@ -1106,7 +1106,7 @@ XenPciPdo_EvtDeviceD0Entry(WDFDEVICE dev
    4.22      RtlStringCbPrintfA(path, ARRAY_SIZE(path), "%s/state", xppdd->backend_path);
    4.23      XenBus_RemWatch(xpdd, XBT_NIL, path, XenPci_BackendStateHandler, device);
    4.24      WdfDeviceSetFailed(device, WdfDeviceFailedNoRestart);
    4.25 -    FUNCTION_ERROR_EXIT();
    4.26 +    FUNCTION_EXIT_STATUS(status);
    4.27      return status;
    4.28    }
    4.29  
    4.30 @@ -1496,7 +1496,7 @@ XenPci_Pdo_Resume(WDFDEVICE device)
    4.31      {
    4.32        KdPrint((__DRIVER_NAME "     Failed to change frontend state to Initialising\n"));
    4.33        // this is probably an unrecoverable situation...
    4.34 -      FUNCTION_ERROR_EXIT();
    4.35 +      FUNCTION_EXIT();
    4.36        return STATUS_UNSUCCESSFUL;
    4.37      }
    4.38      if (xppdd->assigned_resources_ptr)
    4.39 @@ -1518,7 +1518,7 @@ XenPci_Pdo_Resume(WDFDEVICE device)
    4.40      {
    4.41        // this is definitely an unrecoverable situation...
    4.42        KdPrint((__DRIVER_NAME "     Failed to change frontend state to connected\n"));
    4.43 -      FUNCTION_ERROR_EXIT();
    4.44 +      FUNCTION_EXIT();
    4.45        return STATUS_UNSUCCESSFUL;
    4.46      }
    4.47      XenPci_Pdo_ChangeSuspendState(device, SR_STATE_RESUMING);