From: Yafang Shao Date: Thu, 19 Dec 2024 02:34:50 +0000 (+0800) Subject: net: remove get_task_comm() and print task comm directly X-Git-Tag: microblaze-v6.16~79^2~54 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=b619c7ac21853558d08a40a31132950bfecc9383;p=linux-2.6-microblaze.git net: remove get_task_comm() and print task comm directly Since task->comm is guaranteed to be NUL-terminated, we can print it directly without the need to copy it into a separate buffer. This simplifies the code and avoids unnecessary operations. Link: https://lkml.kernel.org/r/20241219023452.69907-4-laoar.shao@gmail.com Signed-off-by: Yafang Shao Cc: Johannes Berg Cc: "André Almeida" Cc: Andy Shevchenko Cc: Borislav Petkov (AMD) Cc: Danilo Krummrich Cc: Darren Hart Cc: Dave Hansen Cc: David Airlie Cc: Davidlohr Bueso Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Morris Cc: Jani Nikula Cc: Jiri Slaby Cc: Joonas Lahtinen Cc: Kalle Valo Cc: Karol Herbst Cc: Kees Cook Cc: Linus Torvalds Cc: Lyude Paul Cc: Oded Gabbay Cc: Paul Moore Cc: Peter Zijlstra Cc: Petr Mladek Cc: Rodrigo Vivi Cc: "Serge E. Hallyn" Cc: Simona Vetter Cc: Thomas Gleixner Cc: Tvrtko Ursulin Cc: Vineet Gupta Signed-off-by: Andrew Morton --- diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index 3bb04b05c5ce..bea70eb6f034 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c @@ -640,10 +640,8 @@ EXPORT_SYMBOL(wireless_send_event); #ifdef CONFIG_CFG80211_WEXT static void wireless_warn_cfg80211_wext(void) { - char name[sizeof(current->comm)]; - pr_warn_once("warning: `%s' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211\n", - get_task_comm(name, current)); + current->comm); } #endif