From 5dee537e7d9fb13df5d5c0f25888ac49c316ecf2 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Tue, 15 Oct 2019 09:43:43 -0600 Subject: [PATCH] net: cnss2: Don't check for NULL before ipc_log_string() The ipc_log_string() function quietly checks for a NULL context so an explicit check is not needed. Change-Id: Ic0dedbadf05d153614e1c6a2d3c6f0a536310707 Signed-off-by: Jordan Crouse --- drivers/net/wireless/cnss2/debug.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/cnss2/debug.h b/drivers/net/wireless/cnss2/debug.h index 1d7b488d2963..9a41a5da5739 100644 --- a/drivers/net/wireless/cnss2/debug.h +++ b/drivers/net/wireless/cnss2/debug.h @@ -12,15 +12,11 @@ extern void *cnss_ipc_log_context; extern void *cnss_ipc_log_long_context; -#define cnss_ipc_log_string(_x...) do { \ - if (cnss_ipc_log_context) \ - ipc_log_string(cnss_ipc_log_context, _x); \ - } while (0) +#define cnss_ipc_log_string(_x...) \ + ipc_log_string(cnss_ipc_log_context, _x) -#define cnss_ipc_log_long_string(_x...) do { \ - if (cnss_ipc_log_long_context) \ - ipc_log_string(cnss_ipc_log_long_context, _x); \ - } while (0) +#define cnss_ipc_log_long_string(_x...) \ + ipc_log_string(cnss_ipc_log_long_context, _x) #define cnss_pr_err(_fmt, ...) do { \ printk("%scnss: " _fmt, KERN_ERR, ##__VA_ARGS__); \