Hi Sandrine,
we understand from below conversation , apart from bugs / security fixes any other change won't be done to xlat table v1 library code. but we see many MISRA issues getting reported in "Required" category for xlat tables v1 . can these "required/mandatory" category issues be considered in "bug" category and taken up for fixup in upstream ?
Regards Amit
-----Original Message----- From: Sandrine Bailleux via TF-A tf-a@lists.trustedfirmware.org Sent: Thursday, January 18, 2024 8:43 PM To: Nithin G nithing1999@gmail.com; tf-a@lists.trustedfirmware.org Subject: [TF-A] Re: All if...else if constructs shall be terminated with an else statement.
Hi Nithin,
On 1/17/24 11:59, Nithin G via TF-A wrote:
Hi Sandrine,
Thanks for responding.
I will put return "EL1" into an else statement here in this file, but I am getting in the file xlat_tables_common.c also No non-empty terminating "else" statement where I have to add empty else. Below attached the code, please suggest in this situation.
misra_c_2012_rule_15_7_violation: No non-empty terminating "else" statement. if (mm->base_va > (base_va + level_size - 1U)) { /* Next region is after this area. Nothing to map yet */ desc = INVALID_DESC; /* Make sure that the current level allows block descriptors */ } else if (level >= XLAT_BLOCK_LEVEL_MIN) { /* * Try to get attributes of this area. It will fail if * there are partially overlapping regions. On success, * it will return the innermost region's attributes. */ unsigned int attr; unsigned int r = mmap_region_attr(mm, base_va, level_size, &attr); if (r == 0U) { desc = mmap_desc(attr, base_va - mm->base_va + mm->base_pa, level); } }
At the risk of repeating myself, xlat_tables_common.c is part of the version 1 of the translation tables library, which is no longer maintained. Thus, we don't plan to make any change to its code, beyond bug / security fixes.
Regards, Sandrine -- TF-A mailing list -- tf-a@lists.trustedfirmware.org To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.org