Message ID | dbc0e965cd9f93848d27e7ebf0ffcfca05499d58.1697207038.git.federico.serafini@bugseng.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm: address some violations of MISRA C:2012 Rule 8.2 | expand |
On Fri, 13 Oct 2023, Federico Serafini wrote: > Add missing parameter name, no functional change. > > Signed-off-by: Federico Serafini <federico.serafini@bugseng.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Hi, On 13/10/2023 16:24, Federico Serafini wrote: > Add missing parameter name, no functional change. > > Signed-off-by: Federico Serafini <federico.serafini@bugseng.com> > --- > xen/arch/arm/traps.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c > index ce89f16404..5aa14d4707 100644 > --- a/xen/arch/arm/traps.c > +++ b/xen/arch/arm/traps.c > @@ -1236,7 +1236,7 @@ int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc) > > if ( id == BUGFRAME_run_fn ) > { > - void (*fn)(const struct cpu_user_regs *) = (void *)regs->BUG_FN_REG; > + void (*fn)(const struct cpu_user_regs *regs) = (void *)regs->BUG_FN_REG; Now the line will be over 80 characters. I think we should introduce a typedef. This would also help in the longer run to validate that the function passed to run_in_exception_handle() has the expected prototype. Cheers,
Hi Stefano, On 16/10/2023 10:02, Julien Grall wrote: > Hi, > > On 13/10/2023 16:24, Federico Serafini wrote: >> Add missing parameter name, no functional change. >> >> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com> >> --- >> xen/arch/arm/traps.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c >> index ce89f16404..5aa14d4707 100644 >> --- a/xen/arch/arm/traps.c >> +++ b/xen/arch/arm/traps.c >> @@ -1236,7 +1236,7 @@ int do_bug_frame(const struct cpu_user_regs >> *regs, vaddr_t pc) >> if ( id == BUGFRAME_run_fn ) >> { >> - void (*fn)(const struct cpu_user_regs *) = (void >> *)regs->BUG_FN_REG; >> + void (*fn)(const struct cpu_user_regs *regs) = (void >> *)regs->BUG_FN_REG; > > Now the line will be over 80 characters. I think we should introduce a > typedef. This would also help in the longer run to validate that the > function passed to run_in_exception_handle() has the expected prototype. I see this patch was committed in your for-4.19 branch. But this comment was unaddressed. Can you drop the patch because your branch is committed in staging? Cheers,
On Tue, 7 Nov 2023, Julien Grall wrote: > Hi Stefano, > > On 16/10/2023 10:02, Julien Grall wrote: > > Hi, > > > > On 13/10/2023 16:24, Federico Serafini wrote: > > > Add missing parameter name, no functional change. > > > > > > Signed-off-by: Federico Serafini <federico.serafini@bugseng.com> > > > --- > > > xen/arch/arm/traps.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c > > > index ce89f16404..5aa14d4707 100644 > > > --- a/xen/arch/arm/traps.c > > > +++ b/xen/arch/arm/traps.c > > > @@ -1236,7 +1236,7 @@ int do_bug_frame(const struct cpu_user_regs *regs, > > > vaddr_t pc) > > > if ( id == BUGFRAME_run_fn ) > > > { > > > - void (*fn)(const struct cpu_user_regs *) = (void > > > *)regs->BUG_FN_REG; > > > + void (*fn)(const struct cpu_user_regs *regs) = (void > > > *)regs->BUG_FN_REG; > > > > Now the line will be over 80 characters. I think we should introduce a > > typedef. This would also help in the longer run to validate that the > > function passed to run_in_exception_handle() has the expected prototype. > > I see this patch was committed in your for-4.19 branch. But this comment was > unaddressed. Can you drop the patch because your branch is committed in > staging? I dropped the patch. Federico, please address Julien's feedback.
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index ce89f16404..5aa14d4707 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1236,7 +1236,7 @@ int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc) if ( id == BUGFRAME_run_fn ) { - void (*fn)(const struct cpu_user_regs *) = (void *)regs->BUG_FN_REG; + void (*fn)(const struct cpu_user_regs *regs) = (void *)regs->BUG_FN_REG; fn(regs); return 0;
Add missing parameter name, no functional change. Signed-off-by: Federico Serafini <federico.serafini@bugseng.com> --- xen/arch/arm/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)