From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAcfc-0005iT-GZ for qemu-devel@nongnu.org; Thu, 11 Oct 2018 11:14:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAcfY-0005Y0-5s for qemu-devel@nongnu.org; Thu, 11 Oct 2018 11:14:36 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAcfO-0005Ts-Sf for qemu-devel@nongnu.org; Thu, 11 Oct 2018 11:14:26 -0400 Received: by mail-wm1-f65.google.com with SMTP id 189-v6so9390076wmw.2 for ; Thu, 11 Oct 2018 08:14:16 -0700 (PDT) References: <20181011131413.22208-1-philmd@redhat.com> From: Paolo Bonzini Message-ID: <7762db82-6044-df69-a1b7-c05100a0e938@redhat.com> Date: Thu, 11 Oct 2018 17:14:11 +0200 MIME-Version: 1.0 In-Reply-To: <20181011131413.22208-1-philmd@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] chardev: Convert IOReadHandler to read an unsigned number of bytes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Prasad J Pandit Cc: Peter Maydell , Sagar Karandikar , "Michael S. Tsirkin" , Jan Kiszka , Jason Wang , Palmer Dabbelt , qemu-devel@nongnu.org, Markus Armbruster , Max Filippov , Michael Clark , Gerd Hoffmann , "Edgar E. Iglesias" , Stefano Stabellini , Alberto Garcia , Li Zhijian , Alexander Graf , Christian Borntraeger , Antony Pavlov , Anthony Perard , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , Zhang Chen , "open list:PXA2XX" , Peter Chubb , Samuel Thibault , "open list:X86" , David Gibson , Igor Mitsyanko , Cornelia Huck , "open list:S390 Virtio-ccw" , Thomas Huth , Michael Walle , "open list:sPAPR" , Bastian Koppelmann On 11/10/2018 15:14, Philippe Mathieu-Daudé wrote: > The number of bytes can not be negative nor zero. > > Fixed 2 format string: > - hw/char/spapr_vty.c > - hw/usb/ccid-card-passthru.c > > Signed-off-by: Philippe Mathieu-Daudé > --- > See: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02212.html Not that easy; you need to adjust qemu_chr_be_can_write, qemu_chr_be_write_impl, qemu_chr_be_write (which is where the callbacks are invoked). On the other hand, fd_chr_read_poll is not an IOCanReadHandler, and this patch therefore probably doesn't compile? Paolo