public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nicolas Palix <npalix@diku.dk>
Cc: gregkh@suse.de, hjanssen@microsoft.com,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] Staging: hv: Fix warning by casting a (const void
Date: Wed, 29 Jul 2009 13:03:28 +0000	[thread overview]
Message-ID: <1248872608.3493.26.camel@Joe-Laptop.home> (raw)
In-Reply-To: <200907291410.29355.npalix@diku.dk>

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;
 



  parent reply	other threads:[~2009-07-29 13:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29 12:10 [PATCH 4/4] Staging: hv: Fix warning by casting a (const void *) to (void *) Nicolas Palix
2009-07-29 13:02 ` [PATCH 4/4] Staging: hv: Fix warning by casting a (const void Greg KH
2009-07-29 20:13   ` Hank Janssen
2009-07-29 20:44     ` Greg KH
2009-07-29 13:03 ` Joe Perches [this message]
2009-07-29 13:08 ` [PATCH 4/4] Staging: hv: Fix warning by casting a (const void *) to (void *) Arnd Bergmann
2009-07-29 13:13   ` [PATCH 4/4] Staging: hv: Fix warning by casting a (const void Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1248872608.3493.26.camel@Joe-Laptop.home \
    --to=joe@perches.com \
    --cc=gregkh@suse.de \
    --cc=hjanssen@microsoft.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npalix@diku.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox