Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1274983rdb; Fri, 20 Oct 2023 13:39:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFinzSLTbF3OJzGMKUPjVoUuHoKMyhLVhEDKO4po1fBMNT1CDFnycADVILTywUblW/V+035 X-Received: by 2002:a05:6a00:2355:b0:68c:44ed:fb6 with SMTP id j21-20020a056a00235500b0068c44ed0fb6mr4008003pfj.16.1697834347349; Fri, 20 Oct 2023 13:39:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697834347; cv=none; d=google.com; s=arc-20160816; b=B++Y2s7RNgbsHe8/A50tgSZxU0GkXaSCJesqwrrLQYaFWoe/jtpvZIyZN3JGjujd+X eiVhXulVcWo80zSuz0yqiP0+nL1Y74mAQ6N7aN2fQdy73lvPo81BoIP7oV8sbqzmG8pV upMN8QBrdg7Mv6crBiY61RYuBV5Duyx8UPhL9dxrl8seexe86U+8NdsV1+kCT1h2U15c gKApglv4WEt48CH59nE8T5VYZrJB2eAe824QK/A3FxFZ3QqeiRoEDEjH1aKMHNkMw6KQ 3lg7sEtYd11bjTc/6MTruJrJ+pSPCC1FN827Q3zBS+O7chI/snZjbYyjVHvSkaBxBx/g 3iIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=LvqzsKrogBPLWtwDR0EhP9713sN3hW79CcKzrRif0MU=; fh=SE26G3THI4Fh7zHk2UItC0g90rPcm/kGmvQnkcpXfiE=; b=ouM5CpLaKB0mfLi6/FhAMApdiyAT4VCHjwIxyPx37N2To3waoJ35FUC68HCj7qQy6o YCRvVho+Kf+NEqtJJOaqiKBlEb1cNeBnNOWwW0vrKxkDLt6RxVKcNHY3wrywxpXNlkSb CtA97nFHC6s1nL+9CFFG0ULGdjNpA4tuAVlBcAWM+tV31defLSlJT+IQ6sbdYBm8audJ 9qR5GAaBvA/SUuKDv810i9CyFKRHz0z3DUwGAk7NGcoPNHj8GjNPdxoCdfFW2Vo8cYqU Z20PBD/vvpDE084RwaN5HhwfmIy4QmU5aSgPZl7/1b1un2JjkGZHgDwKK93B0O21YV0L jWWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b="FZ+6YTW/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id a186-20020a6390c3000000b0055391572218si2461131pge.26.2023.10.20.13.39.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 13:39:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b="FZ+6YTW/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 9DEF68080EFF; Fri, 20 Oct 2023 13:39:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230114AbjJTUiy (ORCPT + 99 others); Fri, 20 Oct 2023 16:38:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230212AbjJTUix (ORCPT ); Fri, 20 Oct 2023 16:38:53 -0400 Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E96B6C0 for ; Fri, 20 Oct 2023 13:38:50 -0700 (PDT) Received: from localhost (mdns.lwn.net [45.79.72.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 8561E60A; Fri, 20 Oct 2023 20:38:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 8561E60A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1697834330; bh=LvqzsKrogBPLWtwDR0EhP9713sN3hW79CcKzrRif0MU=; h=From:To:Cc:Subject:Date:From; b=FZ+6YTW/OTdsweXd+r3WaHyCLCL+kvHQbSKgnkgb0KxkuHJmBNppkyQamBpnAC1rz CrxERQu99emWm7KHuY+pl9QWmrcaONM32zbxx2qUFpBzG2WFWxcsbDXUfd9ZTCn3Qh kxVsYV54qOGsas7/jJvjmj+GtJEGIjcRTdFCfQHCIzc15ilNnnReWW0usHIeJbmiAU hmB5DEc4Dyd7mW4ssYPnzVW2zLev7TmulsSdGLQSjL3TUQd+uUFs9R28CYOqCyiCC/ tfZ6K4fi+SSPMtmccFzDKr5fzeDe3vWN7yNQUsLjO/tVaHJNfsIhe3azYqa3jB88WO XE+xrIZC4IzJA== From: Jonathan Corbet To: "Steven Rostedt (Google)" Cc: LKML Subject: [PATCH] seq_buf: fix a misleading comment Date: Fri, 20 Oct 2023 14:38:49 -0600 Message-ID: <87pm19kp0m.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 groat.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 (groat.vger.email [0.0.0.0]); Fri, 20 Oct 2023 13:39:04 -0700 (PDT) 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. Signed-off-by: Jonathan Corbet --- 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 515d7fcb9634..026302765494 100644 --- a/include/linux/seq_buf.h +++ b/include/linux/seq_buf.h @@ -39,7 +39,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) -- 2.41.0