[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] x86/PV: drop a local variable from pv_emulate_gate_op()





On 6/2/26 3:52 PM, Jan Beulich wrote:
The inner "rc" shadows the function scope one, thus violating Misra C:2012
rule 5.3 ("An identifier declared in an inner scope shall not hide an
identifier declared in an outer scope"). Drop the inner variable, as
there's no other (later) use of the value it holds.

No difference in generated code.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v3: Use alternative approach.
v2: Re-base.

--- unstable.orig/xen/arch/x86/pv/emul-gate-op.c        2026-06-02 
15:15:17.960392177 +0200
+++ unstable/xen/arch/x86/pv/emul-gate-op.c     2026-06-02 15:40:58.000000000 
+0200
@@ -287,7 +287,6 @@ void pv_emulate_gate_op(struct cpu_user_
      {
          unsigned int ss, esp, *stkp;
          uint32_t value;
-        int rc;
  #define push(item) do \
          { \
              value = (item); \

Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>

Thanks.

~ Oleksii



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.