WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 3 of 5] Remove unneeded cast when assigning pointer v

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 3 of 5] Remove unneeded cast when assigning pointer value to dst
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Fri, 06 May 2011 20:25:34 +0200
Cc: George Dunlap <george.dunlap@xxxxxxxxxx>
Delivery-date: Fri, 06 May 2011 11:27:53 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1304706332; l=1310; s=domk; d=aepfle.de; h=Cc:To:From:Date:References:In-Reply-To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:X-RZG-CLASS-ID: X-RZG-AUTH; bh=rrs5VQ3GSoSt58gqjSmZs3kP9So=; b=hTZVH+32bn3/NrpnbEtYP55RI/bN6eBiAtYdlONXjHtNhZkaPC5FJAkyGZjE0W7n+Gd FgiB96kkr0jfhSkqxzE50Sx9mR1JGzoe7HH8XH9pQ6baankKEdCi4D0DyLhdORcsGA3pv pgXd5ASsVEx2+1KrtltOCz1VaHhSrK25Lko=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1304706331@localhost>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1304706331@localhost>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.8.1
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1304697395 -7200
# Node ID 1631b61acaa8e88437d0f1861409ab1824de2721
# Parent  91c40bb4c01a331a41ab6a14a2b5ec7d12e86a76
Remove unneeded cast when assigning pointer value to dst.
Both arrays are uint32_t and memcpy takes a void pointer.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 91c40bb4c01a -r 1631b61acaa8 xen/common/trace.c
--- a/xen/common/trace.c        Fri May 06 17:56:35 2011 +0200
+++ b/xen/common/trace.c        Fri May 06 17:56:35 2011 +0200
@@ -483,7 +483,7 @@ static inline void __insert_record(struc
                                    const void *extra_data)
 {
     struct t_rec *rec;
-    unsigned char *dst;
+    uint32_t *dst;
     unsigned int extra_word = extra / sizeof(u32);
     unsigned int local_rec_size = calc_rec_size(cycles, extra);
     uint32_t next;
@@ -508,13 +508,13 @@ static inline void __insert_record(struc
 
     rec->event = event;
     rec->extra_u32 = extra_word;
-    dst = (unsigned char *)rec->u.nocycles.extra_u32;
+    dst = rec->u.nocycles.extra_u32;
     if ( (rec->cycles_included = cycles) != 0 )
     {
         u64 tsc = (u64)get_cycles();
         rec->u.cycles.cycles_lo = (uint32_t)tsc;
         rec->u.cycles.cycles_hi = (uint32_t)(tsc >> 32);
-        dst = (unsigned char *)rec->u.cycles.extra_u32;
+        dst = rec->u.cycles.extra_u32;
     } 
 
     if ( extra_data && extra )

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel