Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1035937iof; Mon, 6 Jun 2022 18:46:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIybqsPPXNAKj0zWKY9J7lWyqP0SNKALugDsGA1zKjKCvegSImtPemNTDlEWWyaMj2wG/G X-Received: by 2002:a05:6402:4255:b0:431:34c3:6018 with SMTP id g21-20020a056402425500b0043134c36018mr15823375edb.146.1654566404593; Mon, 06 Jun 2022 18:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654566404; cv=none; d=google.com; s=arc-20160816; b=OdKPMyaSlmwN2r4BmJIFX87nlE8rJr8ZwpWiitCYKghHQHSwNVE2KIYUjOKKX0slUy r1lm4TTvxsTQULDObhODRGaeD9HwcmiY4gHYRozphhZAkMM5O6Qii2fLG+fVJBHqLycd 0zR6RXwKDvEwOPirmkDzuc9Ghm2yRwjKJYAf1dmOu7Nse7pZdkZJEJF8v8FchCaq2/6G rgXhFwyilqvWJaIFd9PlhVerZbOxmB3Gqu91JC49Iq7qLyEu8T7Bnwop2BlWq2d5OphR HE+1YtZWd9lbHp0O2nZSpdkEO6DdnNw+XUX3EacPQy3z3pQMtSvM+a+9yp3Ny3c481Pv qTCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=g619Vf0VHpcAxy414jyj9QsdidRWcJrQpWcX3OGfz+8=; b=s8naKwX2ELidFYHER1ypOsq+sJi7RB3XJ6xS54ij6x5jiI3POqOPa9JnRWbHDU4w2G oro20cObAWqSaXY4bjuWLSX5ScANbgew+R28fxsXF+eMiwOyvhZXps6uzKXP/nzdBgDK kuGQh5HLG4Cg52FiuYmcVplc5lwaReFXEwUSONZQgPR6vQVYiZ2WzEmR3LmZHAga/E5l gSvtNNKRgdg9cg32B7rVvn6VR8zckfxdQ/HK5YtBJegAfuAh90QAfWKMKPENcPDH1R3s aSdU8qsUgeGgjfPD+nXDNc9vY0JS80lxRD2kqQbONC/eP+I7xlpphdy4DV9QbEcnvSQ0 CjWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="RVz/7eMq"; dkim=neutral (no key) header.i=@suse.de header.b=3aBg6XUv; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b22-20020a17090636d600b006fedebfbfdcsi16805099ejc.239.2022.06.06.18.46.10; Mon, 06 Jun 2022 18:46:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@suse.de header.s=susede2_rsa header.b="RVz/7eMq"; dkim=neutral (no key) header.i=@suse.de header.b=3aBg6XUv; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232845AbiFGBHU (ORCPT + 99 others); Mon, 6 Jun 2022 21:07:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235568AbiFGBHU (ORCPT ); Mon, 6 Jun 2022 21:07:20 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C2EAF5A9 for ; Mon, 6 Jun 2022 18:07:19 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 37AC11F995; Tue, 7 Jun 2022 01:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1654564038; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g619Vf0VHpcAxy414jyj9QsdidRWcJrQpWcX3OGfz+8=; b=RVz/7eMqavAPGK5pV7MvEqchiyPIyzcHpLGuNxxzNnRtV9sCD0xR15kwDXnCRut00pxyvG DrDKlSzorW9HKptIQyxFMiK6qsNpkqYUhjS8u7JD5Ro9uI363NW5mLz4XZa5yOMZZ4S3zN 33z6IABdlKcm+8xqZrlj4VQBGL6KhPU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1654564038; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g619Vf0VHpcAxy414jyj9QsdidRWcJrQpWcX3OGfz+8=; b=3aBg6XUvWhZHfNdx57kz9AEFidzeXzkX0T++H1QTG8Icjy1SG6yt1CM4gMLWpQ/GttqQ+2 50OfT0Uw2KUcPCAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 567CB13A5F; Tue, 7 Jun 2022 01:07:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id JxRpBMWknmLdFQAAMHmgww (envelope-from ); Tue, 07 Jun 2022 01:07:17 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 From: "NeilBrown" To: "Chuck Lever" Cc: linux-nfs@vger.kernel.org Subject: Re: [PATCH v1 4/5] SUNRPC: Clean up xdr_get_next_encode_buffer() In-reply-to: <165445912444.1664.7733109680322574177.stgit@bazille.1015granger.net> References: <165445865736.1664.4497130284832282034.stgit@bazille.1015granger.net>, <165445912444.1664.7733109680322574177.stgit@bazille.1015granger.net> Date: Tue, 07 Jun 2022 11:07:13 +1000 Message-id: <165456403303.22243.14012939379410947473@noble.neil.brown.name> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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-nfs@vger.kernel.org On Mon, 06 Jun 2022, Chuck Lever wrote: > The value of @p is not used until the "location of the next item" is > computed. Help human readers by moving its initial assignment to the > paragraph where that value is used and by clarifying the antecedents > in the documenting comment. >=20 > Signed-off-by: Chuck Lever Reviewed-by: NeilBrown > --- > net/sunrpc/xdr.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) >=20 > diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c > index de8f71468637..89cb48931a1f 100644 > --- a/net/sunrpc/xdr.c > +++ b/net/sunrpc/xdr.c > @@ -971,6 +971,7 @@ static noinline __be32 *xdr_get_next_encode_buffer(stru= ct xdr_stream *xdr, > xdr->buf->page_len +=3D frag1bytes; > xdr->page_ptr++; > xdr->iov =3D NULL; > + > /* > * If the last encode didn't end exactly on a page boundary, the > * next one will straddle boundaries. Encode into the next > @@ -979,11 +980,12 @@ static noinline __be32 *xdr_get_next_encode_buffer(st= ruct xdr_stream *xdr, > * space at the end of the previous buffer: > */ > xdr_set_scratch_buffer(xdr, xdr->p, frag1bytes); > - p =3D page_address(*xdr->page_ptr); > + > /* > - * Note this is where the next encode will start after we've > - * shifted this one back: > + * xdr->p is where the next encode will start after > + * xdr_commit_encode() has shifted this one back: > */ > + p =3D page_address(*xdr->page_ptr); > xdr->p =3D (void *)p + frag2bytes; > space_left =3D xdr->buf->buflen - xdr->buf->len; > if (space_left - nbytes >=3D PAGE_SIZE) >=20 >=20 >=20