Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1962884pxj; Sun, 16 May 2021 09:37:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzf5ndh+u4UwfWDw1cq1/pPR0uIENENPx+Pom0dqoZVrWmGbwVxF94hiStFp2gAiYBxOrBH X-Received: by 2002:a92:d110:: with SMTP id a16mr4826958ilb.84.1621183025981; Sun, 16 May 2021 09:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621183025; cv=none; d=google.com; s=arc-20160816; b=ViGH2gLsexyEM/krrEV99OR2/d3M6RuaY9KBnH+oXWeDBdnheukbtI7XEjgvUYWoQK 4BO9gUUWLu0zD+VNSr4QJ8v0GhRAuxOHkkC7MPYLs0zSB5P7vPTf/DE9FggmlYoBAJHp +d6cRdDCxnAotwsyLLsRh1Cv9Y/zTHIbAVbwLxbTN8GckVOnucDhzpyxsPUBm/5eXB9W lhwe3ADX4JZ7LpjdXXBMlpABW+tXClC9UZCmWk0qhGSn/786AiLeWA54tVUSHyhjR6gv ir2Oh0B0TNlE3hPcibb7ha+K/7gWBN8sJ+nffBWOEkD3is/oHzX/aNmyxgZEJxlAMXgI PpLA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=gMq8M2ycNtuVISfaoyVCF2o+kIp5YZvVJJkcf2+IMSI=; b=kN+hyirXOVdshYA3mhiAxz6LzrLNDYFa6wAgCmAIRT3QC44RK7hiV6jQhwp0afsSdx gOABJ/gGplBtEQfzVt6ENlHs1mmW6mzZLu3pqDf0/5AWJfrGwUD8V5W68Rib8UbvDj43 97lOkd0xf12Rd1R2wbuP/iNj++m/vNJhqcFKqQ8wOqAqA6OW0LEx5njUC7aEaxr11raC PO3eQXA0PaSI7OHoZXnTVKmc0i5uJaMYeUJygqaTILSGy0/6c+j8RvJl2ePlSWeK7hym Vgt9XgGvQaa972c/r+BeAdXQS/4wwu+itq7cHXYkSOE1c21ECHFOaVNxQVmQh1C6/Ies 9Ttw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si3526474jat.43.2021.05.16.09.36.52; Sun, 16 May 2021 09:37:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233573AbhEPNQW (ORCPT + 99 others); Sun, 16 May 2021 09:16:22 -0400 Received: from smtprelay0183.hostedemail.com ([216.40.44.183]:51484 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229888AbhEPNQW (ORCPT ); Sun, 16 May 2021 09:16:22 -0400 Received: from omf07.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 152DF18021DB5; Sun, 16 May 2021 13:15:05 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA id 5485C315D75; Sun, 16 May 2021 13:15:00 +0000 (UTC) Message-ID: <81d398b86b1c7214e64a0dd25a9ef090f86bc16c.camel@perches.com> Subject: Re: [PATCH v3] samples/kprobes: Fix typo in handler_{post,fault}() From: Joe Perches To: Masami Hiramatsu , Tiezhu Yang Cc: 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 Date: Sun, 16 May 2021 06:14:58 -0700 In-Reply-To: <20210516190201.790f4f2085e2691bbb96c58c@kernel.org> References: <1621046346-7855-1-git-send-email-yangtiezhu@loongson.cn> <20210516190201.790f4f2085e2691bbb96c58c@kernel.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5485C315D75 X-Spam-Status: No, score=-1.40 X-Stat-Signature: qcytjufepgrgjatjrgjkmngrgxj5bned X-Rspamd-Server: rspamout03 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX1/z+bZQ+EMlYUPk7KqNrGVOmNeFidOA67s= X-HE-Tag: 1621170900-47233 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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__.