This fixes up all of the sparse warnings about static functions.
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return ret;
}
-int
+static int
BlkVscOnDeviceAdd(
struct hv_device *Device,
void *AdditionalInfo
Retrieve various channel debug info
--*/
-void
+static void
VmbusChannelGetDebugInfo(
VMBUS_CHANNEL *Channel,
VMBUS_CHANNEL_DEBUG_INFO *DebugInfo
Open the specified channel.
--*/
-int
+static int
VmbusChannelOpen(
VMBUS_CHANNEL *NewChannel,
u32 SendRingBufferSize,
Estabish a GPADL for the specified buffer
--*/
-int
+static int
VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel,
void * Kbuffer, /* from kmalloc() */
Teardown the specified GPADL handle
--*/
-int
+static int
VmbusChannelTeardownGpadl(
VMBUS_CHANNEL *Channel,
u32 GpadlHandle
Close the specified channel
--*/
-void
+static void
VmbusChannelClose(
VMBUS_CHANNEL *Channel
)
Send the specified buffer on the given channel
--*/
-int
+static int
VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel,
const void * Buffer,
Send a range of single-page buffer packets using a GPADL Direct packet type.
--*/
-int
+static int
VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[],
Send a multi-page buffer packet using a GPADL Direct packet type.
--*/
-int
+static int
VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer,
--*/
/* TODO: Do we ever receive a gpa direct packet other than the ones we send ? */
-int
+static int
VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel,
void * Buffer,
Retrieve the raw packet on the specified channel
--*/
-int
+static int
VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel,
void * Buffer,
Channel event callback
--*/
-void
+static void
VmbusChannelOnChannelEvent(
VMBUS_CHANNEL *Channel
)
Timer event callback
--*/
-void
+static void
VmbusChannelOnTimer(
void *Context
)
#define MAX_NUM_DEVICE_CLASSES_SUPPORTED 4
-const GUID gSupportedDeviceClasses[MAX_NUM_DEVICE_CLASSES_SUPPORTED]= {
+static const GUID gSupportedDeviceClasses[MAX_NUM_DEVICE_CLASSES_SUPPORTED]= {
/* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */
{.Data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f}},/* Storage - SCSI */
/* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */
};
/* Channel message dispatch table */
-VMBUS_CHANNEL_MESSAGE_TABLE_ENTRY gChannelMessageTable[ChannelMessageCount]= {
+static VMBUS_CHANNEL_MESSAGE_TABLE_ENTRY gChannelMessageTable[ChannelMessageCount]= {
{ChannelMessageInvalid, NULL},
{ChannelMessageOfferChannel, VmbusChannelOnOffer},
{ChannelMessageRescindChannelOffer, VmbusChannelOnOfferRescind},
Allocate and initialize a vmbus channel object
--*/
-VMBUS_CHANNEL* AllocVmbusChannel(void)
+static VMBUS_CHANNEL* AllocVmbusChannel(void)
{
VMBUS_CHANNEL* channel;
Release the resources used by the vmbus channel object
--*/
-void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
+static void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
{
TimerClose(Channel->PollTimer);
This is invoked in the vmbus worker thread context.
--*/
-void
+static void
VmbusOnChannelMessage(
void *Context
)
Send a request to get all our pending offers.
--*/
-int
+static int
VmbusChannelRequestOffers(
void
)
Release channels that are unattached/unconnected ie (no drivers associated)
--*/
-void
+static void
VmbusChannelReleaseUnattachedChannels(
void
)
Sends a connect request on the partition service connection
--*/
-int
+static int
VmbusConnect(
)
{
Sends a disconnect request on the partition service connection
--*/
-int
+static int
VmbusDisconnect(
void
)
Get the channel object given its child relative id (ie channel id)
--*/
-VMBUS_CHANNEL*
+static VMBUS_CHANNEL*
GetChannelFromRelId(
u32 relId
)
Handler for events
--*/
-void
+static void
VmbusOnEvents(
void
)
Send a msg on the vmbus's message connection
--*/
-int
+static int
VmbusPostMessage(
void * buffer,
size_t bufferLen
Send an event notification to the parent
--*/
-int
+static int
VmbusSetEvent(u32 childRelId)
{
int ret=0;
Cleanup routine. This routine is called normally during driver unloading or exiting.
--*/
-void
+static void
HvCleanup (
void
)
involves a hypercall.
--*/
-HV_STATUS
+static HV_STATUS
HvPostMessage(
HV_CONNECTION_ID connectionId,
HV_MESSAGE_TYPE messageType,
involves a hypercall.
--*/
-HV_STATUS
+static HV_STATUS
HvSignalEvent(
)
{
Otherwise, we create and initialize the message and event pages.
--*/
-int
+static int
HvSynicInit (
u32 irqVector
)
Cleanup routine for HvSynicInit().
--*/
-void
+static void
HvSynicCleanup(
void
)
Callback when the device belonging to this driver is added
--*/
-int
+static int
NetVscOnDeviceAdd(
struct hv_device *Device,
void *AdditionalInfo
Callback when the root bus device is removed
--*/
-int
+static int
NetVscOnDeviceRemove(
struct hv_device *Device
)
Perform any cleanup when the driver is removed
--*/
-void
+static void
NetVscOnCleanup(
struct hv_driver *drv
)
Dump out to console the ring buffer info
--*/
-void
+static void
DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix)
{
u32 bytesAvailToWrite;
Get various debug metrics for the specified ring buffer
--*/
-void
+static void
RingBufferGetDebugInfo(
RING_BUFFER_INFO *RingInfo,
RING_BUFFER_DEBUG_INFO *DebugInfo
Get the interrupt mask for the specified ring buffer
--*/
-u32
+static u32
GetRingBufferInterruptMask(
RING_BUFFER_INFO *rbi
)
Initialize the ring buffer
--*/
-int
+static int
RingBufferInit(
RING_BUFFER_INFO *RingInfo,
void *Buffer,
Cleanup the ring buffer
--*/
-void
+static void
RingBufferCleanup(
RING_BUFFER_INFO* RingInfo
)
Write to the ring buffer
--*/
-int
+static int
RingBufferWrite(
RING_BUFFER_INFO* OutRingInfo,
SG_BUFFER_LIST SgBuffers[],
Read without advancing the read index
--*/
-int
+static int
RingBufferPeek(
RING_BUFFER_INFO* InRingInfo,
void* Buffer,
Read and advance the read index
--*/
-int
+static int
RingBufferRead(
RING_BUFFER_INFO* InRingInfo,
void * Buffer,
Assume there is enough room. Handles wrap-around in dest case only!!
--*/
-u32
+static u32
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
u32 StartWriteOffset,
Assume there is enough room. Handles wrap-around in src case only!!
--*/
-u32
+static u32
CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo,
void * Dest,
/* The one and only */
-RNDIS_FILTER_DRIVER_OBJECT gRndisFilter;
+static RNDIS_FILTER_DRIVER_OBJECT gRndisFilter;
static inline RNDIS_DEVICE* GetRndisDevice(void)
{
}
-int
+static int
RndisFilterOnDeviceAdd(
struct hv_device *Device,
void *AdditionalInfo
Callback when the device belonging to this driver is added
--*/
-int
+static int
StorVscOnDeviceAdd(
struct hv_device *Device,
void *AdditionalInfo
}
-int
+static int
StorVscConnectToVsp(
struct hv_device *Device
)
Callback when the our device is being removed
--*/
-int
+static int
StorVscOnDeviceRemove(
struct hv_device *Device
)
}
*********** */
-int
+static int
StorVscOnHostReset(
struct hv_device *Device
)
Callback to initiate an I/O request
--*/
-int
+static int
StorVscOnIORequest(
struct hv_device *Device,
struct hv_storvsc_request *Request
Perform any cleanup when the driver is removed
--*/
-void
+static void
StorVscOnCleanup(
struct hv_driver *Driver
)
}
}
-void
+static void
StorVscOnChannelCallback(
void * Context
)
#pragma once
-const char VersionDate[]=__DATE__;
-const char VersionTime[]=__TIME__;
-const char VersionDesc[]= "Version 2.0";
+static const char VersionDate[]=__DATE__;
+static const char VersionTime[]=__TIME__;
+static const char VersionDesc[]= "Version 2.0";
--*/
-struct hv_device*
+static struct hv_device*
VmbusChildDeviceCreate(
GUID DeviceType,
GUID DeviceInstance,
Registers the child device with the vmbus
--*/
-int
+static int
VmbusChildDeviceAdd(
struct hv_device *ChildDevice)
{
Unregisters the child device from the vmbus
--*/
-void
+static void
VmbusChildDeviceRemove(
struct hv_device *ChildDevice)
{
Callback when the root bus device is removed
--*/
-int VmbusOnDeviceRemove(
+static int VmbusOnDeviceRemove(
struct hv_device *dev
)
{
Perform any cleanup when the driver is removed
--*/
-void
+static void
VmbusOnCleanup(
struct hv_driver *drv
)
DPC routine to handle messages from the hypervisior
--*/
-void
+static void
VmbusOnMsgDPC(
struct hv_driver *drv
)
DPC routine to handle events from the hypervisior
--*/
-void
+static void
VmbusOnEventDPC(
struct hv_driver* drv
)
ISR routine
--*/
-int
+static int
VmbusOnISR(
struct hv_driver *drv
)
Desc: BlkVsc driver initialization.
--*/
-int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
{
int ret=0;
STORVSC_DRIVER_OBJECT *storvsc_drv_obj=&g_blkvsc_drv.drv_obj;
Desc:
--*/
-void blkvsc_drv_exit(void)
+static void blkvsc_drv_exit(void)
{
STORVSC_DRIVER_OBJECT *storvsc_drv_obj=&g_blkvsc_drv.drv_obj;
struct driver_context *drv_ctx=&g_blkvsc_drv.drv_ctx;
return 0;
}
-int blkvsc_getgeo(struct block_device *bd, struct hd_geometry *hg)
+static int blkvsc_getgeo(struct block_device *bd, struct hd_geometry *hg)
{
sector_t total_sectors = get_capacity(bd->bd_disk);
sector_t cylinder_times_heads=0;
Desc: NetVsc driver initialization
--*/
-int netvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int netvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
{
int ret=0;
NETVSC_DRIVER_OBJECT *net_drv_obj=&g_netvsc_drv.drv_obj;
Desc:
--*/
-void netvsc_drv_exit(void)
+static void netvsc_drv_exit(void)
{
NETVSC_DRIVER_OBJECT *netvsc_drv_obj=&g_netvsc_drv.drv_obj;
struct driver_context *drv_ctx=&g_netvsc_drv.drv_ctx;
/* iounmap(virt); */
}
-void TimerCallback(unsigned long data)
+static void TimerCallback(unsigned long data)
{
struct osd_timer *t = (struct osd_timer *) data;
return pfn << PAGE_SHIFT;
}
-void WorkItemCallback(struct work_struct *work)
+static void WorkItemCallback(struct work_struct *work)
{
WORKITEM* w = (WORKITEM*)work;
Desc: StorVsc driver initialization.
--*/
-int storvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int storvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
{
int ret=0;
STORVSC_DRIVER_OBJECT *storvsc_drv_obj=&g_storvsc_drv.drv_obj;
Desc:
--*/
-void storvsc_drv_exit(void)
+static void storvsc_drv_exit(void)
{
STORVSC_DRIVER_OBJECT *storvsc_drv_obj=&g_storvsc_drv.drv_obj;
struct driver_context *drv_ctx=&g_storvsc_drv.drv_ctx;
- setup the vmbus root device
- retrieve the channel offers
--*/
-int vmbus_bus_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int vmbus_bus_init(PFN_DRIVERINITIALIZE pfn_drv_init)
{
int ret=0;
unsigned int vector=0;
Desc: Terminate the vmbus driver. This routine is opposite of vmbus_bus_init()
--*/
-void vmbus_bus_exit(void)
+static void vmbus_bus_exit(void)
{
VMBUS_DRIVER_OBJECT *vmbus_drv_obj=&g_vmbus_drv.drv_obj;
struct vmbus_driver_context *vmbus_drv_ctx=&g_vmbus_drv;