#define iavf_allocate_virt_mem(h, m, s) iavf_allocate_virt_mem_d(h, m, s)
 #define iavf_free_virt_mem(h, m) iavf_free_virt_mem_d(h, m)
 
-#define iavf_debug(h, m, s, ...)  iavf_debug_d(h, m, s, ##__VA_ARGS__)
-extern void iavf_debug_d(void *hw, u32 mask, char *fmt_str, ...)
-       __printf(3, 4);
+#define iavf_debug(h, m, s, ...)                               \
+do {                                                           \
+       if (((m) & (h)->debug_mask))                            \
+               pr_info("iavf %02x:%02x.%x " s,                 \
+                       (h)->bus.bus_id, (h)->bus.device,       \
+                       (h)->bus.func, ##__VA_ARGS__);          \
+} while (0)
 
 #endif /* _IAVF_OSDEP_H_ */