-/* a small macro to shorten up some long lines */This function is called only from one place and with a constant
-#define INTREG I40E_PFINT_DYN_CTLN
+static inline u32 i40e_buildreg_swint(int type)
+{
+ u32 val;
+
+ /* 1. Enable the interrupt
+ * 2. Do not modify any ITR interval
+ * 3. Trigger a SW interrupt specified by type
+ */
+ val = I40E_PFINT_DYN_CTLN_INTENA_MASK |
+ I40E_PFINT_DYN_CTLN_ITR_INDX_MASK | /* set noitr */
+ I40E_PFINT_DYN_CTLN_SWINT_TRIG_MASK |
+ I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK |
+ FIELD_PREP(I40E_PFINT_DYN_CTLN_SW_ITR_INDX_MASK, type);
+
+ return val;
+}
argument. Does it really need to be a function, as opposed to a
constant? Or are you going to add more callers soon?