|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] xen: address violations of MISRA C:2012 Rule 11.8.
On 01/12/2023 13:42, Simone Ballarin wrote: On 01/12/23 12:48, Julien Grall wrote:Hi Simone, On 01/12/2023 11:37, Simone Ballarin wrote:From: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx> Remove or amend casts to comply with Rule 11.8. The violations are resolved either by adding missing const qualifiers in casts or by removing unnecessary cast. Change type of operands from char* to uintptr_t: uintptr_t is the appropriate type for memory address operations. No functional change. --- Changes in v2: - arm/regs.h: add const qualifier to the first operand, change types of both operands from char* to uintptr_t. - x86/regs.h: add const qualifier to both operands. Change types of both operands from char* to uintptr_t to conform with the arm version. - dom0less-build.c: rebase change in the new file.Signed-off-by: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx>Signed-off-by: Simone Ballarin <simone.ballarin@xxxxxxxxxxx> --- xen/arch/arm/dom0less-build.c | 2 +- xen/arch/arm/include/asm/atomic.h | 2 +- xen/arch/arm/include/asm/regs.h | 2 +- xen/arch/x86/include/asm/regs.h | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-)diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.cindex d39cbd969a..fb63ec6fd1 100644 --- a/xen/arch/arm/dom0less-build.c +++ b/xen/arch/arm/dom0less-build.c@@ -354,7 +354,7 @@ static int __init handle_passthrough_prop(struct kernel_info *kinfo, I am confused. In the case of 'r' the const applied to the pointee not the pointer (e.g. the pointer can be modified but not the content). So the 'const' should not be necessary even for the second parameter. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |