Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755011AbbDVM2B (ORCPT ); Wed, 22 Apr 2015 08:28:01 -0400 Received: from mail9.hitachi.co.jp ([133.145.228.44]:54105 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751897AbbDVM17 (ORCPT ); Wed, 22 Apr 2015 08:27:59 -0400 Message-ID: <553793C8.6070007@hitachi.com> Date: Wed, 22 Apr 2015 21:27:52 +0900 From: Masami Hiramatsu Organization: Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Namhyung Kim CC: Arnaldo Carvalho de Melo , Peter Zijlstra , Linux Kernel Mailing List , David Ahern , Jiri Olsa , Ingo Molnar Subject: Re: [PATCH perf/core 2/8] [BUGFIX] perf probe: Remove all probes matches given pattern at once References: <20150421114155.21617.91519.stgit@localhost.localdomain> <20150421114200.21617.19400.stgit@localhost.localdomain> <20150422073343.GB21451@danjae.kornet> In-Reply-To: <20150422073343.GB21451@danjae.kornet> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1493 Lines: 44 (2015/04/22 16:33), Namhyung Kim wrote: > Hi Masami, > > On Tue, Apr 21, 2015 at 08:42:00PM +0900, Masami Hiramatsu wrote: >> @@ -2760,14 +2762,17 @@ int del_perf_probe_events(struct strlist *dellist) >> >> pr_debug("Group: %s, Event: %s\n", group, event); >> >> + ret = ret2 = -ENOENT; >> if (namelist) >> ret = del_trace_probe_event(kfd, buf, namelist); >> >> - if (unamelist && ret != 0) >> - ret = del_trace_probe_event(ufd, buf, unamelist); >> + if (unamelist) >> + ret2 = del_trace_probe_event(ufd, buf, unamelist); >> >> - if (ret != 0) >> - pr_info("Info: Event \"%s\" does not exist.\n", buf); >> + /* Since we can remove probes which already removed, no error */ >> + if (ret != 0 && ret2 != 0) >> + pr_debug("Event \"%s\" does not exist.\n", buf); > > I think it'd be better checking 'ret == -ENOENT && ret2 == -ENOENT' > here since del_trace_probe_event() can return other error codes. Indeed. BTW, this code is replaced by patch 5/8, so I'll update it too. Thanks! -- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/