[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1248872608.3493.26.camel@Joe-Laptop.home>
Date: Wed, 29 Jul 2009 06:03:28 -0700
From: Joe Perches <joe@...ches.com>
To: Nicolas Palix <npalix@...u.dk>
Cc: gregkh@...e.de, hjanssen@...rosoft.com,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] Staging: hv: Fix warning by casting a (const void
*) to (void *)
On Wed, 2009-07-29 at 14:10 +0200, Nicolas Palix wrote:
> Fix compilation warning by casting the const void *Buffer
> variable into a void *.
> diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
> index 68f3442..854fa30 100644
> --- a/drivers/staging/hv/Channel.c
> +++ b/drivers/staging/hv/Channel.c
> @@ -787,7 +787,7 @@ VmbusChannelSendPacket(
> bufferList[0].Data = &desc;
> bufferList[0].Length = sizeof(VMPACKET_DESCRIPTOR);
>
> - bufferList[1].Data = Buffer;
> + bufferList[1].Data = (void *)Buffer;
> bufferList[1].Length = BufferLen;
Perhaps this is better?
diff --git a/drivers/staging/hv/RingBuffer.c b/drivers/staging/hv/RingBuffer.c
index 6a9f568..fa40f46 100644
--- a/drivers/staging/hv/RingBuffer.c
+++ b/drivers/staging/hv/RingBuffer.c
@@ -228,7 +228,7 @@ static u32
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
u32 StartWriteOffset,
- void * Src,
+ const void * Src,
u32 SrcLen);
static u32
@@ -559,7 +559,7 @@ u32
CopyToRingBuffer(
RING_BUFFER_INFO *RingInfo,
u32 StartWriteOffset,
- void * Src,
+ const void * Src,
u32 SrcLen)
{
void * ringBuffer=GetRingBuffer(RingInfo);
diff --git a/drivers/staging/hv/RingBuffer.h b/drivers/staging/hv/RingBuffer.h
index a0b6e0e..4cea2af 100644
--- a/drivers/staging/hv/RingBuffer.h
+++ b/drivers/staging/hv/RingBuffer.h
@@ -28,7 +28,7 @@
#include "include/osd.h"
typedef struct _SG_BUFFER_LIST {
- void * Data;
+ const void *Data;
u32 Length;
} SG_BUFFER_LIST;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists