qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/6] hw/usb/quirks: Use smaller types to reduce .rodata by 10


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/6] hw/usb/quirks: Use smaller types to reduce .rodata by 10KiB
Date: Thu, 5 Mar 2020 13:01:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 3/5/20 12:59 PM, Gerd Hoffmann wrote:
And went this less intrusive way.

I'll respin with s/-1/UINT8_MAX/.

Problem, now this entry is ignored (interface_class==-1):

Yep, "-1" is used as "not used" or "end-of-list" indicator, and it is
outside the valid range to avoid that kind of clashes.  You need some
other way to express that if you want go with smaller types which don't
allow values outside the valid range any more.  Add a "flags" field for
that maybe?

Oh I wasn't expecting 0xffff valid for idVendor /
idProduct, neither 0xff for bInterfaceClass / bInterfaceSubClass /
bInterfaceProtocol. Well maybe it doesn't worth the churn for 10KB of .rodata.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]