[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH xenbus 2/7] s/Index/Cpu in the SYSTEM code where 'Index' relates to a processor



From: Paul Durrant <pdurrant@xxxxxxxxxx>

This is a purely cosmetic patch. No functional change.

Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
---
 include/xen.h    |  2 +-
 src/xen/system.c | 30 +++++++++++++++---------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/include/xen.h b/include/xen.h
index 31e95da6fc22..89f68867ad5f 100644
--- a/include/xen.h
+++ b/include/xen.h
@@ -457,7 +457,7 @@ SystemProcessorCount(
 XEN_API
 NTSTATUS
 SystemVirtualCpuIndex(
-    IN  ULONG           Index,
+    IN  ULONG           Cpu,
     OUT unsigned int    *vcpu_id
     );
 
diff --git a/src/xen/system.c b/src/xen/system.c
index 5a8ba16a6660..8219c86f8321 100644
--- a/src/xen/system.c
+++ b/src/xen/system.c
@@ -578,7 +578,7 @@ SystemProcessorInformation(
 {
     PSYSTEM_CONTEXT     Context = &SystemContext;
     PKEVENT             Event = Argument1;
-    ULONG               Index;
+    ULONG               Cpu;
     PROCESSOR_NUMBER    ProcNumber;
     PSYSTEM_PROCESSOR   Processor;
     ULONG               EAX;
@@ -590,12 +590,12 @@ SystemProcessorInformation(
     UNREFERENCED_PARAMETER(_Context);
     UNREFERENCED_PARAMETER(Argument2);
 
-    Index = KeGetCurrentProcessorNumberEx(&ProcNumber);
-    ASSERT3U(Index, <, Context->ProcessorCount);
+    Cpu = KeGetCurrentProcessorNumberEx(&ProcNumber);
+    ASSERT3U(Cpu, <, Context->ProcessorCount);
 
-    Processor = &Context->Processor[Index];
+    Processor = &Context->Processor[Cpu];
 
-    if (Index == 0) {
+    if (Cpu == 0) {
         CHAR    Signature[13];
 
         RtlZeroMemory(Signature, sizeof (Signature));
@@ -642,14 +642,14 @@ SystemProcessorChangeCallback(
 {
     PSYSTEM_CONTEXT                             Context = &SystemContext;
     PROCESSOR_NUMBER                            ProcNumber;
-    ULONG                                       Index;
+    ULONG                                       Cpu;
     NTSTATUS                                    status;
 
     UNREFERENCED_PARAMETER(Argument);
 
-    Index = Change->NtNumber;
+    Cpu = Change->NtNumber;
 
-    status = KeGetProcessorNumberFromIndex(Index, &ProcNumber);
+    status = KeGetProcessorNumberFromIndex(Cpu, &ProcNumber);
     ASSERT(NT_SUCCESS(status));
 
     Trace("====> (%u:%u:%s)\n",
@@ -662,10 +662,10 @@ SystemProcessorChangeCallback(
         PSYSTEM_PROCESSOR   Processor;
         ULONG               ProcessorCount;
 
-        if (Index < Context->ProcessorCount)
+        if (Cpu < Context->ProcessorCount)
             break;
 
-        ProcessorCount = Index + 1;
+        ProcessorCount = Cpu + 1;
         Processor = __SystemAllocate(sizeof (SYSTEM_PROCESSOR) *
                                      ProcessorCount);
 
@@ -692,9 +692,9 @@ SystemProcessorChangeCallback(
         PSYSTEM_PROCESSOR   Processor;
         KEVENT              Event;
 
-        ASSERT3U(Index, <, Context->ProcessorCount);
+        ASSERT3U(Cpu, <, Context->ProcessorCount);
 
-        Processor = &Context->Processor[Index];
+        Processor = &Context->Processor[Cpu];
 
         KeInitializeEvent(&Event, NotificationEvent, FALSE);
 
@@ -1069,16 +1069,16 @@ SystemProcessorCount(
 XEN_API
 NTSTATUS
 SystemVirtualCpuIndex(
-    IN  ULONG           Index,
+    IN  ULONG           Cpu,
     OUT unsigned int    *vcpu_id
     )
 {
     PSYSTEM_CONTEXT     Context = &SystemContext;
-    PSYSTEM_PROCESSOR   Processor = &Context->Processor[Index];
+    PSYSTEM_PROCESSOR   Processor = &Context->Processor[Cpu];
     NTSTATUS            status;
 
     status = STATUS_UNSUCCESSFUL;
-    if (Index >= __SystemProcessorCount())
+    if (Cpu >= __SystemProcessorCount())
         goto fail1;
 
     *vcpu_id = Processor->ProcessorID;
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.