From: Thomas Gleixner <t...@linutronix.de>

Instead of open coding, provide a helper function to copy the shared
irte fields.

Signed-off-by: Thomas Gleixner <t...@linutronix.de>
---
 include/linux/dmar.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 0dbcabc..e9bc929 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -249,6 +249,18 @@ struct irte {
        };
 };
 
+static inline void dmar_copy_shared_irte(struct irte *dst, struct irte *src)
+{
+       dst->present    = src->present;
+       dst->fpd        = src->fpd;
+       dst->avail      = src->avail;
+       dst->pst        = src->pst;
+       dst->vector     = src->vector;
+       dst->sid        = src->sid;
+       dst->sq         = src->sq;
+       dst->svt        = src->svt;
+}
+
 #define PDA_LOW_BIT    26
 #define PDA_HIGH_BIT   32
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to