[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v5] misra: address violation of MISRA C Rule 10.1
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Thu, 17 Jul 2025 06:44:12 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=suse.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- 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=2; 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=PnDlBbd+7diMYQX+1Wt1klp0J1f7VthhhZhRbQeA2N0=; b=DxeGvEAIn5QLxqVp/jautYtYrBrTniE16o4UF93O+/EckFMPFsQZcatWgmCtCqvZFqi7iJGretNgIEfxhmjtp0CLK3UysPfxq5eSt6XG4B3OST3MlyFcYlOgKhzQnZPnF+uzQTI0nM73DUp0X6YSBSlzOnhu824RkbW8Mt6xyKEXq6RtXq6D9vezsrL33AAHgpiiWCFZcgqZtQBg8bietXW3PjTgWWbn6pUddHKZdazfQ2Md+3Md2n9xAKhZUA4ImrCYx7RuKt031UBFFVxCkWihIHVMDep+2blZUaAWCqCnEKWj+L4mqs84SQOWh9Yppic5ICCmheZTWitnlnI74g==
- 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=PnDlBbd+7diMYQX+1Wt1klp0J1f7VthhhZhRbQeA2N0=; b=dG2LTfypof4SmJpv/oFZ1aIdu11HuYFWb9neNMYSQe7/mIul4JlDlTWN+flVKqThSXoZxIoBQWW8fvashukTg52IUSA5HJVpK5ZsqFIReNEaEbAoS7gzmew77spR8Vwqaj6+t++FTN9ptSilguxAMhW5wt5J1GsAC32ZYbNbUX/IVRKc9XxcnoqmJmv/MuXQPYtwnOxEapsAAkNzuWnT2wVoQYPmDW0b9Lj27XPrih+fHDKM0IhN66M/JRKL6VCTSdkLsHQ3VWfvIsurf+hmNpOKfobaUSA4RojwIaXwYT2iRwZVHaeX3+0tsFQQV0iyLaIOxbgFjj0T0U6nOHGr+w==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=c8XuE++LwlDIqOM53OCmbD4tsCiSZ0BE2aoerW2qvuO1i71DDjNRSslKWLfQ9MJXP2xBAzYOkcaAO1sX3l4MRKLJyB0GIZYn97pTK2G+auohYvPgFlnzLB0FkhC8FLR0AKidJvYTzSIV1b9blpsD7upbRK21B782Y0rxmj5eAM1Xaww1JmxsQBeXEWE8FPhnVxxUns8AwRO9ZKj4yGb0EPAUAWX6tassrAKtzGgtZARb0Y/sga3+3zBrrDKBsZM4IwgEHePKJM22+MBXxmGnC0QcjPgsF6MYH3lB5rLWd4twUyNknTF2Jt7bJdgCaclsE66hWw3/0iPau56MdvQfxw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SubL6ydbIVl6mYBWoeUc4I5+o+VPWzdrXDJ8ccauNnGJ2kpMpJsTyE4wMg9XfwACW7z+a5oCzgYdsjcXqNf45XykuWSuNgjVSM8JrMrnT7E5em9ncim6nWmLwKPcDAZe2FTWPf9vbUmXW8QvobtsVf8wIDluGQIjFKmRdx5eIgJNwQTvHNHolNm0/fIM2a/SV5LfpX2AKyivL6lm/RynW0fAZ/IGiPI12kDppW3zB3QKgx4AYMfII2Df4I/1D8V++/kn+LN2zC1anuGDjYa0BlYowxFPyYEUCL7Nt5EUQoHgQ7FvfN2Lk4FTYy09fM7EwLg00iZvryUkjTnohbQP1w==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>
- Delivery-date: Thu, 17 Jul 2025 06:45:00 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHb9WtGauJBpc3EJkaPoqdZvIhy9LQ12xQAgAAGcYA=
- Thread-topic: [XEN PATCH v5] misra: address violation of MISRA C Rule 10.1
Hi,
> On 17 Jul 2025, at 08:20, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 15.07.2025 11:31, Dmytro Prokopchuk1 wrote:
>> Rule 10.1: Operands shall not be of an
>> inappropriate essential type
>>
>> The following are non-compliant:
>> - boolean used as a numeric value.
>>
>> The result of the '__isleap' macro is a boolean.
>> Suppress analyser tool finding.
>>
>> The result of 'NOW() > timeout' is a boolean,
>> which is compared to a numeric value. Fix this.
>> Regression was introdiced by commit:
>> be7f047e08 (xen/arm: smmuv3: Replace linux functions with xen functions.)
>>
>> Remove pointless cast '(const unsigned short int *)'.
>> The source array and the destination pointer are both of the same type.
>>
>> Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx>
>
> I assume you put this in implicitly ...
>
>> ---
>> docs/misra/safe.json | 8 ++++++++
>> xen/common/time.c | 3 ++-
>> xen/drivers/passthrough/arm/smmu-v3.c | 2 +-
>> 3 files changed, 11 insertions(+), 2 deletions(-)
>
> ... acking the Arm part? Except that it would have been Bertrand or Rahul
> to ack this?
This was definitely not meant to be like this in the code so the fix is right:
For the SMMU part:
Acked-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
Cheers
Bertrand
>
> Jan
|