aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2021-04-22 22:28:43 +0000
committerNavdeep Parhar <np@FreeBSD.org>2021-04-22 22:28:43 +0000
commit8f1bc78ef79bc13d88d15cdc5b1bf2f7361ded6d (patch)
tree3457cbbcbf4b74493402e21733dc58279eb2b64d
parent55eb41bb1fb69429330ea415fb463735ae08da64 (diff)
downloadsrc-8f1bc78ef79bc13d88d15cdc5b1bf2f7361ded6d.tar.gz
src-8f1bc78ef79bc13d88d15cdc5b1bf2f7361ded6d.zip
cxgbe(4): make the logging helpers a little more robust.
MFC after: 3 days Sponsored by: Chelsio Communications
-rw-r--r--sys/dev/cxgbe/osdep.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/cxgbe/osdep.h b/sys/dev/cxgbe/osdep.h
index 95c93d83cff8..3f41ccaf3d2c 100644
--- a/sys/dev/cxgbe/osdep.h
+++ b/sys/dev/cxgbe/osdep.h
@@ -43,13 +43,13 @@
#include <dev/pci/pcireg.h>
#define CH_ERR(adap, fmt, ...) log(LOG_ERR, "%s: " fmt, \
- device_get_nameunit(adap->dev), ##__VA_ARGS__)
+ device_get_nameunit((adap)->dev), ##__VA_ARGS__)
#define CH_WARN(adap, fmt, ...) log(LOG_WARNING, "%s: " fmt, \
- device_get_nameunit(adap->dev), ##__VA_ARGS__)
+ device_get_nameunit((adap)->dev), ##__VA_ARGS__)
#define CH_ALERT(adap, fmt, ...) log(LOG_ALERT, "%s: " fmt, \
- device_get_nameunit(adap->dev), ##__VA_ARGS__)
+ device_get_nameunit((adap)->dev), ##__VA_ARGS__)
#define CH_WARN_RATELIMIT(adap, fmt, ...) log(LOG_WARNING, "%s: " fmt, \
- device_get_nameunit(adap->dev), ##__VA_ARGS__)
+ device_get_nameunit((adap)->dev), ##__VA_ARGS__)
#ifndef LINUX_TYPES_DEFINED
typedef int8_t s8;