summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Böhmwalder <christoph.boehmwalder@linbit.com>2022-12-01 14:03:46 +0300
committerJens Axboe <axboe@kernel.dk>2022-12-01 21:33:49 +0300
commitc3f8974198b41965c8f62099ba97f1293561cab2 (patch)
tree56cd2321c1257d102d8339d3dfd7065ac96ce785
parent2e833c8c8c42a3b6e22d6b3a9d2d18e425551261 (diff)
downloadlinux-c3f8974198b41965c8f62099ba97f1293561cab2.tar.xz
drbd: unify how failed assertions are logged
Unify how failed assertions from D_ASSERT() and expect() are logged. Originally-from: Andreas Gruenbacher <agruen@linbit.com> Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> Link: https://lore.kernel.org/r/20221201110349.1282687-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/block/drbd/drbd_int.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index e29bd10ac52f..ea92df778c66 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -122,9 +122,11 @@ void drbd_printk_with_wrong_object_type(void);
#define dynamic_drbd_dbg(device, fmt, args...) \
dynamic_dev_dbg(disk_to_dev(device->vdisk), fmt, ## args)
-#define D_ASSERT(device, exp) do { \
- if (!(exp)) \
- drbd_err(device, "ASSERT( " #exp " ) in %s:%d\n", __FILE__, __LINE__); \
+#define D_ASSERT(x, exp) \
+ do { \
+ if (!(exp)) \
+ drbd_err(x, "ASSERTION %s FAILED in %s\n", \
+ #exp, __func__); \
} while (0)
/**