Commit a834cd0c authored by Johannes Berg's avatar Johannes Berg
Browse files

wifi: iwlwifi: allow IWL_FW_CHECK() with just a string



We require a message, but the macros shouldn't require a
formatted message, a constant one can be fine. Change the
macros to support that.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241008072037.96e8554cb7a2.I0e06d8fd49f86bd4e9e216fc2265c43d7e78a095@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent ab1eab76
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -331,15 +331,15 @@ bool iwl_fwrt_read_err_table(struct iwl_trans *trans, u32 base, u32 *err_id);
void iwl_fw_disable_dbg_asserts(struct iwl_fw_runtime *fwrt);
void iwl_fw_dbg_clear_monitor_buf(struct iwl_fw_runtime *fwrt);

#define IWL_FW_CHECK_FAILED(_obj, _fmt, ...)				\
	IWL_ERR_LIMIT(_obj, _fmt, __VA_ARGS__)
#define IWL_FW_CHECK_FAILED(_obj, ...)					\
	IWL_ERR_LIMIT(_obj, __VA_ARGS__)

#define IWL_FW_CHECK(_obj, _cond, _fmt, ...)				\
	({								\
		bool __cond = (_cond);					\
									\
		if (unlikely(__cond))					\
			IWL_FW_CHECK_FAILED(_obj, _fmt, __VA_ARGS__);	\
			IWL_FW_CHECK_FAILED(_obj, _fmt, ##__VA_ARGS__);	\
									\
		unlikely(__cond);					\
	})