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

[PATCH] x86/vpic: fix vpic_elcr_mask macro parameter usage


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 19 Aug 2020 11:09:51 +0200
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 19 Aug 2020 09:10:32 +0000
  • Ironport-sdr: Rs1wbWERMAFxWEgGt3l4Wdrqz1qXBXowhOGwljDuzUqXoa0yOBI/XDEMP53x+8y26ZRfU3x+ci Go3aKPd7uEPaHMclAet0/J3stL6LYvGpQa1zRp1IUZoRBvzclyLpHc4eQJa7rXMvpEbQc431Md 1DuGwPF+NMCfcLZPnq/hCYuMHUpRIAzgcepz90CjDR7P9g/nJhkvSYGTgilzZ4YVMvMDnKbw5O N+4Bl7Nmx6YTLLdJnlxFJXaRyd9ieH23AjVC/qAzB/Y49AnskcbN6oZw77GxijmBQlD2TgCmgs khk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

vpic_elcr_mask wasn't using the v parameter, and instead worked
because in the context of the callers v would be vpic. Fix this by
correctly using the parameter. While there also remove the unneeded
casts to uint8_t and the ending semicolon.

No functional change intended.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/arch/x86/hvm/vpic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index ea38903d3f..27ad4bef3f 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -41,7 +41,7 @@
 #define vpic_lock(v)   spin_lock(__vpic_lock(v))
 #define vpic_unlock(v) spin_unlock(__vpic_lock(v))
 #define vpic_is_locked(v) spin_is_locked(__vpic_lock(v))
-#define vpic_elcr_mask(v) (vpic->is_master ? (uint8_t)0xf8 : (uint8_t)0xde);
+#define vpic_elcr_mask(v) ((v)->is_master ? 0xf8 : 0xde)
 
 /* Return the highest priority found in mask. Return 8 if none. */
 #define VPIC_PRIO_NONE 8
-- 
2.28.0




 


Rackspace

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