From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 29667C433E0 for ; Mon, 15 Jun 2020 11:48:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DA05D2067B for ; Mon, 15 Jun 2020 11:48:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="nBWOTPhW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA05D2067B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 348946B0005; Mon, 15 Jun 2020 07:48:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F99E6B0006; Mon, 15 Jun 2020 07:48:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20EC36B0007; Mon, 15 Jun 2020 07:48:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0019.hostedemail.com [216.40.44.19]) by kanga.kvack.org (Postfix) with ESMTP id 06F466B0005 for ; Mon, 15 Jun 2020 07:48:07 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 84DF6181AC9BF for ; Mon, 15 Jun 2020 11:48:06 +0000 (UTC) X-FDA: 76931272572.04.birth47_1807fb126df6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 6349A80073B1 for ; Mon, 15 Jun 2020 11:48:06 +0000 (UTC) X-HE-Tag: birth47_1807fb126df6 X-Filterd-Recvd-Size: 2491 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Mon, 15 Jun 2020 11:48:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YLLVQrNy5qbbAna+yfJqbYXbpTnUdizCYlp4x9lYoG4=; b=nBWOTPhW4RTV8A5+P5D+4BCO/6 hHTzOQ8ythMWbrfjt6vis59+a84b6EcH5bQlCNtWQDjqoz8WT1GGnLMIrAWhTqVL/rJpvjB/ahFb+ IYNe24NBFraGTUiOb6s6f1Ukp+8UT+54f2NebAZ3QfsgR3Mdf0yYpkGivCmQg/rPGBCaDk7e2H6i0 lsJWjJPQoTwt5B+Q2ExDSisoekJrp1NpCNOhK/tWMVCLdS5iBPeK+Fsjbt9GVBVOdIa0WSUTCUSF0 Bi6la8ARHNo6C0/fhe19xe+tWwM4YGMi2jrsUdhgbGpdaOdgIzAHMAlPQWi6V++1n6ifDgpaItjLI nHrphMmQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jknap-0007MA-Lt; Mon, 15 Jun 2020 11:48:02 +0000 Date: Mon, 15 Jun 2020 04:47:59 -0700 From: Matthew Wilcox To: hui yang Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, linux-mm@kvack.org, iamjoonsoo.kim@lge.com Subject: Re: [PATCH] mm: use __func__ replace function name Message-ID: <20200615114759.GQ8681@bombadil.infradead.org> References: <1592220534-4656-1-git-send-email-yanghui.def@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1592220534-4656-1-git-send-email-yanghui.def@gmail.com> X-Rspamd-Queue-Id: 6349A80073B1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: On Mon, Jun 15, 2020 at 07:28:54PM +0800, hui yang wrote: > From: YangHui > > it's much better to use __func__ Not always. This message is reporting the improper usage of a public API. If we were to, for example, split the function into two and rename this half of it __kmem_cache_destroy(), we'd still want this message to say kmem_cache_destroy. I don't think we should apply this change, and if you have similar patches in mind, I'd like to see a more detailed argument than "it's better". > @@ -960,8 +960,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: