From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm9VE-00007Z-Bn for qemu-devel@nongnu.org; Tue, 03 Jul 2012 16:15:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm9V9-0000Im-DF for qemu-devel@nongnu.org; Tue, 03 Jul 2012 16:15:15 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44110 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm9V9-0000G4-3t for qemu-devel@nongnu.org; Tue, 03 Jul 2012 16:15:11 -0400 Message-ID: <4FF352C4.6040209@suse.de> Date: Tue, 03 Jul 2012 22:15:00 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1340984094-5451-1-git-send-email-armbru@redhat.com> <1340984094-5451-19-git-send-email-armbru@redhat.com> <20120702125515.GA16482@stefanha-thinkpad.localdomain> <4FF19D21.20005@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 18/32] hd-geometry: Switch to uint32_t to match BlockConf List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: kwolf@redhat.com, aliguori@us.ibm.com, Stefan Hajnoczi , Stefan Hajnoczi , qemu-devel@nongnu.org, Markus Armbruster , pbonzini@redhat.com Am 03.07.2012 21:11, schrieb Blue Swirl: > On Mon, Jul 2, 2012 at 2:34 PM, Stefan Hajnoczi wr= ote: >> On Mon, Jul 2, 2012 at 3:15 PM, Markus Armbruster = wrote: >>> Andreas F=C3=A4rber writes: >>> >>>> Am 02.07.2012 14:55, schrieb Stefan Hajnoczi: >>>>> On Fri, Jun 29, 2012 at 05:34:40PM +0200, Markus Armbruster wrote: >>>>>> Best to use the same type, to avoid unwanted truncation or sign >>>>>> extension. >>>>>> >>>>>> BlockConf can't use plain int for cyls, heads and secs, because >>>>>> integer properties require an exact width. >>>>>> >>>>>> Signed-off-by: Markus Armbruster >>>>>> --- >>>>>> blockdev.h | 2 +- >>>>>> hw/hd-geometry.c | 4 ++-- >>>>>> hw/ide/core.c | 2 +- >>>>>> hw/scsi-disk.c | 2 +- >>>>>> hw/virtio-blk.c | 2 +- >>>>>> 5 files changed, 6 insertions(+), 6 deletions(-) >>>>> >>>>> It would be nice to update the hd_geometry_lchs_guess() trace event= that >>>>> you added to use uint32_t + %u instead of int + %d. >>>> >>>> PRIu32? >>> >>> uint32_t: Good point, will do. >>> >>> Conversion specifier: trace-events routinely prints uint32_t with %d = and >>> %x, never with PRI*32. I'm happy to change from %d to %u, but reluct= ant >>> to add the first use of PRIu32. >> >> Either is fine by me although we might as well continue to do %u. >=20 > I'd also vote for %u. PRI*32 do not seem very useful compared to plain > int versions. If it's not useful we should use unsigned int. Mixing both is simply wrong. I'm okay with fixing it consistently in a follow-up though. The Broken Window theory scores again (lack of const, non-CamelCase type names, placement of {, wrong semicolons, etc.). Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg