Re: [XEN PATCH 07/10] arm/traps: address a violation of MISRA C:2012 Rule 8.2

2023-11-07 Thread Stefano Stabellini
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 
> > > ---
> > >   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.

Re: [XEN PATCH 07/10] arm/traps: address a violation of MISRA C:2012 Rule 8.2

2023-11-07 Thread Julien Grall

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 
---
  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,

--
Julien Grall



Re: [XEN PATCH 07/10] arm/traps: address a violation of MISRA C:2012 Rule 8.2

2023-10-16 Thread Julien Grall

Hi,

On 13/10/2023 16:24, Federico Serafini wrote:

Add missing parameter name, no functional change.

Signed-off-by: Federico Serafini 
---
  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,

--
Julien Grall



Re: [XEN PATCH 07/10] arm/traps: address a violation of MISRA C:2012 Rule 8.2

2023-10-13 Thread Stefano Stabellini
On Fri, 13 Oct 2023, Federico Serafini wrote:
> Add missing parameter name, no functional change.
> 
> Signed-off-by: Federico Serafini 

Reviewed-by: Stefano Stabellini 



[XEN PATCH 07/10] arm/traps: address a violation of MISRA C:2012 Rule 8.2

2023-10-13 Thread Federico Serafini
Add missing parameter name, no functional change.

Signed-off-by: Federico Serafini 
---
 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;
 
 fn(regs);
 return 0;
-- 
2.34.1