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=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS 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 C471DC433B4 for ; Sun, 16 May 2021 13:20:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D24661184 for ; Sun, 16 May 2021 13:20:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233673AbhEPNV3 (ORCPT ); Sun, 16 May 2021 09:21:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:49504 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbhEPNV0 (ORCPT ); Sun, 16 May 2021 09:21:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 09C3F61057; Sun, 16 May 2021 13:20:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621171211; bh=2nKhWSdNaznlT9Qj0k9QpAEScdSYLJ22W+74tQs2xJA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qx9mzqwDaf4oVeez9cKMY6ZiE5DCWLX8vI7u8DrkV9YpfmGwBr2TgnGAsS2HPaMc4 Fo6NPbMoLETyy8P7MBGpDHaKOL1rp7rKLesqc2md5AIgF/WxHYMvL1IJFzQBglSzzG OCvLF+tgP8BQaflW64DktFWklVAlc1Bs1/shKeR8grtAVvK67VCIJ9zLgXRxTE+PG3 vl/4RCF/VXOoB3HT/NUKxqCnCfB27GEgIePLKr9dO1jrQczDRdJs6Sv+k+umQm9L6Q 3P+s8Pcb4NWNVhMcrzb8i2/5R7tULCnumMHEIGiO+wEzYkkWgclqyFkGk5h1PUlJU3 kkR1/qzJYkdIg== Date: Sun, 16 May 2021 22:20:03 +0900 From: Masami Hiramatsu To: Joe Perches Cc: Tiezhu Yang , Jonathan Corbet , Marc Koderer , Mauro Carvalho Chehab , Christian Brauner , Jisheng Zhang , Heiko Carstens , Martin Schwidefsky , Johannes Thumshirn , Mathieu Desnoyers , Randy Dunlap , Ananth N Mavinakayanahalli , Andrew Morton , linux-kernel@vger.kernel.org, Xuefeng Li Subject: Re: [PATCH v3] samples/kprobes: Fix typo in handler_{post,fault}() Message-Id: <20210516222003.29086ea4f04a956edb47b032@kernel.org> In-Reply-To: <81d398b86b1c7214e64a0dd25a9ef090f86bc16c.camel@perches.com> References: <1621046346-7855-1-git-send-email-yangtiezhu@loongson.cn> <20210516190201.790f4f2085e2691bbb96c58c@kernel.org> <81d398b86b1c7214e64a0dd25a9ef090f86bc16c.camel@perches.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 16 May 2021 06:14:58 -0700 Joe Perches wrote: > On Sun, 2021-05-16 at 19:02 +0900, Masami Hiramatsu wrote: > > On Sat, 15 May 2021 10:39:06 +0800 > > Tiezhu Yang wrote: > > > > > It should use post_handler instead of pre_handler in handler_post(). > > > > > > As Joe Perches suggested, it would be better to use pr_fmt and remove > > > all the embedded pre/post strings. This would change the style of the > > > output through. > > > > > > > NAK, this also shows which handler cought the event. > > If you wanna change it. Please replace it with __func__ instead. > [] > > > diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c > [] > > > @@ -10,6 +10,8 @@ > > >   * whenever kernel_clone() is invoked to create a new process. > > >   */ > > >   > > > +#define pr_fmt(fmt) "%s: " fmt, __func__ > > It does that already via the pr_fmt which uses __func__. Oops, I missed that. OK then it is good to me. Thanks, -- Masami Hiramatsu