Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2180166rwb; Mon, 7 Nov 2022 10:05:05 -0800 (PST) X-Google-Smtp-Source: AMsMyM4f8GxZjnyZOkKdi9mQoddBxpzHWLR5lxvGBmxfkNU2+e3RwWMxZY6AWStVq6oQwa+IkVud X-Received: by 2002:a17:906:9be5:b0:7ad:d0be:3467 with SMTP id de37-20020a1709069be500b007add0be3467mr41836040ejc.208.1667844305101; Mon, 07 Nov 2022 10:05:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667844305; cv=none; d=google.com; s=arc-20160816; b=ZHja6Lgb8JIXiqHuvUivvWcJImJOvydR1V6wfS6LK+jS8GsB+ACgzz86hk5momUnc7 gk1psPOF0c/TKsYLveQ3putQHYffn/vNOQYf3u7cDUAYYx5hajlFOUpQojxTq/XnL4ql 9kmyL5Z5DLRn0DW/FWLrXkQGYzjzi2JTQxWKz/uZzKjiMoePQekRUjFDJP98Ucg+duwE Mebuz45AEXaRW6pows4qnnz7Xvyukl960/tixT2VcYsFXEWbkqOGjZlB+No1OypDbdqm VkN9XqMpYRi4CTvJlxCXD/2/5Uy14Rg2ZfF75vQ8HNG0BjN4YcrQKW8OaVbyWF0MQJLm UXhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Sn6z9vLcdAf8nDd+RMz512NMIv7pEH2FTLcfE8Ec8VY=; b=lXkAgRh+6NIdPcip0PvkGkSVeuYSdOUYziRBCRIDe0FBj3L05U0vWBa9RrkbJJzJ6h GR+JY6rEPfFSHryoFe2t0YQgRb3PXylfkjKRSMNP/Sf8uauZFmbi/1m7uu3HLu0n2auA XynUIYWz+YhsvoIKB/nKy552YcvlzqHvmNEt13g7SFlASzJBCJ2Nzp2cU8/pTP0nXF6S k6mJqIEMIqIdCr5y7xaekWyIwtHZmgAm2poZIDD5OXTWD0PpUXpiEo9tfiRiC6AiFkk+ Bwwgs/EsqhU0DMN6KtWqQ1VHnR4F6fTT/N7+VhM9HiUH4mUT1EFD20bHoekOevjqHroe g+vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kE2LQDxE; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a170906a18300b0073d71124609si6969618ejy.182.2022.11.07.10.04.40; Mon, 07 Nov 2022 10:05:05 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=kE2LQDxE; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231754AbiKGRua (ORCPT + 93 others); Mon, 7 Nov 2022 12:50:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231753AbiKGRu0 (ORCPT ); Mon, 7 Nov 2022 12:50:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AA5F201A1; Mon, 7 Nov 2022 09:50:23 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id DA75C611DC; Mon, 7 Nov 2022 17:50:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30D21C433D7; Mon, 7 Nov 2022 17:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667843422; bh=X/8V0nAcFr0+vvZNgkQz91zumxxBgy8u33dDByEsG+E=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=kE2LQDxEVYPfS8uwOaKIm+PdR5F5waMX8d2P10VQJSAhTJ0C+Ggd0nLWPNMVLS/qa FWwP7B4RqqInfvceoLGiOXkHOiccR0ZfaG8E5viRUGBn6XQnr2N7mTjQ16f2+wB11Z 3+GuuAFcI3JhvUqoXSLT6+j7VzeKSgrle8sFxma1YSIHSycf53aX7IDi0iy+AjOxbo hGoB1ABfaq+dLE1BoO5txJ0nzIItoD8k6SQ2bdeDjvhAFfQjS7m8dkYZRQeOp3MD+t Tc44WFojMx8mkv9hHi7UDOLGnfyz3jWomygsdW1b7SBwARJnWvfvcAZwJrygfoQcAN LUXkth5NGcsxA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 45E1B5C095F; Mon, 7 Nov 2022 09:50:20 -0800 (PST) Date: Mon, 7 Nov 2022 09:50:20 -0800 From: "Paul E. McKenney" To: Akira Yokosawa Cc: Bagas Sanjaya , corbet@lwn.net, frederic@kernel.org, jiangshanlai@gmail.com, joel@joelfernandes.org, josh@joshtriplett.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, mathieu.desnoyers@efficios.com, quic_neeraju@quicinc.com, rcu@vger.kernel.org, rostedt@goodmis.org, sfr@canb.auug.org.au Subject: Re: [PATCH] Documentation: RCU: use code blocks with autogenerated line (was: Re: linux-next: build warning after merge of the rcu tree) Message-ID: <20221107175020.GK28461@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS 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 Mon, Nov 07, 2022 at 08:48:23PM +0900, Akira Yokosawa wrote: > Hi Bagas, > > On Mon, 7 Nov 2022 16:55:13 +0700, Bagas Sanjaya wrote: > > On Sun, Nov 06, 2022 at 09:02:12PM -0800, Paul E. McKenney wrote: > >> On Mon, Nov 07, 2022 at 02:26:41PM +1100, Stephen Rothwell wrote: > >> > Hi all, > >> > > >> > After merging the rcu tree, today's linux-next build (htmldocs) > >> > produced this warning: > >> > > >> > Documentation/RCU/rcubarrier.rst:205: WARNING: Literal block ends without a blank line; unexpected unindent. > >> > > >> > Introduced by commit > >> > > >> > 21c2e3909721 ("doc: Update rcubarrier.rst") > >> > >> Huh. I guess that numbered code samples are not supposed to have more > >> than nine lines? Ah well, easy to fix by going back to left-justified > >> numbers. I was wondering about that! > >> > > > > I think the proper fix is just let Sphinx generates line number: > > That might be true if all you care about were the generated documents, > but we need to pay attention to readers of .rst files as plain-text. > > There are a bunch of references to line numbers in RCU documents. > If explicit line numbers are removed from snippets, such readers need > to count the lines by themselves, which doesn't sound reasonable to me. > > If you can put labels to referenced lines within code snippets, auto > generation of line numbers might work, but as far as I know, Sphinx > doesn't provide such a nice feature. > > Of course, you can prove me wrong. I will give Bagas a few days to prove Akira wrong. ;-) Either way, thank you both for looking into this! Thanx, Paul