From patchwork Fri Oct 20 22:27:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 156359 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:6b8b:b0:164:83eb:24d7 with SMTP id ta11csp31604rwb; Fri, 20 Oct 2023 15:28:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIbekNH/A2xhiJMJZuPay06BN/+EhxmDqJzh7uU2SD6oyQgrRqwbXCL3WmeCh+ks3gXsqa X-Received: by 2002:a05:6a00:180d:b0:6bd:b7c5:f777 with SMTP id y13-20020a056a00180d00b006bdb7c5f777mr3227382pfa.16.1697840930195; Fri, 20 Oct 2023 15:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697840930; cv=none; d=google.com; s=arc-20160816; b=dPbhfjEVd7Lqbpkx3Syrnc+CncgwNhzGfFKbuce5l8DhxRd6RlEK+GP0pVkOfzNOEx YK9DJoEnPbEgucL44S3dd+1c8VJRtdZ2we0J9P5amOrw9qbN0QCkiJ82oc0kSxBrdiNs +PuCThrHgeAepqlgCYQxRDT/tDF/RkTF0mo66nCMGmOHpDzvpn2X/DZRhLzmsMye9juc gKKul468XZKrnIexmOiaDIwm+UipTIpQ1NVJhoRg6BeR59qQw9vHmj34S3+37nOVGFmT nks8rB5Dfdb+ubeVFHstM9k9HIytYmdK9PY8IHVikTPuTgN/NNdgY3YYl5oXcka25HgZ lxFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=Be98MJPM5bDcnyIGI1xLuEAs41VxzEldtTAP8vbCE6U=; fh=FwUYGH9BDmS3HXbwPfn5ByBT0roRrTCEPhmCaCPPxPs=; b=ScVEnPX7zvX0cFzFlwkP393wPCHgxERh4C+kWMG7SdLYT4gslgrDtfYzGpDyn5mVNT zbsPzZQwWeIlteKhwVj2mBGbf5DPeJDTSgpiRNFM43ARM/fUmoI4oNgcxaHHIW9uqEno QHNIDjTefLTsp5T8X3Bhps82zDGoX7xZnI8qo2STK0w1Twt47FTV33ZjReWXaP8+8k6m GyeYxQdpk10rFE25WkAxLAOEB/TlJRwxD9svfYO2crfWyh7xkeCwXRNStQnAfOqZGY3u XRn/Mnnpu/iEczpgMmaDIlqb0/wU0q0EMWpwt9PmIO1SB+sh+VDUBT3FkLT664znW+tK 2AWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id ka24-20020a056a00939800b0068bf645ac9bsi2793996pfb.238.2023.10.20.15.28.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 15:28:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9089182DB46A; Fri, 20 Oct 2023 15:28:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230270AbjJTW14 (ORCPT + 26 others); Fri, 20 Oct 2023 18:27:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbjJTW1o (ORCPT ); Fri, 20 Oct 2023 18:27:44 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E57C8D69 for ; Fri, 20 Oct 2023 15:27:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 013B3C4339A; Fri, 20 Oct 2023 22:27:42 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.96) (envelope-from ) id 1qtxy1-00AQb0-07; Fri, 20 Oct 2023 18:27:41 -0400 Message-ID: <20231020222740.846078267@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 20 Oct 2023 18:27:19 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Andrew Morton , Jonathan Corbet Subject: [for-next][PATCH 6/6] seq_buf: fix a misleading comment References: <20231020222713.074741220@goodmis.org> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 20 Oct 2023 15:28:47 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780315250806354548 X-GMAIL-MSGID: 1780315250806354548 From: Jonathan Corbet The comment for seq_buf_has_overflowed() says that an overflow condition is marked by len == size, but that's not what the code is testing. Make the comment match reality. Link: https://lkml.kernel.org/r/87pm19kp0m.fsf@meer.lwn.net Fixes: 8cd709ae7658a ("tracing: Have seq_buf use full buffer") Signed-off-by: Jonathan Corbet Signed-off-by: Steven Rostedt (Google) --- include/linux/seq_buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/seq_buf.h b/include/linux/seq_buf.h index a0fb013cebdf..8483e4b2d0d2 100644 --- a/include/linux/seq_buf.h +++ b/include/linux/seq_buf.h @@ -36,7 +36,7 @@ seq_buf_init(struct seq_buf *s, char *buf, unsigned int size) /* * seq_buf have a buffer that might overflow. When this happens - * the len and size are set to be equal. + * len is set to be greater than size. */ static inline bool seq_buf_has_overflowed(struct seq_buf *s)