Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934126AbbDVHew (ORCPT ); Wed, 22 Apr 2015 03:34:52 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:33145 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933223AbbDVHev (ORCPT ); Wed, 22 Apr 2015 03:34:51 -0400 Date: Wed, 22 Apr 2015 16:33:43 +0900 From: Namhyung Kim To: Masami Hiramatsu 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 Message-ID: <20150422073343.GB21451@danjae.kornet> References: <20150421114155.21617.91519.stgit@localhost.localdomain> <20150421114200.21617.19400.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150421114200.21617.19400.stgit@localhost.localdomain> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1171 Lines: 39 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. Thanks, Namhyung > + ret = 0; > > free(str); > } > -- 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/