@@ -43,13 +43,12 @@ ionic_pci_setup(struct ionic_adapter *adapter)
/* BAR0: dev_cmd and interrupts */
if (num_bars < 1) {
- IONIC_PRINT(ERR, "No bars found, aborting\n");
+ IONIC_PRINT(ERR, "No bars found, aborting");
return -EFAULT;
}
if (bar->len < IONIC_BAR0_SIZE) {
- IONIC_PRINT(ERR,
- "Resource bar size %lu too small, aborting\n",
+ IONIC_PRINT(ERR, "Resource bar size %lu too small, aborting",
bar->len);
return -EFAULT;
}
@@ -84,7 +83,7 @@ ionic_pci_setup(struct ionic_adapter *adapter)
/* BAR1: doorbells */
bar++;
if (num_bars < IONIC_BARS_MIN) {
- IONIC_PRINT(ERR, "Doorbell bar missing, aborting\n");
+ IONIC_PRINT(ERR, "Doorbell bar missing, aborting");
return -EFAULT;
}
@@ -990,13 +990,13 @@ ionic_lif_queue_identify(struct ionic_lif *lif)
qtype, ionic_qtype_vers[qtype]);
err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
if (err == -EINVAL) {
- IONIC_PRINT(ERR, "qtype %d not supported\n", qtype);
+ IONIC_PRINT(ERR, "qtype %d not supported", qtype);
continue;
} else if (err == -EIO) {
- IONIC_PRINT(ERR, "q_ident failed, older FW\n");
+ IONIC_PRINT(ERR, "q_ident failed, older FW");
return;
} else if (err) {
- IONIC_PRINT(ERR, "q_ident failed, qtype %d: %d\n",
+ IONIC_PRINT(ERR, "q_ident failed, qtype %d: %d",
qtype, err);
return;
}
@@ -1380,7 +1380,7 @@ ionic_lif_handle_fw_down(struct ionic_lif *lif)
if (lif->state & IONIC_LIF_F_UP) {
IONIC_PRINT(NOTICE,
- "Surprise FW stop, stopping %s\n", lif->name);
+ "Surprise FW stop, stopping %s", lif->name);
ionic_lif_stop(lif);
}
@@ -8,19 +8,11 @@
#include <rte_log.h>
extern int ionic_logtype;
+#define RTE_LOGTYPE_IONIC ionic_logtype
-#define IONIC_PRINT(level, fmt, args...) rte_log(RTE_LOG_ ## level, \
- ionic_logtype, "%s(): " fmt "\n", __func__, ##args)
+#define IONIC_PRINT(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IONIC, "%s(): ", __func__, __VA_ARGS__)
#define IONIC_PRINT_CALL() IONIC_PRINT(DEBUG, " >>")
-#ifndef IONIC_WARN_ON
-#define IONIC_WARN_ON(x) do { \
- int ret = !!(x); \
- if (unlikely(ret)) \
- IONIC_PRINT(WARNING, "WARN_ON: \"" #x "\" at %s:%d\n", \
- __func__, __LINE__); \
-} while (0)
-#endif
-
#endif /* _IONIC_LOGS_H_ */