Skip to content

Commit

Permalink
Staging: hv: remove RING_BUFFER typedef
Browse files Browse the repository at this point in the history
typedefs are bad, kill them.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Jul 27, 2010
1 parent 8a0e1c5 commit 4a1b3ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/hv/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,16 +302,16 @@ u32 GetRingBufferInterruptMask(struct hv_ring_buffer_info *rbi)
--*/
int RingBufferInit(struct hv_ring_buffer_info *RingInfo, void *Buffer, u32 BufferLen)
{
if (sizeof(RING_BUFFER) != PAGE_SIZE)
if (sizeof(struct hv_ring_buffer) != PAGE_SIZE)
return -EINVAL;

memset(RingInfo, 0, sizeof(struct hv_ring_buffer_info));

RingInfo->RingBuffer = (RING_BUFFER *)Buffer;
RingInfo->RingBuffer = (struct hv_ring_buffer *)Buffer;
RingInfo->RingBuffer->ReadIndex = RingInfo->RingBuffer->WriteIndex = 0;

RingInfo->RingSize = BufferLen;
RingInfo->RingDataSize = BufferLen - sizeof(RING_BUFFER);
RingInfo->RingDataSize = BufferLen - sizeof(struct hv_ring_buffer);

spin_lock_init(&RingInfo->ring_lock);

Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/hv/ring_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include <linux/scatterlist.h>

typedef struct _RING_BUFFER {
struct hv_ring_buffer {
/* Offset in bytes from the start of ring data below */
volatile u32 WriteIndex;

Expand All @@ -51,10 +51,10 @@ typedef struct _RING_BUFFER {
* !!! DO NOT place any fields below this !!!
*/
u8 Buffer[0];
} __attribute__((packed)) RING_BUFFER;
} __attribute__((packed));

struct hv_ring_buffer_info {
RING_BUFFER *RingBuffer;
struct hv_ring_buffer *RingBuffer;
u32 RingSize; /* Include the shared header */
spinlock_t ring_lock;

Expand Down

0 comments on commit 4a1b3ac

Please sign in to comment.