kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Use signed 16-bit values for ivshmem register writes
@ 2010-08-30 16:58 Cam Macdonell
  2010-09-03  1:53 ` Hidetoshi Seto
  0 siblings, 1 reply; 2+ messages in thread
From: Cam Macdonell @ 2010-08-30 16:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: kvm, Cam Macdonell

fixes gcc 4.1 warning

Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca>
---
 hw/ivshmem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index bbb5cba..fa9c684 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -181,8 +181,8 @@ static void ivshmem_io_writel(void *opaque, target_phys_addr_t addr,
     IVShmemState *s = opaque;
 
     uint64_t write_one = 1;
-    uint16_t dest = val >> 16;
-    uint16_t vector = val & 0xff;
+    int16_t dest = val >> 16;
+    int16_t vector = val & 0xff;
 
     addr &= 0xfc;
 
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Use signed 16-bit values for ivshmem register writes
  2010-08-30 16:58 [PATCH] Use signed 16-bit values for ivshmem register writes Cam Macdonell
@ 2010-09-03  1:53 ` Hidetoshi Seto
  0 siblings, 0 replies; 2+ messages in thread
From: Hidetoshi Seto @ 2010-09-03  1:53 UTC (permalink / raw)
  To: Cam Macdonell; +Cc: qemu-devel, kvm, Hao, Xudong

(2010/08/31 1:58), Cam Macdonell wrote:
> fixes gcc 4.1 warning
> 
> Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca>
> ---
>  hw/ivshmem.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ivshmem.c b/hw/ivshmem.c
> index bbb5cba..fa9c684 100644
> --- a/hw/ivshmem.c
> +++ b/hw/ivshmem.c
> @@ -181,8 +181,8 @@ static void ivshmem_io_writel(void *opaque, target_phys_addr_t addr,
>      IVShmemState *s = opaque;
>  
>      uint64_t write_one = 1;
> -    uint16_t dest = val >> 16;
> -    uint16_t vector = val & 0xff;
> +    int16_t dest = val >> 16;
> +    int16_t vector = val & 0xff;
>  
>      addr &= 0xfc;
>  

Since val is uint32_t, I think this change doesn't make sense.

Thanks,
H.Seto


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-03  1:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 16:58 [PATCH] Use signed 16-bit values for ivshmem register writes Cam Macdonell
2010-09-03  1:53 ` Hidetoshi Seto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).