Commit ce9ea4cf authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: rename struct NETVSC_DEVICE

The Linux kernel doesn't have all caps structures, we don't like to
shout at our programmers, it makes them grumpy.  Instead, we like to
sooth them with small, rounded letters, which puts them in a nice,
compliant mood, and makes them more productive and happier, allowing
them more fufilling lives overall.


Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 21a80820
...@@ -50,9 +50,9 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device); ...@@ -50,9 +50,9 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device);
static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device); static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device);
static int NetVscDestroySendBuffer(struct NETVSC_DEVICE *NetDevice); static int NetVscDestroySendBuffer(struct netvsc_device *NetDevice);
static int NetVscDestroyReceiveBuffer(struct NETVSC_DEVICE *NetDevice); static int NetVscDestroyReceiveBuffer(struct netvsc_device *NetDevice);
static int NetVscConnectToVsp(struct hv_device *Device); static int NetVscConnectToVsp(struct hv_device *Device);
...@@ -71,11 +71,11 @@ static void NetVscSendReceiveCompletion(struct hv_device *Device, ...@@ -71,11 +71,11 @@ static void NetVscSendReceiveCompletion(struct hv_device *Device,
u64 TransactionId); u64 TransactionId);
static struct NETVSC_DEVICE *AllocNetDevice(struct hv_device *Device) static struct netvsc_device *AllocNetDevice(struct hv_device *Device)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
netDevice = kzalloc(sizeof(struct NETVSC_DEVICE), GFP_KERNEL); netDevice = kzalloc(sizeof(struct netvsc_device), GFP_KERNEL);
if (!netDevice) if (!netDevice)
return NULL; return NULL;
...@@ -88,7 +88,7 @@ static struct NETVSC_DEVICE *AllocNetDevice(struct hv_device *Device) ...@@ -88,7 +88,7 @@ static struct NETVSC_DEVICE *AllocNetDevice(struct hv_device *Device)
return netDevice; return netDevice;
} }
static void FreeNetDevice(struct NETVSC_DEVICE *Device) static void FreeNetDevice(struct netvsc_device *Device)
{ {
ASSERT(atomic_read(&Device->RefCount) == 0); ASSERT(atomic_read(&Device->RefCount) == 0);
Device->Device->Extension = NULL; Device->Device->Extension = NULL;
...@@ -97,9 +97,9 @@ static void FreeNetDevice(struct NETVSC_DEVICE *Device) ...@@ -97,9 +97,9 @@ static void FreeNetDevice(struct NETVSC_DEVICE *Device)
/* Get the net device object iff exists and its refcount > 1 */ /* Get the net device object iff exists and its refcount > 1 */
static struct NETVSC_DEVICE *GetOutboundNetDevice(struct hv_device *Device) static struct netvsc_device *GetOutboundNetDevice(struct hv_device *Device)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
netDevice = Device->Extension; netDevice = Device->Extension;
if (netDevice && atomic_read(&netDevice->RefCount) > 1) if (netDevice && atomic_read(&netDevice->RefCount) > 1)
...@@ -111,9 +111,9 @@ static struct NETVSC_DEVICE *GetOutboundNetDevice(struct hv_device *Device) ...@@ -111,9 +111,9 @@ static struct NETVSC_DEVICE *GetOutboundNetDevice(struct hv_device *Device)
} }
/* Get the net device object iff exists and its refcount > 0 */ /* Get the net device object iff exists and its refcount > 0 */
static struct NETVSC_DEVICE *GetInboundNetDevice(struct hv_device *Device) static struct netvsc_device *GetInboundNetDevice(struct hv_device *Device)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
netDevice = Device->Extension; netDevice = Device->Extension;
if (netDevice && atomic_read(&netDevice->RefCount)) if (netDevice && atomic_read(&netDevice->RefCount))
...@@ -126,7 +126,7 @@ static struct NETVSC_DEVICE *GetInboundNetDevice(struct hv_device *Device) ...@@ -126,7 +126,7 @@ static struct NETVSC_DEVICE *GetInboundNetDevice(struct hv_device *Device)
static void PutNetDevice(struct hv_device *Device) static void PutNetDevice(struct hv_device *Device)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
netDevice = Device->Extension; netDevice = Device->Extension;
ASSERT(netDevice); ASSERT(netDevice);
...@@ -134,9 +134,9 @@ static void PutNetDevice(struct hv_device *Device) ...@@ -134,9 +134,9 @@ static void PutNetDevice(struct hv_device *Device)
atomic_dec(&netDevice->RefCount); atomic_dec(&netDevice->RefCount);
} }
static struct NETVSC_DEVICE *ReleaseOutboundNetDevice(struct hv_device *Device) static struct netvsc_device *ReleaseOutboundNetDevice(struct hv_device *Device)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
netDevice = Device->Extension; netDevice = Device->Extension;
if (netDevice == NULL) if (netDevice == NULL)
...@@ -149,9 +149,9 @@ static struct NETVSC_DEVICE *ReleaseOutboundNetDevice(struct hv_device *Device) ...@@ -149,9 +149,9 @@ static struct NETVSC_DEVICE *ReleaseOutboundNetDevice(struct hv_device *Device)
return netDevice; return netDevice;
} }
static struct NETVSC_DEVICE *ReleaseInboundNetDevice(struct hv_device *Device) static struct netvsc_device *ReleaseInboundNetDevice(struct hv_device *Device)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
netDevice = Device->Extension; netDevice = Device->Extension;
if (netDevice == NULL) if (netDevice == NULL)
...@@ -208,7 +208,7 @@ int NetVscInitialize(struct hv_driver *drv) ...@@ -208,7 +208,7 @@ int NetVscInitialize(struct hv_driver *drv)
static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device) static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device)
{ {
int ret = 0; int ret = 0;
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
struct nvsp_message *initPacket; struct nvsp_message *initPacket;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -339,7 +339,7 @@ static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device) ...@@ -339,7 +339,7 @@ static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device)
static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device) static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device)
{ {
int ret = 0; int ret = 0;
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
struct nvsp_message *initPacket; struct nvsp_message *initPacket;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -431,7 +431,7 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device) ...@@ -431,7 +431,7 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device)
return ret; return ret;
} }
static int NetVscDestroyReceiveBuffer(struct NETVSC_DEVICE *NetDevice) static int NetVscDestroyReceiveBuffer(struct netvsc_device *NetDevice)
{ {
struct nvsp_message *revokePacket; struct nvsp_message *revokePacket;
int ret = 0; int ret = 0;
...@@ -511,7 +511,7 @@ static int NetVscDestroyReceiveBuffer(struct NETVSC_DEVICE *NetDevice) ...@@ -511,7 +511,7 @@ static int NetVscDestroyReceiveBuffer(struct NETVSC_DEVICE *NetDevice)
return ret; return ret;
} }
static int NetVscDestroySendBuffer(struct NETVSC_DEVICE *NetDevice) static int NetVscDestroySendBuffer(struct netvsc_device *NetDevice)
{ {
struct nvsp_message *revokePacket; struct nvsp_message *revokePacket;
int ret = 0; int ret = 0;
...@@ -589,7 +589,7 @@ static int NetVscDestroySendBuffer(struct NETVSC_DEVICE *NetDevice) ...@@ -589,7 +589,7 @@ static int NetVscDestroySendBuffer(struct NETVSC_DEVICE *NetDevice)
static int NetVscConnectToVsp(struct hv_device *Device) static int NetVscConnectToVsp(struct hv_device *Device)
{ {
int ret; int ret;
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
struct nvsp_message *initPacket; struct nvsp_message *initPacket;
int ndisVersion; int ndisVersion;
...@@ -693,7 +693,7 @@ static int NetVscConnectToVsp(struct hv_device *Device) ...@@ -693,7 +693,7 @@ static int NetVscConnectToVsp(struct hv_device *Device)
return ret; return ret;
} }
static void NetVscDisconnectFromVsp(struct NETVSC_DEVICE *NetDevice) static void NetVscDisconnectFromVsp(struct netvsc_device *NetDevice)
{ {
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -710,7 +710,7 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo) ...@@ -710,7 +710,7 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
{ {
int ret = 0; int ret = 0;
int i; int i;
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
struct hv_netvsc_packet *packet; struct hv_netvsc_packet *packet;
LIST_ENTRY *entry; LIST_ENTRY *entry;
struct netvsc_driver *netDriver = struct netvsc_driver *netDriver =
...@@ -813,7 +813,7 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo) ...@@ -813,7 +813,7 @@ static int NetVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
*/ */
static int NetVscOnDeviceRemove(struct hv_device *Device) static int NetVscOnDeviceRemove(struct hv_device *Device)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
struct hv_netvsc_packet *netvscPacket; struct hv_netvsc_packet *netvscPacket;
LIST_ENTRY *entry; LIST_ENTRY *entry;
...@@ -881,7 +881,7 @@ static void NetVscOnCleanup(struct hv_driver *drv) ...@@ -881,7 +881,7 @@ static void NetVscOnCleanup(struct hv_driver *drv)
static void NetVscOnSendCompletion(struct hv_device *Device, static void NetVscOnSendCompletion(struct hv_device *Device,
struct vmpacket_descriptor *Packet) struct vmpacket_descriptor *Packet)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
struct nvsp_message *nvspPacket; struct nvsp_message *nvspPacket;
struct hv_netvsc_packet *nvscPacket; struct hv_netvsc_packet *nvscPacket;
...@@ -931,7 +931,7 @@ static void NetVscOnSendCompletion(struct hv_device *Device, ...@@ -931,7 +931,7 @@ static void NetVscOnSendCompletion(struct hv_device *Device,
static int NetVscOnSend(struct hv_device *Device, static int NetVscOnSend(struct hv_device *Device,
struct hv_netvsc_packet *Packet) struct hv_netvsc_packet *Packet)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
int ret = 0; int ret = 0;
struct nvsp_message sendMessage; struct nvsp_message sendMessage;
...@@ -990,7 +990,7 @@ static int NetVscOnSend(struct hv_device *Device, ...@@ -990,7 +990,7 @@ static int NetVscOnSend(struct hv_device *Device,
static void NetVscOnReceive(struct hv_device *Device, static void NetVscOnReceive(struct hv_device *Device,
struct vmpacket_descriptor *Packet) struct vmpacket_descriptor *Packet)
{ {
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
struct vmtransfer_page_packet_header *vmxferpagePacket; struct vmtransfer_page_packet_header *vmxferpagePacket;
struct nvsp_message *nvspPacket; struct nvsp_message *nvspPacket;
struct hv_netvsc_packet *netvscPacket = NULL; struct hv_netvsc_packet *netvscPacket = NULL;
...@@ -1255,7 +1255,7 @@ static void NetVscOnReceiveCompletion(void *Context) ...@@ -1255,7 +1255,7 @@ static void NetVscOnReceiveCompletion(void *Context)
{ {
struct hv_netvsc_packet *packet = Context; struct hv_netvsc_packet *packet = Context;
struct hv_device *device = (struct hv_device *)packet->Device; struct hv_device *device = (struct hv_device *)packet->Device;
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
u64 transactionId = 0; u64 transactionId = 0;
bool fSendReceiveComp = false; bool fSendReceiveComp = false;
unsigned long flags; unsigned long flags;
...@@ -1312,7 +1312,7 @@ void NetVscOnChannelCallback(void *Context) ...@@ -1312,7 +1312,7 @@ void NetVscOnChannelCallback(void *Context)
const int netPacketSize = 2048; const int netPacketSize = 2048;
int ret; int ret;
struct hv_device *device = Context; struct hv_device *device = Context;
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
u32 bytesRecvd; u32 bytesRecvd;
u64 requestId; u64 requestId;
unsigned char packet[netPacketSize]; unsigned char packet[netPacketSize];
......
...@@ -290,7 +290,7 @@ struct nvsp_message { ...@@ -290,7 +290,7 @@ struct nvsp_message {
/* Per netvsc channel-specific */ /* Per netvsc channel-specific */
struct NETVSC_DEVICE { struct netvsc_device {
struct hv_device *Device; struct hv_device *Device;
atomic_t RefCount; atomic_t RefCount;
......
...@@ -40,7 +40,7 @@ enum rndis_device_state { ...@@ -40,7 +40,7 @@ enum rndis_device_state {
}; };
struct rndis_device { struct rndis_device {
struct NETVSC_DEVICE *NetDevice; struct netvsc_device *NetDevice;
enum rndis_device_state State; enum rndis_device_state State;
u32 LinkStatus; u32 LinkStatus;
...@@ -390,7 +390,7 @@ static void RndisFilterReceiveData(struct rndis_device *Device, ...@@ -390,7 +390,7 @@ static void RndisFilterReceiveData(struct rndis_device *Device,
static int RndisFilterOnReceive(struct hv_device *Device, static int RndisFilterOnReceive(struct hv_device *Device,
struct hv_netvsc_packet *Packet) struct hv_netvsc_packet *Packet)
{ {
struct NETVSC_DEVICE *netDevice = Device->Extension; struct netvsc_device *netDevice = Device->Extension;
struct rndis_device *rndisDevice; struct rndis_device *rndisDevice;
struct rndis_message rndisMessage; struct rndis_message rndisMessage;
struct rndis_message *rndisHeader; struct rndis_message *rndisHeader;
...@@ -791,7 +791,7 @@ static int RndisFilterOnDeviceAdd(struct hv_device *Device, ...@@ -791,7 +791,7 @@ static int RndisFilterOnDeviceAdd(struct hv_device *Device,
void *AdditionalInfo) void *AdditionalInfo)
{ {
int ret; int ret;
struct NETVSC_DEVICE *netDevice; struct netvsc_device *netDevice;
struct rndis_device *rndisDevice; struct rndis_device *rndisDevice;
struct netvsc_device_info *deviceInfo = AdditionalInfo; struct netvsc_device_info *deviceInfo = AdditionalInfo;
...@@ -867,7 +867,7 @@ static int RndisFilterOnDeviceAdd(struct hv_device *Device, ...@@ -867,7 +867,7 @@ static int RndisFilterOnDeviceAdd(struct hv_device *Device,
static int RndisFilterOnDeviceRemove(struct hv_device *Device) static int RndisFilterOnDeviceRemove(struct hv_device *Device)
{ {
struct NETVSC_DEVICE *netDevice = Device->Extension; struct netvsc_device *netDevice = Device->Extension;
struct rndis_device *rndisDevice = netDevice->Extension; struct rndis_device *rndisDevice = netDevice->Extension;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -896,7 +896,7 @@ static void RndisFilterOnCleanup(struct hv_driver *Driver) ...@@ -896,7 +896,7 @@ static void RndisFilterOnCleanup(struct hv_driver *Driver)
static int RndisFilterOnOpen(struct hv_device *Device) static int RndisFilterOnOpen(struct hv_device *Device)
{ {
int ret; int ret;
struct NETVSC_DEVICE *netDevice = Device->Extension; struct netvsc_device *netDevice = Device->Extension;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -911,7 +911,7 @@ static int RndisFilterOnOpen(struct hv_device *Device) ...@@ -911,7 +911,7 @@ static int RndisFilterOnOpen(struct hv_device *Device)
static int RndisFilterOnClose(struct hv_device *Device) static int RndisFilterOnClose(struct hv_device *Device)
{ {
int ret; int ret;
struct NETVSC_DEVICE *netDevice = Device->Extension; struct netvsc_device *netDevice = Device->Extension;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment