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

Re: [PATCH] xen/arm: pci: fix -Wtype-limits warning in pci-host-common.c


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 4 May 2023 10:32:21 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Gd/NjnaXxNh81P765sCdBk6OvwGARw4SD4t12/DyxQw=; b=HZc/CCtlnYBzuwiGvKLPBhHpmpxxxoAyOeAemgnrNFNnE3PDtZZPL//M99IBW1TiOKBftngkdgP/QHhz5WmOxp2O3n3O4ohUKevfMZw2i35yF0uOWC3ECS90we2PliIT+T8PC+YKV/megHBnYQZYoK4X3DfKbg7d123odC660uD4mqzutF56x2LCQZyWir8XnwZFfqkbhhoLrvzC0Au5i/e/ILKktIToVEY5ONMx6Tndy5O8NKZ0PFxv9I8JjZ2BsXU6LE8ms0DByKBEYrbTMImDP1Lno281NmsBPANYS4wP71iH3mR4zxmem72kWIgpxFYIEsXRq/OHnRrFcvWDJg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TIzjCFJz3L37hTwIw1CdETIrhR6uSxgwwQG/66xSrWotr5nHwlqLJqjrXavo+1uUsBDyK1IxbMmZMurU6algKceJhGXP9GPyXVPkZ+HhDDtzM/GPY4XiVGoDdoaZFZvCBSi71CUtve5nP+2KN0LuQSn2nT4R3nDAAMiLHgeYg9HosI2ZZKBJinlPzuVnkwJi89OBRA2KOp/XSHuszy19Xnqj0uVl4a666h7H5fm6c1EkKYwXH5hB2V+BzY+9Mq6anL3MaE6adXgOST1bWTEbhkwVIIVJCaCgOrm1Jl7AlV6uKTa11gUx+Dhhph9NP05afkXPAoEklbmF2rWB62jn3Q==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 04 May 2023 10:32:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZffQTsmRRBKh80kOBQgH8fU6H2a9J0ZUAgAAT8ICAAAXxgA==
  • Thread-topic: [PATCH] xen/arm: pci: fix -Wtype-limits warning in pci-host-common.c

Hi,

> On 4 May 2023, at 12:10, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi,
> 
> On 04/05/2023 09:59, Bertrand Marquis wrote:
>> Hi Stewart,
>>> On 3 May 2023, at 21:18, Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx> 
>>> wrote:
>>> 
>>> When building with EXTRA_CFLAGS_XEN_CORE="-Wtype-limits", we observe the
>>> following warning:
>>> 
>>> arch/arm/pci/pci-host-common.c: In function ‘pci_host_common_probe’:
>>> arch/arm/pci/pci-host-common.c:238:26: warning: comparison is always false 
>>> due to limited range of data type [-Wtype-limits]
>>>  238 |     if ( bridge->segment < 0 )
>>>      |                          ^
>>> 
>>> This is due to bridge->segment being an unsigned type. Fix it by 
>>> introducing a
>>> new variable of signed type to use in the condition.
>>> 
>>> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
>> I would see this as a bug fix more than a compiler warning fix as the error 
>> code was
>> ignored before that.
> 
> +1. Also there is a missing fixes tag. AFAICT this issue was introduced by 
> 6ec9176d94ae.
> 
>> Anyway:
>> Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
> 
> Just to clarify, you are happy with the current commit message? If so, I can 
> commit it later on with the Reviewed-by + fixes tag.

Would be nice to add the proper fixes flag if you can do it on commit :-)

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall



 


Rackspace

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