From patchwork Thu Dec 19 02:34:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 13914390 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 0FC33E77188 for ; Thu, 19 Dec 2024 02:35:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9A91F6B0082; Wed, 18 Dec 2024 21:35:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9317A6B0083; Wed, 18 Dec 2024 21:35:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7AB6F6B0085; Wed, 18 Dec 2024 21:35:04 -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 5B0166B0082 for ; Wed, 18 Dec 2024 21:35:04 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0B97A81354 for ; Thu, 19 Dec 2024 02:35:04 +0000 (UTC) X-FDA: 82910140068.07.FCF87B6 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by imf22.hostedemail.com (Postfix) with ESMTP id 298ACC0004 for ; Thu, 19 Dec 2024 02:34:27 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=BfZEk5Be; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf22.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734575686; a=rsa-sha256; cv=none; b=scp6FU7AX9Sjy5rtpHn9T19gAEvNU6Sll/T1R9cpj3LWd20dKlDdvTvDsE27NWPfeyG7f+ gRryfUfStJ/mHKAZxdPOieR/aCyo0GNEEidAnavkWMVWTt6jFGOdse1OVoLiD+dtvaT4fI u7w+gmbExgRQ3NV+IZxfGr3CH4mBrjE= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=BfZEk5Be; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf22.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734575686; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=ewYmRGbtjw/u5CZQB/fGCIYq/IkhzVppRPs0v4hq1mw=; b=3aUlSAWG8h2bt1wgcJU6czqMgVj47AvcdaC9u+P7QH/oV3pO0KHYzkIbvjd9NbDgdL8GHQ gpKctSzy/k0OOQi3dCsuS7bjD1YWLxlX79O8cDLmCVsCrpDn5a8hfvYsZTHs2Fk9rG/DBM zVcog213c+BqvBz0MxTblo2wNK5KZz4= Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-725ee27e905so403067b3a.2 for ; Wed, 18 Dec 2024 18:35:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734575701; x=1735180501; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ewYmRGbtjw/u5CZQB/fGCIYq/IkhzVppRPs0v4hq1mw=; b=BfZEk5BeGzO7ug5+PoFK6q/JCUme/hzQytoW5zLXGdYlBQJv8lqV8hgB7jX2JVCw2p 4wxcCZei24uWvVyCb4rGG0+vZ4lRBMbe85Jl7fVecwUpy9AtT1NpxV3rtAwiB5nBdruH 1p/W9M/Msh5K9/wPj3Z3KVBNb/d1gx9K0zOfuEmcxxN+3iM8zdpoCZb0vF0YwYeqqYzA kLUIPH/BD4vAtVXpC+BbAgIowxYmfrkEuCoDFSN58+QRHMOJ7MUeywm7alsH6WeigXoi IKii6CgoBJHDB3E0FeJ/dfrpSKOH70O8cvxKNQ/RRE1AJVPhDP8VPkAAfisIAkDw9Ax4 wKnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734575701; x=1735180501; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ewYmRGbtjw/u5CZQB/fGCIYq/IkhzVppRPs0v4hq1mw=; b=G1u9OzHnZe3vER/rxVISaL0WUSsj4r86mewRX6+dmn9YVe1XtGC6DMz3BkDUuWIXCv fUHsd69N5NDQN7WNdFFNn3AUmgS1+bZqsITnWX20WFZk9/2n3099wlagO7svmybKT3xc Y6lDWRsBzvD/y0fSCMl/itfSN/al9RjqmXqvQT2+JKVJRFeX/Huz8VO2AYHukx8/ia/A LV4Fb7J7UGTLp29yOhByaAXGhv4L/MXt0lLx8llDZ9bKxk5YkOtloodowF2DXFnBV/NQ Uw1ecQBr0+wFn+dlAa6zVsphVFJv/kFLz4+gBBYgv8Oq+MYyrivj/OwYSl64cepN1EIC V+xQ== X-Forwarded-Encrypted: i=1; AJvYcCVS3mLOzBOVfX7RJg7rqD5tOWtQJOWR/WtZmoByuYeU3o5YX+6XmA0fv7TzdFGSDSU+Blw5hrk74w==@kvack.org X-Gm-Message-State: AOJu0Yw9xNa7UpkKak8UmnjO9iQkc7nrcRNstmSeHZ/4sLJ5Pqu5zsQs Gg87XRE0T2XlX4U/JclUYPL3Iq7UM/TpzfpIhtNtv6mZ7zzDjZ4Q X-Gm-Gg: ASbGnctP3eVDX5F3mrMFXenn999FaLqG55PziRNU1KQKAlHhavS2doRSCI8foqBbU9y oudG3RZp+gVKI5MNF2aCH+cfcPtD+jf0C1towXZlzzr5DwwnLQgOljySdTxrqBDHnP9M/XV3bXm KXNOoaSqnl9eiZOieA/jIoKaqaIIv3iRYk7edmLrtsgasSzJaNLVUsUNsKBU+xV39iv/mp5bb0C fH7Ay7tEKQo3ne3juru1uCp/fd3FOjWw4T+O95Pvl85HpQwvrf9MDpddjHSqd5owv9/rkK3TDBW odJTdMI= X-Google-Smtp-Source: AGHT+IGkt8eWE3wh1dURnDDolV6IzXf9MexDfJ0kaeAEgc6DDmy7cFDTyCLLAMMKibF6E7v5iDX6cg== X-Received: by 2002:aa7:9316:0:b0:724:ed8f:4d35 with SMTP id d2e1a72fcca58-72a8d2e0557mr8641134b3a.26.1734575700792; Wed, 18 Dec 2024 18:35:00 -0800 (PST) Received: from localhost.localdomain ([180.159.118.224]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-842b821da83sm142163a12.40.2024.12.18.18.34.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 18 Dec 2024 18:35:00 -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 Subject: [PATCH v2 0/5] Remove get_task_comm() and print task comm directly Date: Thu, 19 Dec 2024 10:34:47 +0800 Message-Id: <20241219023452.69907-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) M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L5cvwdDfVjlZHpjwpnvCFcgtXXbIC+v5Qjy0I /QihCfaS oEFdH7MLGGkuKO2GAH+3ecWQ5skdiALiekEvywevEJl3kXbp74sQJp1GbQVZYQsx/NuUkf7rij+oG+K8jwMs7REojye7BF9BkHGXnTOVx9Twh0/yPzzJQnvzXPoHoulJHGfSwr0ktzO61qNQK9GEaGyryZMnysox2IK2BjdXaGhGmL5je48bt+VwHuwvVXBn/ld6qvY38w1DHv4efSeQlQc2/p7BlESMyJPDrLvhfpI1/R4loG+tp/zZYLhfN5u2FYxz9cn44aLs3FW7M1cFF1wcMrq6/mIx9Ia0lBVQE2emRCl1UcAOd7W4j1DiXdqwoDrdZrJ35tuRN5h0RDEK4kgEwtqWt+NfOZmO5/Rbz66XhFRlIj9sYhjR0GtWhGXCV10MiC0cOW1B78sCtWPaKwTv7Od6q2VDNmTuiF7f1DbmL8AlJ8vtJ+opYcl6rxrDQYe6PhgD8XcEGUcN8QXexNlUCZb659I9MLoeOzd26f3qVjgNntXNz+2gAfQVZj1KTMVGGg5qwjSu2rJIlm3AMg4djXK7dLohqSb1x2FdQs5f1abSCdsjO39ljRQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.323300, 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. v1->v2: - Don't add "%pTN" (Petr, Kalle, Borislav, Andy, Linus) v1: https://lore.kernel.org/all/20241213054610.55843-1-laoar.shao@gmail.com/ Yafang Shao (5): kernel: Remove get_task_comm() and print task comm directly arch: Remove get_task_comm() and print task comm directly net: Remove get_task_comm() and print task comm directly security: Remove get_task_comm() and print task comm directly drivers: Remove get_task_comm() and print task comm directly arch/arc/kernel/unaligned.c | 5 ++--- arch/x86/kernel/vm86_32.c | 5 ++--- drivers/accel/habanalabs/common/context.c | 3 +-- drivers/accel/habanalabs/common/habanalabs_ioctl.c | 11 +++-------- drivers/gpu/drm/i915/display/intel_display_driver.c | 6 ++---- drivers/gpu/drm/nouveau/nouveau_chan.c | 4 +--- drivers/gpu/drm/nouveau/nouveau_drm.c | 5 ++--- drivers/tty/tty_io.c | 3 +-- kernel/capability.c | 8 ++------ kernel/futex/waitwake.c | 3 +-- net/wireless/wext-core.c | 4 +--- security/yama/yama_lsm.c | 4 +--- 12 files changed, 19 insertions(+), 42 deletions(-)