From patchwork Mon Jan 30 20:49:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 13121814 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 81FE3C636CD for ; Mon, 30 Jan 2023 20:49:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E60B16B0073; Mon, 30 Jan 2023 15:49:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E10176B0075; Mon, 30 Jan 2023 15:49:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C62576B0081; Mon, 30 Jan 2023 15:49:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id A0BE16B0073 for ; Mon, 30 Jan 2023 15:49:51 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5C9591209DA for ; Mon, 30 Jan 2023 20:49:51 +0000 (UTC) X-FDA: 80412656982.20.DE54555 Received: from out-143.mta1.migadu.com (out-143.mta1.migadu.com [95.215.58.143]) by imf01.hostedemail.com (Postfix) with ESMTP id A095A40021 for ; Mon, 30 Jan 2023 20:49:49 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=SpOJ60TV; spf=pass (imf01.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.143 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675111789; 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=l0DgDHv6v1bes9QPJYpLqp7kkvT0kapBOv6TW2IBB/k=; b=oz+gtbzDzmE0oQFf9UFqYfSWwS7cjB1qHuXCYYSLD8RrnSYG0LmGFvcJMqI1eDKwqVhp/7 LYePC+un80gL3nQd8kSYXEPtKRMhGI5J/+lp46W26QwuxDvAtkl5AwThpwaI1Rw1e9Xaos vUYODdIgFKbazRIdmfGn3KV3e5Y5tho= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=SpOJ60TV; spf=pass (imf01.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.143 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675111789; a=rsa-sha256; cv=none; b=KW3lsjrvOKt6JtG7ah2Hv3FnRDnEN/bm+O2k2qeRIN3pq5CSCOab/7i+CILZmn9/iOzkAa ZlIhLK0InIrgZGnpstBY7S2tR0Rp+7hNiWYI5svL21O6P0AVtLJlhK/x/I87rk0DT7cbld yxnPdvrrNPPQiG1T4qWXBj1750xTeJs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1675111788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l0DgDHv6v1bes9QPJYpLqp7kkvT0kapBOv6TW2IBB/k=; b=SpOJ60TVzVtNFGeOaSWoGCVnRntGXp1f0lNFPUS22mPwdXy3FThUKBl7SnU05auY2/luej U9SfMepHYn2N9o3X7GDdHcULipCyR7H9ZY2KmHg7SPMUng4KqZBLC+Iovl8L0HP2Tv7Ojv sy1806UWb20v/N9S8fxWCNto4gVc1H8= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH 03/18] lib/stackdepot: use pr_fmt to define message format Date: Mon, 30 Jan 2023 21:49:27 +0100 Message-Id: <3600069e0b0b3df602999ec8a2d4fc14fcc56a01.1675111415.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A095A40021 X-Stat-Signature: 7wqfbdk7hs3we4kmzgzwaffhrjbt5k3i X-Rspam-User: X-HE-Tag: 1675111789-28114 X-HE-Meta: U2FsdGVkX1+1uNr9qa+75lrw285Hh1xDhSIoVUtL7cU/ddqJQQ5bsP+183SroDJobTMSCIfj5+P2tY/u6lByPcQS/KnRFDW9McL73EOpGub4mbwCrEgMUsJ7iyn+V9uEJCWvRjjkyUsvFNcsvhrd3uO3SzWfgrZ0x7ka/+QKNXNiXSmQmc+NSxMFvMptnYVHJ5UIhFUJF1hEN9Z5fKMsLSrKhG+yF+heR/T0cqezjV1xzaEr2BOfP9Ldd3aF7SPC9ClxZ1LrJS3Pq4UXjvTsHkCPQEUuDNULJ8yljFjwp1uYImX3fuLTqUZEcosIZQ7QturlqW8loSj4+Llil+YoHeFo+cBmg5aNtnLftAofxILYRA6UeRWQFnVfG7u0rCXxYUYalqEtoufnkmTMn/11FhutjYGtUvhLcqIeMRiot7yLznBxwsqVgUkOQQDz5762izbzq3Dzf78hqQlRQn2/HS1rrnV/A5BXozKsXpW+NS+l3MMDSUzK74dEf1dDQBfSs2EZwnIWcSxs/CMCkZkkSs01G7fGf6vxPsfQUzM7p/OFfAifdq5dSL7mVC9hzUNgaK6Ga8Qmq5RIQ9eBT2Ljui+TRYFh5SMLV3vGqFNVbU41JlRmGZKhMgo6xHLu5gRezumWuvOpq0GdKytzlRpE2d99LUvIfRhQ97n65pana4NCVFiNvveG31irDPvqchCp2ddsaXcaOKZrrdBvCAw0QKnttq34DBQnFuFOa4G57ASJCfoo463ybNtq5vtgdxC0MOACrO4pJCCGaqn7/LJAVpdthos7cQPQvY4okszqILozn0dR0ZfEh7L9B7F1Wdd7sy0ihBRhtxItzffoFzJwMF0/Rz8i4xdE2dOMUn41BYTlUp8W0ulD5dQB2ED1xCkpc6ENpWXWp61UPHsb80pXWAy/C+PR7eT7uXDmlo01woCRhRFSI7ViomsozZMoFM52JaLCnzQc+oQlmXBsZ2l CsKIRbJV yF5SzZMEzjgh8NW083z5QjVJ7V9MreZ3Z+Ezi/37lf/mTbilo2LJ0olFG+60zxJKnV+YEIwuBflrpyrTjcvbLnkJxUwIE9OMjegu+xcPp50D2IprMp3jl1+F7MqcqCl3xCVGlooJsMlJM28nkI1i6n+M/jQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrey Konovalov Use pr_fmt to define the format for printing stack depot messages instead of duplicating the "Stack Depot" prefix in each message. Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko --- lib/stackdepot.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index 23d2a68a587b..90c4dd48d75e 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -19,6 +19,8 @@ * Based on code by Dmitry Chernenkov. */ +#define pr_fmt(fmt) "stackdepot: " fmt + #include #include #include @@ -98,7 +100,7 @@ static int __init is_stack_depot_disabled(char *str) ret = kstrtobool(str, &stack_depot_disable); if (!ret && stack_depot_disable) { - pr_info("Stack Depot is disabled\n"); + pr_info("disabled\n"); stack_table = NULL; } return 0; @@ -142,7 +144,7 @@ int __init stack_depot_early_init(void) 1UL << STACK_HASH_ORDER_MAX); if (!stack_table) { - pr_err("Stack Depot hash table allocation failed, disabling\n"); + pr_err("hash table allocation failed, disabling\n"); stack_depot_disable = true; return -ENOMEM; } @@ -177,11 +179,11 @@ int stack_depot_init(void) if (entries > 1UL << STACK_HASH_ORDER_MAX) entries = 1UL << STACK_HASH_ORDER_MAX; - pr_info("Stack Depot allocating hash table of %lu entries with kvcalloc\n", + pr_info("allocating hash table of %lu entries with kvcalloc\n", entries); stack_table = kvcalloc(entries, sizeof(struct stack_record *), GFP_KERNEL); if (!stack_table) { - pr_err("Stack Depot hash table allocation failed, disabling\n"); + pr_err("hash table allocation failed, disabling\n"); stack_depot_disable = true; ret = -ENOMEM; }