Skip to contentSkip to conversation

rtw88: Fix an error message

PATCH In review Dan Carpenter 2 participants 4 messages Aug 14, 2019 – Oct 9, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtw88: Fix an error message

The WARN_ON() macro takes a condition, not a warning message. I've changed this to use WARN() instead.

Fixes 4136214f7c46 ("rtw88: add BT co-existence support")
---
 drivers/net/wireless/realtek/rtw88/coex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/coex.c +1 -1
index 4577fceddc5e..13701ec40302 100644
@@ -1059,7 +1059,7 @@ static void rtw_coex_set_ant_path(struct rtw_dev *rtwdev, bool force, u8 phase)
 		pos_type = COEX_SWITCH_TO_WLG_BT;
 		break;
 	default:
-		WARN_ON("unknown phase when setting antenna path\n");
+		WARN(1, "unknown phase when setting antenna path\n");
 		return;
 	}
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 5 lines · Dan Carpenter

The WARN_ON() macro takes a condition, not a warning message. I've changed this to use WARN() instead.

Fixes 4136214f7c46 ("rtw88: add BT co-existence support")

Patch applied to wireless-drivers-next.git, thanks.

52929cad3293 rtw88: Fix an error message

Signature · 3 lines
https://patchwork.kernel.org/patch/11093733/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw

PATCH 1/1 rtw88: Fix an error message

In reply to Dan Carpenter

The WARN_ON() macro doesn't take an error message, the argument is a condition so this won't display the warning message.

Fixes 27e117e4b01b ("rtw88: add deep power save support")
---
 drivers/net/wireless/realtek/rtw88/ps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/ps.c +1 -1
index 83db6cf6a219..228309b411ec 100644
@@ -108,7 +108,7 @@ void rtw_power_mode_change(struct rtw_dev *rtwdev, bool enter)
 		 * read/write. It should be treated as fatal error and
 		 * requires an entire analysis about the firmware/hardware
 		 */
-		WARN_ON("Hardware power state locked\n");
+		WARN(1, "Hardware power state locked\n");
 	}
 }
 EXPORT_SYMBOL(rtw_power_mode_change);
Signature · 1 line
2.20.1
#3 lore raw
Quoted 5 lines · Dan Carpenter

The WARN_ON() macro doesn't take an error message, the argument is a condition so this won't display the warning message.

Fixes 27e117e4b01b ("rtw88: add deep power save support")

Patch applied to wireless-drivers-next.git, thanks.

be10b09b278f rtw88: Fix an error message

Signature · 3 lines
https://patchwork.kernel.org/patch/11176989/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches