From patchwork Mon Jun 21 02:40:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gumingtao X-Patchwork-Id: 12333763 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29A6BC48BDF for ; Mon, 21 Jun 2021 02:41:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9DEAC611AC for ; Mon, 21 Jun 2021 02:41:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DEAC611AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3C7BB6B0073; Sun, 20 Jun 2021 22:41:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 39DBA6B0074; Sun, 20 Jun 2021 22:41:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 217E96B0075; Sun, 20 Jun 2021 22:41:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0076.hostedemail.com [216.40.44.76]) by kanga.kvack.org (Postfix) with ESMTP id E73FA6B0073 for ; Sun, 20 Jun 2021 22:41:02 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7A9D9181AEF15 for ; Mon, 21 Jun 2021 02:41:02 +0000 (UTC) X-FDA: 78276178764.19.6CB9259 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by imf15.hostedemail.com (Postfix) with ESMTP id 7E98FA001A78 for ; Mon, 21 Jun 2021 02:41:00 +0000 (UTC) Received: by mail-pg1-f172.google.com with SMTP id t13so1129382pgu.11 for ; Sun, 20 Jun 2021 19:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=tiITAbqpPnqkOi6wakpBtQx52McUyGYZCcHPIl7xsy0=; b=iWdhN3CFZXKaRQv+sGidLOV3CqKfQ9UOGecgei4hzaT9phkuA+bv+QF4Xiijbwr9Bf LAxbOmRf1eFF4PUxvbR+76UPP8RR9HW+TesgbpzrHl7e/ZEGLYXYCw4Z0YXZc36q4F/7 RpXVGKqUv5SeXPlIj9ngMofFNAxi7fwzT8v+3gAgJIgYhDF56XNkHIs+AYAeC1vvPIeH 01pGKE+Z2Aqk1Wm2NXKDEv63v+y7UJ4yQx1GIeJL6DwbsB2mkCb+JIROahW6uDgvWb7u SNmxwy1jRD/+QJXTAUuHdd7IZ5uw50hWF7cfYp+Cv+6BhNWMXdJJy9t3NnkV+ZFdUmv1 7qcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=tiITAbqpPnqkOi6wakpBtQx52McUyGYZCcHPIl7xsy0=; b=OVraaxsN0gV3lOtQMvPARqpS/DwVKxrTzXWC5+KF9zE+AgD7NKvI/TnEEyNdtbX7T2 fF7j14Cl/DDVzaHQdbNfimgEIz0r4dNduni+YazHnlGKnlNFmH0v6fk93rRO8RDqpNgG imwryZeOoBVFA6c2wsmRFyuPsAUbEtrQ3qx8XRAoEYyz9z2Kqr/8V92TB5IdqgIJuGAs SoZF+A2WfGtgmN+iUi5rJYRT6oIpmlkBt1DJ7Ex6SIcRiPmRMc5FPsE0JlK4DWdHS6XF rWcOn16XrWmA67iKUtWQ4JY8bQUvLTfgojfbfOAJgh72w1nbYDvNxxDdWLNmEQ+ITT+J 8QPQ== X-Gm-Message-State: AOAM5335NRyugTjC6bGrSoELNiOxww95mLNbJXtHYhZgUKbXAy0bv8y4 1DoPWrcA2wxdA4hVceKU2sc= X-Google-Smtp-Source: ABdhPJysEGeNgCsUe0sJ7w+MeGkmUdqIzdMiUGZ6StdWmAAqML6n1yxhMF+1wkt7w9nuC5KTGTx5Cg== X-Received: by 2002:a63:ff14:: with SMTP id k20mr2714079pgi.390.1624243261301; Sun, 20 Jun 2021 19:41:01 -0700 (PDT) Received: from localhost ([43.224.245.180]) by smtp.gmail.com with ESMTPSA id p20sm15052178pgi.94.2021.06.20.19.41.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jun 2021 19:41:01 -0700 (PDT) From: gumingtao X-Google-Original-From: gumingtao To: cl@linux.com Cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, nathan@kernel.org, ndesaulniers@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, gumingtao Subject: [PATCH v2] slab: Use %s instead of function name Date: Mon, 21 Jun 2021 10:40:40 +0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=iWdhN3CF; spf=pass (imf15.hostedemail.com: domain of gumingtao1225@gmail.com designates 209.85.215.172 as permitted sender) smtp.mailfrom=gumingtao1225@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 7E98FA001A78 X-Stat-Signature: qy5xrhrow8cfjppu8k5wm5393qziw7ck X-HE-Tag: 1624243260-424586 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: It is better to replace the function name with %s. Signed-off-by: gumingtao --- mm/slab_common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index a4a5714..ffa3b11 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -378,11 +378,11 @@ kmem_cache_create_usercopy(const char *name, if (err) { if (flags & SLAB_PANIC) - panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n", - name, err); + panic("%s: Failed to create slab '%s'. Error %d\n", + __func__, name, err); else { - pr_warn("kmem_cache_create(%s) failed with error %d\n", - name, err); + pr_warn("%s(%s) failed with error %d\n", + __func__, name, err); dump_stack(); } return NULL; @@ -509,8 +509,8 @@ void kmem_cache_destroy(struct kmem_cache *s) err = shutdown_cache(s); if (err) { - pr_err("kmem_cache_destroy %s: Slab cache still has objects\n", - s->name); + pr_err("%s %s: Slab cache still has objects\n", + __func__, s->name); dump_stack(); } out_unlock: