[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 9/9] xen/arm32: vfp: Add missing U for shifted constant
- To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Mon, 26 Jun 2023 06:43:40 +0000
- Accept-language: zh-CN, 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=s/Kps7qecb5gahzM/SpqUwmWytmxzmEO6Mj21PiKjsE=; b=mWnP8MGvmh30mflek3nvWho0Ucre8onv6rPwbqXNWtZIT4kl9TjvVcupsCefQhtEhwdnCzzZlp9WHgj8ZRLUrUJBisz626mqzmu8Wi/YcMimDb4Lcq6oVSJEq8/wPUr3U1M7Ca7DCgurBv7TQHc4IYt51ePnQz5qk5nYbJZ6YguNpQgnBxS0YMnIC7Ii2hQawPrkCk2aoulHM07idlYB9HVXNrREeh1ql5xf+PbOlSBcEBRlHnLHz9Sa6ucUlHx1OeG4VTMIV4if0uO/rtfRUgQ5s8qJLjpPUlR8fsqE6Gph2uT0NN8NZ4xMeP7U5jp/g5HynofCeGCMWvLtfUaxFA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YTgrrTxWctqjKr+e4b0F2zKTPBg5BXVXcfsI+bRTx8UZd2P1v0eHjKC/IphLOMOhF0Mb9JiUf3KNleD1r+InU+E/1gd3qD8JIeSV7xtLCBrfY1+1HyzTlckefeA+Dgv8b0lr6RhkCCipwk35F8BaVBQhQzX8kdRy9B7EpczyoqG47pgQYR1iTHtlqb7GOHeqKZ5nC7BoTbhOqr5pGeO5GQwWjI63cCkL1PBC523o7RtlWAWXz9oKOWM6I/Bapy/L2TKUsdGPcl6QYLxdiJHYc0XVx4OTPzcg60cHLor/DHLgxku8Ik8ixVLRK8j1UItuc5Mez2kkknS1Oca6jMJOtg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 26 Jun 2023 06:44:16 +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: AQHZp6aOcmGkZ2VYKUmiFKMJReLdUq+co60w
- Thread-topic: [PATCH 9/9] xen/arm32: vfp: Add missing U for shifted constant
Hi Julien,
> -----Original Message-----
> Subject: [PATCH 9/9] xen/arm32: vfp: Add missing U for shifted constant
>
> From: Julien Grall <jgrall@xxxxxxxxxx>
>
> When enabling UBSAN on arm32, the following splat will be printed:
>
> (XEN)
> ================================================================
> ================
> (XEN) UBSAN: Undefined behaviour in arch/arm/arm32/vfp.c:75:22
> (XEN) left shift of 255 by 24 places cannot be represented in type 'int'
>
> This is referring to the shift in FPSID_IMPLEMENTER_MASK. While we could
> only add the U to the value shift there, it would be better to be
> consistent and also add it for every value shifted.
>
> This should also addressing MISRA Rule 7.2:
>
> A "u" or "U" suffix shall be applied to all integer constants that
> are represented in an unsigned type
>
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>
Kind regards,
Henry
|