On Tue, Jul 3, 2012 at 8:15 PM, Andreas Färber <afaer...@suse.de> wrote: > Am 03.07.2012 21:11, schrieb Blue Swirl: >> On Mon, Jul 2, 2012 at 2:34 PM, Stefan Hajnoczi <stefa...@gmail.com> wrote: >>> On Mon, Jul 2, 2012 at 3:15 PM, Markus Armbruster <arm...@redhat.com> wrote: >>>> Andreas Färber <afaer...@suse.de> 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 <arm...@redhat.com> >>>>>>> --- >>>>>>> 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 reluctant >>>> to add the first use of PRIu32. >>> >>> Either is fine by me although we might as well continue to do %u. >> >> 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.).
Since the 'const' issues are not related to CODING_STYLE (for those Anthony vetoes global reformatting), I think global patches (preferably broken down for bisection though) should be OK. What's wrong with the semicolons? > > Andreas > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg