Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp135277ioo; Wed, 25 May 2022 23:29:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYFOslPdOFpZ5pDWlaGyEjsv4kcJBsDiZG7XPqkgbLofbeHF8fe2WaHvdVGg/BcGIMldsT X-Received: by 2002:a17:903:234e:b0:163:71ba:9fe1 with SMTP id c14-20020a170903234e00b0016371ba9fe1mr3017783plh.89.1653546576097; Wed, 25 May 2022 23:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653546576; cv=none; d=google.com; s=arc-20160816; b=OddG1cEFLlgtHux/oS+45sA7+GWPGEtQ64HaqEe0m9FSlJm1i157eTlqBERZUjks6n iKtbJyVp82MjU4Ye1gOU95bNqLl8NC04e3AHSFw8rgBoPfQE6L4GUBvG3A/S/eNK44sY Ol614Bd7LL/UyPl+tPGqSa5DcIpocFGZKxBvDG/uP4jXq3Vj0GBW0jenf7IljdX98ukz ib7UNNweqK6EWzKNln4ha55o7hNZS/FXUX8k06OQSTNfRyPNbwP86eHHsiZL+XSJaXCa vCCdPhqEQlFQm3d72ULzokNiJfp2y0kxBgv+ExjjKXMfk00tiW0OBWiCrN093LSmes3B Arlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gOEnRJpOdTvkdK6X7t127DgQA0EFmqZ7LKvPVYjecso=; b=Pjb6jPjR4MWCIIJIq+gfhvW4zz+xz8b/LoqAeM8Q8GRjm3cKfrPXFU3cADXf+t7JaT zaA4TXn49/O4cuGw1+5MXf3qd8jeBr7gN6Y7E0ttLjicM3ROtvEzn9A20Afex1J+aYWq 5h4SNEQTpucnk78LkljjpPJG0u4hN+uTuPHjBs+o2J1iuDk4R9kM44T0b7gT/4p2j6CO r5eJt1sAvnm7ClYPte3k0bUsOzZx5DbmAUK5awkyLjIfYqWsPHQM++Fq2ILkBwYyQt4E ml3ywjdNWIZwbo9nCu9ng1CnZqjwQZpxZBQVgNuxnlcKPC7JDNfPJkbfdwObxm+SpCZU MXrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gtjW6qzp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q92-20020a17090a1b6500b001df7ae49fa9si4860087pjq.65.2022.05.25.23.29.23; Wed, 25 May 2022 23:29:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gtjW6qzp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241882AbiEZBBq (ORCPT + 99 others); Wed, 25 May 2022 21:01:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233274AbiEZBBn (ORCPT ); Wed, 25 May 2022 21:01:43 -0400 Received: from mail-yb1-xb42.google.com (mail-yb1-xb42.google.com [IPv6:2607:f8b0:4864:20::b42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3795F28E3F for ; Wed, 25 May 2022 18:01:42 -0700 (PDT) Received: by mail-yb1-xb42.google.com with SMTP id t26so567215ybt.3 for ; Wed, 25 May 2022 18:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gOEnRJpOdTvkdK6X7t127DgQA0EFmqZ7LKvPVYjecso=; b=gtjW6qzphf1fKBxxHmI60e9QD33KM2PUmyoz5a1GxJzW2HN74HLsAiTacc53j4ape8 lDK4XvWTFh20V8W9HUhxK7RTv+mEfD+cTWXwqTKNDYCRwi70EA02vp7F5LD4t435lkV4 PWnlO9M7EIGn2Dzk6yf3ymeYHRha+ZsdprhWIZXAz987pY8Iq2mmm240ZbJqUdsQXPHc GKDN44JPOwbfoegK8pbop8fV5+4utvHOl/X1OdQj8GEyDh9qnqd7CO4qxJbCP8vHgHas QrVrrOicWQROnh2om4b5xyFPlf09QSpX4zaoqw6cOti3uhbE9H2VhE4/x6yQ3W64XbNu pWFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gOEnRJpOdTvkdK6X7t127DgQA0EFmqZ7LKvPVYjecso=; b=CJ07pr3Xawu349Sgf6kJBASloNu+t+G1W6y57HNPUjElPwvCzY4VNcaPz5av0C9rTX BaJtzXqpkokhvmI2xRf0474zxPH9NFlLidgXXzxZle7Ql3lPANwdqv1BnBBYYIdUb7Lc XA/pBMYS9/AeSHZD9wbMav+yL0Hh5FTgxagAkAAfozAfu5XBG3o7J4vov1hLayCeOIfe 5OhHcbq8iT+5iEfD5GfRSBuZwPMYq8s8Xj/QuAztufyB6IRbbo434o1be5hTrgcM9lJ2 kj+wxvOtVCQjgNTGzwszbwHjzO0QRfE4JR/5gjYolqhUTC7hipGwPa2wxPRTqSuEVHVk 3XYg== X-Gm-Message-State: AOAM530b5GS3L4dpltSpm9V1WYOEp+fFakNgrA0Q4mabwEyT9/FDXS/L B0YZuon/15qI6vtSLo0S1D/RyQmiLX2nhipRsA== X-Received: by 2002:a25:614e:0:b0:64d:6b44:514b with SMTP id v75-20020a25614e000000b0064d6b44514bmr32701719ybb.397.1653526901454; Wed, 25 May 2022 18:01:41 -0700 (PDT) MIME-Version: 1.0 References: <20220523075123.1068763-1-sunliming@kylinos.cn> <20220525115142.279298c1@gandalf.local.home> In-Reply-To: <20220525115142.279298c1@gandalf.local.home> From: sunliming Date: Thu, 26 May 2022 09:01:30 +0800 Message-ID: Subject: Re: [PATCH] tracing: fix comments of event_trigger_separate_filter() To: Steven Rostedt Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, sunliming@kylinos.cn, Tom Zanussi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Steven Rostedt =E4=BA=8E2022=E5=B9=B45=E6=9C=8825=E6= =97=A5=E5=91=A8=E4=B8=89 23:51=E5=86=99=E9=81=93=EF=BC=9A > > On Mon, 23 May 2022 15:51:23 +0800 > slm wrote: > > > The parameter name in comments of event_trigger_separate_filter() > > is inconsistent with actual parameter name, fix it. > > > > Signed-off-by: slm > > Signed off by must have your full name. I doubt "slm" is your full name. > > > --- > > kernel/trace/trace_events_trigger.c | 23 ++++++++++++----------- > > 1 file changed, 12 insertions(+), 11 deletions(-) > > > > diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_e= vents_trigger.c > > index 21592bed2e89..c364dc729339 100644 > > --- a/kernel/trace/trace_events_trigger.c > > +++ b/kernel/trace/trace_events_trigger.c > > @@ -738,27 +738,28 @@ bool event_trigger_empty_param(const char *param) > > > > /** > > * event_trigger_separate_filter - separate an event trigger from a fi= lter > > - * @param: The param string containing trigger and possibly filter > > - * @trigger: outparam, will be filled with a pointer to the trigger > > + * @param_and_filter: The param_and_filter string containing trigger > > + * and possibly filter > > The parameter description should be contained to a single line. No need t= o > say "The param_and_filter". > > > > + * @param: outparam, will be filled with a pointer to the trigger > > * @filter: outparam, will be filled with a pointer to the filter > > * @param_required: Specifies whether or not the param string is requi= red > > * > > * Given a param string of the form '[trigger] [if filter]', this > > * function separates the filter from the trigger and returns the > > - * trigger in *trigger and the filter in *filter. Either the *trigger > > + * trigger in *param and the filter in *filter. Either the *param > > If you are updating this, then it should be: > > trigger in @param and the filter in @filter. > > As they are referencing parameters which need the "@" notation. > > > * or the *filter may be set to NULL by this function - if not set to > > And that includes the above as well. > > > * NULL, they will contain strings corresponding to the trigger and > > * filter. > > * > > * There are two cases that need to be handled with respect to the > > - * passed-in param: either the param is required, or it is not > > - * required. If @param_required is set, and there's no param, it will > > - * return -EINVAL. If @param_required is not set and there's a param > > - * that starts with a number, that corresponds to the case of a > > - * trigger with :n (n =3D number of times the trigger should fire) and > > - * the parsing continues normally; otherwise the function just returns > > - * and assumes param just contains a filter and there's nothing else > > - * to do. > > + * passed-in param_and_filter: either the param is required, or > > As "param" did not have a "@" in front of it, that means it did not > represent the parameter. > > > + * it is not required. If @param_required is set, and there's no > > + * param, it will return -EINVAL. If @param_required is not set > > + * and there's a param_and_filter that starts with a number, that > > + * corresponds to the case of a trigger with :n (n =3D number of times > > + * the trigger should fire) and the parsing continues normally; > > + * otherwise the function just returns and assumes param_and_filter > > + * just contains a filter and there's nothing else to do. > > And there's still more space to use, as the biggest line is only 70 > characters and we allow 80. > > -- Steve > > > * > > * Return: 0 on success, errno otherwise > > */ > I got it. Thanks for your review.