Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206009
b: refs/heads/master
c: 4a1b3ac
h: refs/heads/master
i:
  206007: 1210788
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jul 27, 2010
1 parent 3ee64c2 commit 368f8fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a0e1c5505e8784c0a5f8cb0141ab45bd3de5f57
refs/heads/master: 4a1b3acc909ca02bdb286d3dd498262e89875b49
6 changes: 3 additions & 3 deletions trunk/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 trunk/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 368f8fa

Please sign in to comment.