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

Re: [Xen-devel] [PATCH-for-5.0 v3 3/6] hw/pci-host/i440fx: Use size_t to iterate over ARRAY_SIZE()


  • To: Paolo Bonzini <pbonzini@xxxxxxxxxx>, Thomas Huth <thuth@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, qemu-devel@xxxxxxxxxx
  • From: Laurent Vivier <laurent@xxxxxxxxx>
  • Date: Wed, 18 Dec 2019 13:31:04 +0100
  • Autocrypt: addr=laurent@xxxxxxxxx; prefer-encrypt=mutual; keydata= mQINBFYFJhkBEAC2me7w2+RizYOKZM+vZCx69GTewOwqzHrrHSG07MUAxJ6AY29/+HYf6EY2 WoeuLWDmXE7A3oJoIsRecD6BXHTb0OYS20lS608anr3B0xn5g0BX7es9Mw+hV/pL+63EOCVm SUVTEQwbGQN62guOKnJJJfphbbv82glIC/Ei4Ky8BwZkUuXd7d5NFJKC9/GDrbWdj75cDNQx UZ9XXbXEKY9MHX83Uy7JFoiFDMOVHn55HnncflUncO0zDzY7CxFeQFwYRbsCXOUL9yBtqLer Ky8/yjBskIlNrp0uQSt9LMoMsdSjYLYhvk1StsNPg74+s4u0Q6z45+l8RAsgLw5OLtTa+ePM JyS7OIGNYxAX6eZk1+91a6tnqfyPcMbduxyBaYXn94HUG162BeuyBkbNoIDkB7pCByed1A7q q9/FbuTDwgVGVLYthYSfTtN0Y60OgNkWCMtFwKxRaXt1WFA5ceqinN/XkgA+vf2Ch72zBkJL RBIhfOPFv5f2Hkkj0MvsUXpOWaOjatiu0fpPo6Hw14UEpywke1zN4NKubApQOlNKZZC4hu6/ 8pv2t4HRi7s0K88jQYBRPObjrN5+owtI51xMaYzvPitHQ2053LmgsOdN9EKOqZeHAYG2SmRW LOxYWKX14YkZI5j/TXfKlTpwSMvXho+efN4kgFvFmP6WT+tPnwARAQABtCJMYXVyZW50IFZp dmllciA8bGF1cmVudEB2aXZpZXIuZXU+iQI4BBMBAgAi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MG1zvQ5TQQHxau/2FkP45+nRPco6vVFQe8JmgtRF8WFJA==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, QEMU Trivial <qemu-trivial@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Markus Armbruster <armbru@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 18 Dec 2019 12:31:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Le 18/12/2019 à 13:01, Paolo Bonzini a écrit :
> On 18/12/19 12:57, Laurent Vivier wrote:
>> Le 09/12/2019 à 11:05, Thomas Huth a écrit :
>>> On 09/12/2019 10.49, Philippe Mathieu-Daudé wrote:
>>>> We don't enforce the -Wsign-conversion CPPFLAG, but it doesn't hurt
>>>> to avoid this warning:
>>>>
>>>>   warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 
>>>> 'unsigned long') [-Wsign-conversion]
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
>>>> ---
>>>>  hw/pci-host/i440fx.c | 5 ++---
>>>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
>>>> index fbdc563599..0cc80b276d 100644
>>>> --- a/hw/pci-host/i440fx.c
>>>> +++ b/hw/pci-host/i440fx.c
>>>> @@ -419,12 +419,11 @@ out:
>>>>  static void igd_pt_i440fx_realize(PCIDevice *pci_dev, Error **errp)
>>>>  {
>>>>      uint32_t val = 0;
>>>> -    int i, num;
>>>> +    size_t i;
>>>>      int pos, len;
>>>>      Error *local_err = NULL;
>>>>  
>>>> -    num = ARRAY_SIZE(igd_host_bridge_infos);
>>>> -    for (i = 0; i < num; i++) {
>>>> +    for (i = 0; i < ARRAY_SIZE(igd_host_bridge_infos); i++) {
>>>>          pos = igd_host_bridge_infos[i].offset;
>>>>          len = igd_host_bridge_infos[i].len;
>>>>          host_pci_config_read(pos, len, &val, &local_err);
>>>>
>>>
>>> Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>
>>>
>>>
>>
>> Applied to my trivial-patches branch.
> 
> No need to, I've already queued the whole series.
> 

ok, I've removed them from my queue.

Thanks,
Laurent


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.