From patchwork Thu Dec 19 02:34:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 13914393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B64ACE7718C for ; Thu, 19 Dec 2024 02:35:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 404556B008C; Wed, 18 Dec 2024 21:35:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 38CE86B0092; Wed, 18 Dec 2024 21:35:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1DF466B0093; Wed, 18 Dec 2024 21:35:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id F0AA76B008C for ; Wed, 18 Dec 2024 21:35:18 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id ACCEB1A1348 for ; Thu, 19 Dec 2024 02:35:18 +0000 (UTC) X-FDA: 82910140362.03.0C0F76D Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by imf22.hostedemail.com (Postfix) with ESMTP id C6756C0009 for ; Thu, 19 Dec 2024 02:34:42 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=VP+ECQf6; spf=pass (imf22.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.210.181 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734575680; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Zz5f2fkK5TyUEN5/ypHLYKDvnfLQ33CHwDb71kc+wK0=; b=zwd4MUPkcO1kqGcXaIDuNNpTdqRXZFkkP/uoU84uzVUC/nbOVKcLJ9d7FEKL+qSV0bds9T rf+2CN5BJDwcnlemnvOwkNZdZhYtMpu+yrj37hM6WYP9B1v48UCl11sPwlOPdZm66uywiX FTeu+jT+qdi2rphWr9UqoJCXy2zRHIo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734575680; a=rsa-sha256; cv=none; b=oxdcUsG2l+YGpYIdt3n+QhNs5m0czTZePRNsxuM35Lua2aQUdx5+wSyvoQPhtOAqFU/wNb LT/ArFY9ycCK4z8KXzNMJFWnSvciKaYw2zufRpcTVoPUh9YsXOCoyRU3f9YDdFq3NBGc/H WD/AYWyb432AYVPKVmQ8r7U0RY7sKGc= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=VP+ECQf6; spf=pass (imf22.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.210.181 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-725d9f57d90so236197b3a.1 for ; Wed, 18 Dec 2024 18:35:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734575715; x=1735180515; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Zz5f2fkK5TyUEN5/ypHLYKDvnfLQ33CHwDb71kc+wK0=; b=VP+ECQf6TRfthkCTU3tJJrcDFByE59BNr4WqH2i7goC9BC7PjwLV0kYJx9GhblPMlY WysqZUx3Gc9lfbCtYVtBW28t5JtOli21r6m6DiuWfhHg9E5lYSC4Gx3c/PQi9tTzE0yw tPR85QoY9+yJfH+mhjpWTKCzECrG5JAZY0rjhFCoURoR28/Q6PGsQSXJOJWQCNZ6Ujef MhjS0FhT/1Y2AMvI8f8Ctt+OT3Hg52jy4jTjHt9+IjL5yCZTe7uAhhzv888W/svScmJ/ Ds8b6CyaWAnFger6E+1HRZKeDWh6Qf7/JJGLOpvJGUW7F90VTCXbrStUO5vtUVYWzwBL hsCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734575715; x=1735180515; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zz5f2fkK5TyUEN5/ypHLYKDvnfLQ33CHwDb71kc+wK0=; b=fskdbSds2C0P4zat5JumLINtSHiDBIro8hT4d/ukHnS9z8BkoPW4dqZoigOjHrkc/N vyklI4vQUi1aJ3jFf5DJwzhF1hXYMjRIGEI4r60qdsPGH0y+d8XzQfDB4zqqMmA08u5K Kg4PzIIQh5EnQMK6OiGk1dqMADeDIFTFjNBTNi9nskH2FZWo/Qezzf0+FUOxK++6s72l h9htac68kTWkPqBObHnQKGRdW5RYue0peIJQrTdFp6v8UwpX9b5mAt/W3VchAY57g8PQ CM3lBbyPon+Vs6D0oF425wdoYdQ9V+eWdjVl2hqtZm8CHi2jF5y3qmt+igSCj6Y8hrXe mbwA== X-Forwarded-Encrypted: i=1; AJvYcCXiuLmXYWKtF7GPsrEBnaJJQ5hX709hMi6j2nVmz6RgExsDVImpAqWADCT301Vk6lXCuCPMndRtcQ==@kvack.org X-Gm-Message-State: AOJu0Yz3Jy6O9WGW1YoiSgCGcIFnaAd3YHmvGrUZ7v3aImbsbq8Zjgpg wUqxr4vOuyQ0EVMUJdbozQ4wRC8HIQwsl2RxUv+eZkWI1MoygVKf X-Gm-Gg: ASbGncurz0v006V9P3VGqmPt08KAEcO3HDxIUOxsteaf8MIRKZ3mTkI4sTXuN4kx9ZW DyM+pOxk8ZvJra0zuH7h7Gp8VRvqZwdAGi/X4MNOJm/A7cW/Dgmxs8VUv1f9kNvlR0XuKEyz8t6 026rU18FZPaJnh2Ph6IUVC3QtpfwApj07cOWSRq29iXsvFFnl0IXEahVGnDr+vbkEGe80VFsaiv dItAEq+pa7Jy85+xM2ys+pBxBZlvgcliXGyH669QP723WRFmq62ZMisTYM5paPZYVQEtKbjPySK tI9lcjU= X-Google-Smtp-Source: AGHT+IE+5BVERtvEj0uFGUNd3NBBPkGat0lwCNqupmyw0FAX2xvKE0cJmTowKcGod/Hmj9SrgliLyA== X-Received: by 2002:a05:6a20:a11f:b0:1e0:c0fa:e088 with SMTP id adf61e73a8af0-1e5b4810ff0mr7532504637.18.1734575715510; Wed, 18 Dec 2024 18:35:15 -0800 (PST) Received: from localhost.localdomain ([180.159.118.224]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-842b821da83sm142163a12.40.2024.12.18.18.35.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 18 Dec 2024 18:35:15 -0800 (PST) From: Yafang Shao To: akpm@linux-foundation.org Cc: torvalds@linux-foundation.org, pmladek@suse.com, kvalo@kernel.org, bp@alien8.de, andriy.shevchenko@linux.intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, x86@kernel.org, linux-snps-arc@lists.infradead.org, linux-wireless@vger.kernel.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, ocfs2-devel@lists.linux.dev, Yafang Shao , Johannes Berg Subject: [PATCH v2 3/5] net: Remove get_task_comm() and print task comm directly Date: Thu, 19 Dec 2024 10:34:50 +0800 Message-Id: <20241219023452.69907-4-laoar.shao@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20241219023452.69907-1-laoar.shao@gmail.com> References: <20241219023452.69907-1-laoar.shao@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: C6756C0009 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: 3e7inthkx3noiepju9gaw9dk4eh7qw57 X-HE-Tag: 1734575682-713984 X-HE-Meta: U2FsdGVkX18AdVt5qoqXuWIFKkbmWft49lBn6RHd50hGe+WWNUk2wnt35AHBf1OUXg+04ZHI1p+x215lgngh0CWilFz1xZGYFB3HqOhkRHApg2F2InmQm1p6h+qlAXDzXeZfbGaA0LRn0YFtxEK/AwynTCQS9YL/1BBestFitCjbldYMKpYpmXHEOoQa+1GStqauSAJSPcPArfVktjGX9pY1FhxJGvK4EQfF+AJm2RMTEIfuXQs74SgpD8Wt2aNax1vWpgeR04DZ4yjgHgilDuzxJHR0Rs7raXiRWWGsLvU915eaH1NiLC7GWJ1o3B3qcTjMq6xhevLoHODekzbjlrUVv6ZYaWPQJ2vQOs0bcoqltOXoQYLQ/OOHvsp/pR9DF7nGC/3bqnX04wsytsTO/oUBzQItgMHcFZLZM6GG46Nan41C7TEf1uJ64+Lu9bOotY65egPeC5AYOmNwzow1bYpa1wA/lKNdQB1Kega5uUetYuHUyQLBwji7jGJ7JfTs34rGDBkyn6Zx9Km61hNh17M34N+gADUluprkrl1KZbQLWdaBVAJrmdEPUC51W++OtxBdLpYUtpP3+J36zi37S1gHrIlXWM+cx2mG8usoIJ3oeGMdAYSLhCWbDaB1zYmntmAVpVzb0rpl+jLBmvuBxGP4+wwUiDqC4l/8Tk+UGAHRZdldTBQU57UxQ5ibVbmZoVZRFlLrXlw+D9GE1hITPjs6owe8UFRcrDr2RLKCn31wqcwOkTqQF7bRRwAqjiwGKPgsB2tBI3oyXN6MROrvllZedNGHaLX83mdXbOoykxaAtzH9uUNxwtNYvItXdX0nlHNB34+jIgGH+qRlPf/8LNerjixXGWSEFWWt7DQVQ2KC26es1O73pVWjhVaCDMRitalpNsvxrPcJCd0IcCS4FtXxOZbS83Nr+KrBnlWxk3q5Pt7yTNFPsdxajZN3LZH1sxV5zycP8oKXGo+iO+n D7EYdU5H 6jxNoyCoVSuWHGa12BdNZzIprHAxbdGXcQTccoB7iKz6i1gft3mx7DWa19AD0TLjLnSkYvDoKzKjg7eu08+m+nYaLb03U0oIdayslJTn1AoVdfFabdv5Tmx/XTagFjMJ/HEEU5jomGWXsrKYdZ4fyugzkmMF4s2yFKKAidoXsJw5x18X2VYVZGjkQrnpyplFm6ddxtr38kRt6wb3h8ANSwz7zimKuJHlJFb95ZAv9flNFnj4JM7wwv3Psgg+0yQUWqRuJnrXF2FJ3hymg7Bif/fzutgLbJGVcjWz5dwTe0OmHZLPtotxe2mB9vM4TyAdVNavGaqvsu9QErVWsQBWnuHcUqkjR1mAqMKeE1yWmnfupiUaETYc8qkbjWixBr87HQWlkVE8IJ5Oe49oPo0dz7t1YTW1nbzSDcR/7M38UCXJyKYGnrO8QjezB3VbRAUn6//JloX/hkdkqmUWls9Yn5XaOgBZON98+AHJJ+Unf2UrYYDeyehCgl3Cv3iMobjXQIAQQ4t1OrAqYoGjjhXvqI3ubb7fwZnnliAL4gpLZhiz1QQ4k81w3hy1y+rnmrPIjypmcsc+bsApfwGg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.202658, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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. Signed-off-by: Yafang Shao Cc: Johannes Berg --- net/wireless/wext-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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