From patchwork Fri Feb 10 21:15:50 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: 13136449 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 4533CC636D4 for ; Fri, 10 Feb 2023 21:16:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8A9A66B017F; Fri, 10 Feb 2023 16:16:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8594F6B0180; Fri, 10 Feb 2023 16:16:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FAFE6B0182; Fri, 10 Feb 2023 16:16:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 625DE6B017F for ; Fri, 10 Feb 2023 16:16:14 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 3527341274 for ; Fri, 10 Feb 2023 21:16:14 +0000 (UTC) X-FDA: 80452640268.10.142D005 Received: from out-100.mta0.migadu.com (out-100.mta0.migadu.com [91.218.175.100]) by imf19.hostedemail.com (Postfix) with ESMTP id 7AE2F1A0017 for ; Fri, 10 Feb 2023 21:16:12 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Lpp+lB8h; spf=pass (imf19.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.218.175.100 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=1676063772; 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=z1gm2uHZDO3x8BSiOJ0jeaJz4iOmzsaE5lyAkDJqHg0=; b=W4FkomKUScRQgeFClf6JrrqQBnezJ7TMuJXYCpk86xaN60iDXJAQSdjJNqFvb71FTU8/74 O0Dio9wGouqKxab6yG5bOYSHkzs84o2xVov9Uhfite8fwIWa/4JumihILbbO0S3+GVUurY 0VWfy4le+qo3VJSW6EU0AE8qi97ZKBc= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Lpp+lB8h; spf=pass (imf19.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.218.175.100 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=1676063772; a=rsa-sha256; cv=none; b=QOTkXlHY3B0vDOv7LlCf0OxLR6n3HE1uMD1dMLAFXf4Bw0RiUu4c8fqlyOEm4SSTI1rvTV wehZw8nnXAf0bZyNI0uJK6G/VZrg6qXQvURM1+PuTHDfAU4UA89BC49SxuqPH5iBHHCWbP EWnYuZ+NV2sUqba5FcJBpjmu3uk+gcg= 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=1676063770; 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=z1gm2uHZDO3x8BSiOJ0jeaJz4iOmzsaE5lyAkDJqHg0=; b=Lpp+lB8htFhm3jM77dYrWl3dcQNjGvQPekyllxMw/5S9HTXcy8zozqt61j4IoOjzYexjNX /RA+b/g0ZhTr1fEhl1rwKYR5Zx1bPii9TPaSk7EW/Ugs3bN1GKdaZhurVbCpfZUbM7A36L V0utwNuGGe4199Y176cZaBlvcdKvq/Y= 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 v2 02/18] lib/stackdepot: use pr_fmt to define message format Date: Fri, 10 Feb 2023 22:15:50 +0100 Message-Id: <3d09db0171a0e92ff3eb0ee74de74558bc9b56c4.1676063693.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Stat-Signature: r78swpjr9kyqutsgskbdc1gu6cnkceox X-Rspam-User: X-Rspamd-Queue-Id: 7AE2F1A0017 X-Rspamd-Server: rspam06 X-HE-Tag: 1676063772-613914 X-HE-Meta: U2FsdGVkX1/T2XNhJTsnOkjAdnuQ44hy+Yml1aEUNIFcuPXWak4mDmIgDtv16TR9rlFa1As5LKsojSADCNSTgGL5/jyH/j8VmZ81SLCKo9i4gYtSnwmwHOl2hz74IVFIg09dxvGcURXjlv5NYCSLF16/HSMmiHFgesF1O4vHQEQFS0BatU4xdsIRegIlQeLbQTP6SIFFbZhf/+kgsKtRWPvhesykCMyLVk32KuZUmZiuIoH+YDygkCHGEA+WW18fzNMyH4f5vUi4SInGXegjksIhdBSz1ZaE/thdnYxawIY5bKOIS8Cp5K54L57RhBlAURiNWuQIXVDim/GsDDTRqWg0wuYjpTZ0SY3yiFCvJa7dtMBgvt1JgPJV6zZWt7icK0x6G/lPWOGvClzyWKoN9byq2D08hT+HBKoYyp+b8RI4uBvzPznQSBZCQ1jRgCnUAaeWhT7GHLoQHFePA/C3WK2V8uT/E9vb5WzsZQNUh/WjGMT0Rct4CW/1NiaxqL/nKmPGfNklKtcxVD4Vh3AgFiprGJ/pzTnlaqTeNtJj9f7Tce/pSZ2GSYOuzDlrkkp5nVUmO5ukwyqzQrVJph2P74AodCWQgPBvV5b2RsZVs9CCTEyQllII9MB6wO0BGiQierAKF+vDfzj3WX+fRB11BG0aHF/dG3WoVlXU5pKRLcpEYqGxATM7LW4Tor0mERANLPorFTv36lH9ei+prUIg623qn8ewL+cixIJViVdtXv3IKVYWY3H4gif07mXtdQmWRQbGBjq/pL4+ijH+yDJvlkgzRjpzQT5g0njvW6aIiwjADzFkkaMJvB6JdgV5zBWu7h2fdj/uQfE1jFrscji9D0tsUBo7nwCubvVz/RhNy1dn9pqlD3buLD4uMtIKqofVAvD/9UdLuASqRz1mJQPVtnAS4Xi0PBwvGhkgQYwGodMP5O30e0TfMBXwHKo6FKjapY/tsSFP0BIrzmBMiXM vu2VQHkD 97bwXRLOoLirU83C/A3eAQe6QIxOQxoewUB/ab65DR8ThUAcCaxYRF8BpGdM/nm4wLduboEtJHfbKR9FsCJs4nNA08KlLrGVB7j2JhIeX4kG5JURTKWnkK6kRAarNPYjvNy13faI7LXb97iaAONAL2WWylw== 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. Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- lib/stackdepot.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index 4bfaf3bce619..83787e46a3ab 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; }