[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: Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Thu, 4 May 2023 09:55:35 +0000
  • Accept-language: 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=oT3cAAImx46iN9Cg877ANIWn8JL/IUJ158jZ8MQ4VBY=; b=dduKJGL8g/ek0QWvPyclcU1g6+FwgYI3Xi4iyD7OWatyGovEeIPW29kyhMWsvPKZFEDjxSNMFZ2E9FR5biQ00dnQcG88Aoh6hr61nwiZ3UbBh4OZxc1V1xPT2DCsVZ/T61R2fq/kaqxA4Bpdayti43c5ne52Uv5BcFwYN7vcsFsXFPr3Vn9MEuKO7r7KMw1Xf1A8RpqCAr7yUvqHzQrTGBR1gqyfpQwuHDxVbhRJYZbeURNfY0rSARX1QeMKXiU5JPW5xTpgp8VOuGeP1WSECTgDFfV7y4B6Ihr+D61NuJkUgYECWzvXynV3TwZSXCVB8kCvqf0Xk8I7SSC73fBrIQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nRZyZRnXGhC9bUOUhhL2eebZ/6eLA7w27v0LsUOG5gJ7va5qvq/T8Gjp1uJKUNAWfEL0EcTsJ74jA20wlNfZ6WeB7VniAmKnMFHoUXd9MGDktHRY8oyAwuBIlqSW6+QWjjZwBczW9pv+YcGX1EdlAjc1GZFZSTimP3pnHR4U5sxis9ZqicUsjXFL8tu9qjLjp1ILPrs3FYz1iLs+0fXeW52CKXhdbtW9v8Usnvsx08iikbNtLTFmyMk+pploaqMlqUU4JvWc+08fRcORK1GMQfyK6UIprQxD8F/W6LeMDkjFaign2lU6stevtyJNQgr2hgbdllceGIbRmuFP0SldfQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen developer discussion <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 04 May 2023 09:56:01 +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: AQHZffQdsUu9XjzfjkKQkjxjNw1HC69J4TCA
  • Thread-topic: [PATCH] xen/arm: pci: fix -Wtype-limits warning in pci-host-common.c

Hi Stewart,

On 3 May 2023, at 8:18 pm, 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>

Reviewed-by: Rahul Singh <rahul.singh@xxxxxxx>

Regards,
Rahul
 

 


Rackspace

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