From 061b185ff82d11d51c338efdb2cae0b2300db670 Mon Sep 17 00:00:00 2001 From: Tibrella Date: Sat, 27 Jul 2024 12:52:00 +0800 Subject: [PATCH] Linux 6.10 compat: Remove second parameter of __assign_str() In Linux kernel commit 2c92ca849fcc6ee7d0c358e9959abc9f58661aea, the second parameter of __assign_str() was removed. As the instruction says, there is no need to pass the second parameter. But I didn't check if it would break anything to simply remove the second parameter. Signed-off-by: Pinghigh --- include/os/linux/zfs/sys/trace_dbgmsg.h | 2 +- include/os/linux/zfs/sys/trace_dbuf.h | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/include/os/linux/zfs/sys/trace_dbgmsg.h b/include/os/linux/zfs/sys/trace_dbgmsg.h index 19f533baaa..8acc477e51 100644 --- a/include/os/linux/zfs/sys/trace_dbgmsg.h +++ b/include/os/linux/zfs/sys/trace_dbgmsg.h @@ -59,7 +59,7 @@ DECLARE_EVENT_CLASS(zfs_dprintf_class, __string(msg, msg) ), TP_fast_assign( - __assign_str(msg, msg); + __assign_str(msg); ), TP_printk("%s", __get_str(msg)) ); diff --git a/include/os/linux/zfs/sys/trace_dbuf.h b/include/os/linux/zfs/sys/trace_dbuf.h index 0e9cbdd725..c2d5cb465b 100644 --- a/include/os/linux/zfs/sys/trace_dbuf.h +++ b/include/os/linux/zfs/sys/trace_dbuf.h @@ -60,18 +60,13 @@ #define DBUF_TP_FAST_ASSIGN \ if (db != NULL) { \ - if (POINTER_IS_VALID(DB_DNODE(db)->dn_objset)) { \ - __assign_str(os_spa, \ - spa_name(DB_DNODE(db)->dn_objset->os_spa)); \ - } else { \ - __assign_str(os_spa, "NULL"); \ - } \ - \ + __assign_str(os_spa); \ + \ __entry->ds_object = db->db_objset->os_dsl_dataset ? \ db->db_objset->os_dsl_dataset->ds_object : 0; \ \ __entry->db_object = db->db.db_object; \ - __entry->db_level = db->db_level; \ + __entry->db_level = db->db_level; __entry->db_blkid = db->db_blkid; \ __entry->db_offset = db->db.db_offset; \ __entry->db_size = db->db.db_size; \ @@ -80,7 +75,7 @@ snprintf(__get_str(msg), TRACE_DBUF_MSG_MAX, \ DBUF_TP_PRINTK_FMT, DBUF_TP_PRINTK_ARGS); \ } else { \ - __assign_str(os_spa, "NULL"); \ + __assign_str(os_spa); \ __entry->ds_object = 0; \ __entry->db_object = 0; \ __entry->db_level = 0; \