Skip to content

Commit

Permalink
Staging: hv: fix sparse static warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed Sep 15, 2009
1 parent 0b3f683 commit bd1de70
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/hv/BlkVsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ BlkVscInitialize(
return ret;
}

int
static int
BlkVscOnDeviceAdd(
struct hv_device *Device,
void *AdditionalInfo
Expand Down
24 changes: 12 additions & 12 deletions drivers/staging/hv/Channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ VmbusChannelClearEvent(
Retrieve various channel debug info
--*/
void
static void
VmbusChannelGetDebugInfo(
VMBUS_CHANNEL *Channel,
VMBUS_CHANNEL_DEBUG_INFO *DebugInfo
Expand Down Expand Up @@ -197,7 +197,7 @@ VmbusChannelGetDebugInfo(
Open the specified channel.
--*/
int
static int
VmbusChannelOpen(
VMBUS_CHANNEL *NewChannel,
u32 SendRingBufferSize,
Expand Down Expand Up @@ -510,7 +510,7 @@ VmbusChannelCreateGpadlHeader(
Estabish a GPADL for the specified buffer
--*/
int
static int
VmbusChannelEstablishGpadl(
VMBUS_CHANNEL *Channel,
void * Kbuffer, /* from kmalloc() */
Expand Down Expand Up @@ -615,7 +615,7 @@ VmbusChannelEstablishGpadl(
Teardown the specified GPADL handle
--*/
int
static int
VmbusChannelTeardownGpadl(
VMBUS_CHANNEL *Channel,
u32 GpadlHandle
Expand Down Expand Up @@ -676,7 +676,7 @@ VmbusChannelTeardownGpadl(
Close the specified channel
--*/
void
static void
VmbusChannelClose(
VMBUS_CHANNEL *Channel
)
Expand Down Expand Up @@ -753,7 +753,7 @@ VmbusChannelClose(
Send the specified buffer on the given channel
--*/
int
static int
VmbusChannelSendPacket(
VMBUS_CHANNEL *Channel,
const void * Buffer,
Expand Down Expand Up @@ -819,7 +819,7 @@ VmbusChannelSendPacket(
Send a range of single-page buffer packets using a GPADL Direct packet type.
--*/
int
static int
VmbusChannelSendPacketPageBuffer(
VMBUS_CHANNEL *Channel,
PAGE_BUFFER PageBuffers[],
Expand Down Expand Up @@ -902,7 +902,7 @@ VmbusChannelSendPacketPageBuffer(
Send a multi-page buffer packet using a GPADL Direct packet type.
--*/
int
static int
VmbusChannelSendPacketMultiPageBuffer(
VMBUS_CHANNEL *Channel,
MULTIPAGE_BUFFER *MultiPageBuffer,
Expand Down Expand Up @@ -985,7 +985,7 @@ VmbusChannelSendPacketMultiPageBuffer(
--*/
/* TODO: Do we ever receive a gpa direct packet other than the ones we send ? */
int
static int
VmbusChannelRecvPacket(
VMBUS_CHANNEL *Channel,
void * Buffer,
Expand Down Expand Up @@ -1063,7 +1063,7 @@ VmbusChannelRecvPacket(
Retrieve the raw packet on the specified channel
--*/
int
static int
VmbusChannelRecvPacketRaw(
VMBUS_CHANNEL *Channel,
void * Buffer,
Expand Down Expand Up @@ -1140,7 +1140,7 @@ VmbusChannelRecvPacketRaw(
Channel event callback
--*/
void
static void
VmbusChannelOnChannelEvent(
VMBUS_CHANNEL *Channel
)
Expand All @@ -1165,7 +1165,7 @@ VmbusChannelOnChannelEvent(
Timer event callback
--*/
void
static void
VmbusChannelOnTimer(
void *Context
)
Expand Down
14 changes: 7 additions & 7 deletions drivers/staging/hv/ChannelMgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ VmbusChannelProcessRescindOffer(

#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} */
Expand All @@ -100,7 +100,7 @@ const GUID gSupportedDeviceClasses[MAX_NUM_DEVICE_CLASSES_SUPPORTED]= {
};

/* 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},
Expand Down Expand Up @@ -129,7 +129,7 @@ VMBUS_CHANNEL_MESSAGE_TABLE_ENTRY gChannelMessageTable[ChannelMessageCount]= {
Allocate and initialize a vmbus channel object
--*/
VMBUS_CHANNEL* AllocVmbusChannel(void)
static VMBUS_CHANNEL* AllocVmbusChannel(void)
{
VMBUS_CHANNEL* channel;

Expand Down Expand Up @@ -193,7 +193,7 @@ static inline void ReleaseVmbusChannel(void* Context)
Release the resources used by the vmbus channel object
--*/
void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
static void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
{
TimerClose(Channel->PollTimer);

Expand Down Expand Up @@ -665,7 +665,7 @@ VmbusChannelOnVersionResponse(
This is invoked in the vmbus worker thread context.
--*/
void
static void
VmbusOnChannelMessage(
void *Context
)
Expand Down Expand Up @@ -714,7 +714,7 @@ VmbusOnChannelMessage(
Send a request to get all our pending offers.
--*/
int
static int
VmbusChannelRequestOffers(
void
)
Expand Down Expand Up @@ -776,7 +776,7 @@ VmbusChannelRequestOffers(
Release channels that are unattached/unconnected ie (no drivers associated)
--*/
void
static void
VmbusChannelReleaseUnattachedChannels(
void
)
Expand Down
12 changes: 6 additions & 6 deletions drivers/staging/hv/Connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct VMBUS_CONNECTION gVmbusConnection = {
Sends a connect request on the partition service connection
--*/
int
static int
VmbusConnect(
)
{
Expand Down Expand Up @@ -198,7 +198,7 @@ VmbusConnect(
Sends a disconnect request on the partition service connection
--*/
int
static int
VmbusDisconnect(
void
)
Expand Down Expand Up @@ -254,7 +254,7 @@ VmbusDisconnect(
Get the channel object given its child relative id (ie channel id)
--*/
VMBUS_CHANNEL*
static VMBUS_CHANNEL*
GetChannelFromRelId(
u32 relId
)
Expand Down Expand Up @@ -329,7 +329,7 @@ VmbusProcessChannelEvent(
Handler for events
--*/
void
static void
VmbusOnEvents(
void
)
Expand Down Expand Up @@ -389,7 +389,7 @@ VmbusOnEvents(
Send a msg on the vmbus's message connection
--*/
int
static int
VmbusPostMessage(
void * buffer,
size_t bufferLen
Expand Down Expand Up @@ -419,7 +419,7 @@ VmbusPostMessage(
Send an event notification to the parent
--*/
int
static int
VmbusSetEvent(u32 childRelId)
{
int ret=0;
Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/hv/Hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ HvInit (
Cleanup routine. This routine is called normally during driver unloading or exiting.
--*/
void
static void
HvCleanup (
void
)
Expand Down Expand Up @@ -390,7 +390,7 @@ HvCleanup (
involves a hypercall.
--*/
HV_STATUS
static HV_STATUS
HvPostMessage(
HV_CONNECTION_ID connectionId,
HV_MESSAGE_TYPE messageType,
Expand Down Expand Up @@ -444,7 +444,7 @@ HvPostMessage(
involves a hypercall.
--*/
HV_STATUS
static HV_STATUS
HvSignalEvent(
)
{
Expand All @@ -467,7 +467,7 @@ HvSignalEvent(
Otherwise, we create and initialize the message and event pages.
--*/
int
static int
HvSynicInit (
u32 irqVector
)
Expand Down Expand Up @@ -611,7 +611,7 @@ HvSynicInit (
Cleanup routine for HvSynicInit().
--*/
void
static void
HvSynicCleanup(
void
)
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/hv/NetVsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ NetVscDisconnectFromVsp(
Callback when the device belonging to this driver is added
--*/
int
static int
NetVscOnDeviceAdd(
struct hv_device *Device,
void *AdditionalInfo
Expand Down Expand Up @@ -909,7 +909,7 @@ NetVscOnDeviceAdd(
Callback when the root bus device is removed
--*/
int
static int
NetVscOnDeviceRemove(
struct hv_device *Device
)
Expand Down Expand Up @@ -981,7 +981,7 @@ NetVscOnDeviceRemove(
Perform any cleanup when the driver is removed
--*/
void
static void
NetVscOnCleanup(
struct hv_driver *drv
)
Expand Down
20 changes: 10 additions & 10 deletions drivers/staging/hv/RingBuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ GetRingBufferIndices(RING_BUFFER_INFO* RingInfo)
Dump out to console the ring buffer info
--*/
void
static void
DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix)
{
u32 bytesAvailToWrite;
Expand Down Expand Up @@ -249,7 +249,7 @@ CopyFromRingBuffer(
Get various debug metrics for the specified ring buffer
--*/
void
static void
RingBufferGetDebugInfo(
RING_BUFFER_INFO *RingInfo,
RING_BUFFER_DEBUG_INFO *DebugInfo
Expand Down Expand Up @@ -281,7 +281,7 @@ RingBufferGetDebugInfo(
Get the interrupt mask for the specified ring buffer
--*/
u32
static u32
GetRingBufferInterruptMask(
RING_BUFFER_INFO *rbi
)
Expand All @@ -298,7 +298,7 @@ GetRingBufferInterruptMask(
Initialize the ring buffer
--*/
int
static int
RingBufferInit(
RING_BUFFER_INFO *RingInfo,
void *Buffer,
Expand Down Expand Up @@ -329,7 +329,7 @@ RingBufferInit(
Cleanup the ring buffer
--*/
void
static void
RingBufferCleanup(
RING_BUFFER_INFO* RingInfo
)
Expand All @@ -345,7 +345,7 @@ RingBufferCleanup(
Write to the ring buffer
--*/
int
static int
RingBufferWrite(
RING_BUFFER_INFO* OutRingInfo,
SG_BUFFER_LIST SgBuffers[],
Expand Down Expand Up @@ -435,7 +435,7 @@ RingBufferWrite(
Read without advancing the read index
--*/
int
static int
RingBufferPeek(
RING_BUFFER_INFO* InRingInfo,
void* Buffer,
Expand Down Expand Up @@ -484,7 +484,7 @@ RingBufferPeek(
Read and advance the read index
--*/
int
static int
RingBufferRead(
RING_BUFFER_INFO* InRingInfo,
void * Buffer,
Expand Down Expand Up @@ -555,7 +555,7 @@ RingBufferRead(
Assume there is enough room. Handles wrap-around in dest case only!!
--*/
u32
static u32
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
u32 StartWriteOffset,
Expand Down Expand Up @@ -596,7 +596,7 @@ CopyToRingBuffer(
Assume there is enough room. Handles wrap-around in src case only!!
--*/
u32
static u32
CopyFromRingBuffer(
RING_BUFFER_INFO *RingInfo,
void * Dest,
Expand Down
Loading

0 comments on commit bd1de70

Please sign in to comment.