[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.22 v2] xen/mm: Remove INVALID_{MFN,GFN}_INITIALIZER
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Tue, 30 Jun 2026 17:29:08 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Qf5hWo1jxtKxy/QAJbMzqY7B+GgOm42sp/yu7jP5BGc=; b=QztgejCmFIQCstWIV/bhN6xRhQ3I341NS0TlPeLh3WTUUnDvb8mYIWvn+lyigNe85X4znqNozt0ku8bs/HCxPFY3bA9AB0hxaxq5RpSWsCcSK4HQDEiq4mLUFVNzd9VxSzJHEO2TMg8V3iKEySU2j5u2RBkTuCAzgbSJz5eULdUi6gdyT45R7FDlr5UJdRbKTA3Mle6P2IYxMhT2EGA5C/IAUWMwuqHYFwKC70wr/QCX7tMqLGf4rbuf13RguwZcGh/F0G/948ev8JIv/GUaJTHia7rzaN1l7iacgCPj/dMR0UWQwY8/oSCh85McHOhQZcC1G+CPAFUoGMpbnFyZdA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AMqTgz5yhbtFqd44Hg6srrYbphhZfYad6B6vUVo5lkHUCTiGtBPmIcj58zqG4u1nsOetQtH85e4z9rxja71lvNQDQjsddTQTK/TWi9vVRJ6QuN3xTiusZQFLVwmtMM6M4qf3lc+sCCcIBLg287XtP9/jFmZPYKy3QYspspMwVOzcUqi91sjkXHKckEw2AMpn7vPSkoG5NzE5O/h0N78lqCr1RSdJbuxsv7GxgrIMqq6HAfIKw3XVDQEEvMUHQ9JkHQu0ozpOv64He98xjRlziKrNW+clO86y8qjx51LAMRamoOPOkKdeqzWOS4gI+h2ebYJp5vh5d99rCtWIZE7HWQ==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Delivery-date: Tue, 30 Jun 2026 15:29:26 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 30-Jun-26 10:34, Andrew Cooper wrote:
> These existed to work around a bug in older GCC when using struct-casting for
> variable initialisation. However, our baseline toolchain is new enough to not
> suffer this bug.
>
> Removing these resolves two MISRA Rule 9.2 violations which exist in release
> builds of Xen only, where "= { ... }" is disallowed for simple scalar
> initialisation.
>
> The BUILD_BUG_ON() in xenmem_add_to_physmap() cannot stay as it is, because
> INVALID_GFN is not an Integer Constant Expression. Replace it BUILD_ERROR()
> which is the nearest available alternative.
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|