Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4044601ioo; Wed, 25 May 2022 13:37:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDb8fVwg9zBXO3u4i/Trk4j1sUsWfCn2OT45dbFUFo5+o9yjfqvBRWxtZf8G/6dJuDzbsL X-Received: by 2002:a63:9043:0:b0:3fa:d868:d8df with SMTP id a64-20020a639043000000b003fad868d8dfmr4867455pge.309.1653511057112; Wed, 25 May 2022 13:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653511057; cv=none; d=google.com; s=arc-20160816; b=RHUzMPeCecoekH6TC8hJWqfMKatU1oe2Rz4MWvci9sT+dBF0y/GhCtvvwlPCPdXM/w ZwKjZcCYwVURIQEKeL0uPvPN/55sR7V5xGQ7Vh+uz1ZpIBlmDFySFG5cAWHwrlmdXw9p C9mu7cHaQxfjO8vbBwZcM83P67fl5U6Y/IvLTAT8POlnv5Pyi2XTjqFCuG5RY9lPGMvN 3CXYmXJ28u9MvOQEQQ2lOM69JzOd3drZ+6YztqHnUmLqQpAeWaI3kz4OqsxLSzphLkSb 8ZCPcUtjBsk66G1Q3O1W8hL6T+kVppG9IBxc2tGuVtoGqKbh1WH7YP+riclkEt8kUHBF y93Q== 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; bh=ZLfLOuz7R/pJdYINpwikopLTohn8W63/bB/gi7Hy6bM=; b=VFFaidtxB7uFdSi1KsJB8uOnHNSpryTUvcRnsxOd8sX2QzcyrOsyMw//jPouCPXHm6 ySGFvFpwLZuFccRQ+eHezEKsMqfawnagBvs6Vv+Gh+e8I06325lC1Vlus3k4PG5quNDC lhdGZ2+ouUmdNXI+suhWvm5h4ikb/JH4hLM/7cbS51Eae7xLw/oIa0tu+3XygoV8+P0m lQnWzqOxl/I7wozoRZ+eIjVIsxd8pm4WFjKHFIZ8R7/jxROJ3UnScGZjBPTQY8MEsfQB EYV3vArrbrWRg6gUTfCY4vuge2+TZZGk0/IOcVJAZO5+66q/faXFk60z1OquMSoywxrW 2yzA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t23-20020a63f357000000b003f61386e2e3si19136881pgj.93.2022.05.25.13.37.16; Wed, 25 May 2022 13:37:37 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239944AbiEXR3z (ORCPT + 99 others); Tue, 24 May 2022 13:29:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229978AbiEXR3x (ORCPT ); Tue, 24 May 2022 13:29:53 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D5617CDE2 for ; Tue, 24 May 2022 10:29:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id D2F7CCE1A8C for ; Tue, 24 May 2022 17:29:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFC65C34100; Tue, 24 May 2022 17:29:48 +0000 (UTC) Date: Tue, 24 May 2022 13:29:47 -0400 From: Steven Rostedt To: Yuntao Wang Cc: Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] tracing: Use strim() to remove whitespace instead of doing it manually Message-ID: <20220524132947.03582de5@gandalf.local.home> In-Reply-To: <20220121095623.1826679-1-ytcoode@gmail.com> References: <20220121095623.1826679-1-ytcoode@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 On Fri, 21 Jan 2022 09:56:23 +0000 Yuntao Wang wrote: > The tracing_set_trace_write() function just removes the trailing whitespace > from the user supplied tracer name, but the leading whitespace should also > be removed. > > In addition, if the user supplied tracer name contains only a few > whitespace characters, the first one will not be removed using the current > method, which results it a single whitespace character left in the buf. > > To fix all of these issues, we use strim() to correctly remove both the > leading and trailing whitespace. > > Signed-off-by: Yuntao Wang Added to my queue. Thanks, -- Steve