Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2065064pxj; Sun, 16 May 2021 13:06:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoVfoc1gCpXd8uuuEnhc9iFRfILxFy9uzzPat8B54paCiHCZxsr3jeVZdksPI4qP5z7LoY X-Received: by 2002:a17:906:e09:: with SMTP id l9mr5572841eji.528.1621195578492; Sun, 16 May 2021 13:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621195578; cv=none; d=google.com; s=arc-20160816; b=im104j+hyNLf8AWL8GVb4ggkmiL2tvakngolHxRa3FTafjYfAONdluXdQhs45Fhvpi HvHAmFFpBOdUMgZCab41x5MEKzwMYm0I3TNzfRLK1GkT/4lF/KpViXr227JDbTN/c00R EJrPlJZcLPTdJjV5An/FpJWXa4VvHR6OA/pKbQr1rZlET26IzPirB76dhMuNC7viipH3 vTCukyGr9G9Zr6ke+4/3GbABZbLziDTRLoPhEqK0GEQqOAAKuE0MResKq+/SpSNbgZbM s85TG3MvcblBeBVYkr6K9Nx5xDo2G43wUS7/UUj30cVrtL2eitlAE9xVJ5CP2Qpfm9Su FOCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=EAbfc6+oAoL8fl7njNrcLe4uQwI8pFfEd2R+TBg69/w=; b=uivsru6PFrVuTUYvMDjk4JbLGo2FKEhZSMD7a3skmh0efelb8BwKKXtItdmKRNo3p+ 6iDb1G/ztO1vTNVBaBlWeZbcl1bHVjBnp0ote9WQgvPFJ8tNFBbQL3CZW7zXjUQV2t2U /aVms/hvKLZ0B0VsmSSIPOjG2/dIFSdDWouUucP9le/eEvX6kBe2CQZWYUTImJjd8YVm BrvDeqrU2RgJGmAR0Qxqd/CN68L5M6iIoMwl9jltVnrKdkaPQXFqenON27HxmuKG48GT 5g94HQJhWFb61fuCkHy62raXUQ1qazrqdPtgVaHPwOs/0VCxWxgV5iwbOxzE6ssZiJ0H c9jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qx9mzqwD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz13si5690107edb.315.2021.05.16.13.05.38; Sun, 16 May 2021 13:06:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qx9mzqwD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233645AbhEPNV1 (ORCPT + 99 others); Sun, 16 May 2021 09:21:27 -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