From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY4Uy-0000AP-PS for qemu-devel@nongnu.org; Wed, 27 Jun 2018 03:04:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fY4Uu-0001hi-5C for qemu-devel@nongnu.org; Wed, 27 Jun 2018 03:04:16 -0400 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]:40359) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fY4Ut-0001hO-WD for qemu-devel@nongnu.org; Wed, 27 Jun 2018 03:04:12 -0400 Received: by mail-pf0-x22e.google.com with SMTP id z24-v6so562570pfe.7 for ; Wed, 27 Jun 2018 00:04:11 -0700 (PDT) References: <20180625124238.25339-1-f4bug@amsat.org> <20180625124238.25339-36-f4bug@amsat.org> From: Richard Henderson Message-ID: <3c5eef2f-115c-9c6d-2dba-0407fcebcdc4@linaro.org> Date: Wed, 27 Jun 2018 00:04:08 -0700 MIME-Version: 1.0 In-Reply-To: <20180625124238.25339-36-f4bug@amsat.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v5 35/46] hw/usb: Use the IEC binary prefix definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Thomas Huth , Stefan Weil Cc: qemu-trivial@nongnu.org, Gerd Hoffmann , qemu-devel@nongnu.org On 06/25/2018 05:42 AM, Philippe Mathieu-Daudé wrote: > -#define VSCARD_IN_SIZE 65536 > +#define VSCARD_IN_SIZE (64 * KiB) > > /* maximum size of ATR - from 7816-3 */ > #define MAX_ATR_SIZE 40 > @@ -276,7 +277,7 @@ static void ccid_card_vscard_read(void *opaque, const uint8_t *buf, int size) > > if (card->vscard_in_pos + size > VSCARD_IN_SIZE) { > error_report( > - "no room for data: pos %d + size %d > %d. dropping connection.", > + "no room for data: pos %u + size %d > %ld. dropping connection.", > card->vscard_in_pos, size, VSCARD_IN_SIZE); Did you test this with i686 host? %ld doesn't look right. r~