Received: by 10.213.65.68 with SMTP id h4csp789207imn; Tue, 27 Mar 2018 08:48:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/3hboa1w96FEaSq72hXhnAmshM8XtoxWo4d2qZkuWwaQjHXsrBt+K9gI85P/HfcUJQ1dJv X-Received: by 10.98.93.149 with SMTP id n21mr11561306pfj.222.1522165703241; Tue, 27 Mar 2018 08:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522165703; cv=none; d=google.com; s=arc-20160816; b=cVLg/3dbD6eBediaOGPlC4VOVzAe45MUFBngGSe6Gr2oWBblUKPz3hHBvy2+OaH9a0 Oc1FhFKPFfbs2mdvN/MbzbHA3baw8BKQguWi/2r1Ay6nPFzEmNHAJlf5zxtE6ADKN8HT cdO0mmjpYVtB5yqDgvxQINTU92tc+Qm6uVjr1RShbgbEauHLcQa9h042LkqhmdOnnzrm aCWb3ROQaVLsaSUqwscPsNC0B+S4QD9/9fJpJzTw8O+tHi3pmXJMjKYVY3hICPC6O1A3 UOHfivNTD6ihQRTlNykj+xBhdNJ7m+3QdImZiJlDJ7HexispTq808enfE0TgHnPHe5ov 3NbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=xAlHaakmIZqXdrLP6EnaKgB5oqjaUmQQ2keTaWizRno=; b=gOxYc3MqvjSLSGtRmaN71TEP8bMMLkYLX2S7/+ZlgcoSXOGiYdmnfoIrLI7N8X/grW Qn6uEcwdgGtMjQKf2p0Er37G3JY/cVSDGC5HNVXvs6grC9E738hVolKXpAu76W1v2W53 Mn7eftnezcvM9QcbNbNWhHM1oYJmh6VLQ9jbrmqOi86iVm46TerxCAeMLyurZ2MvHBmy CD8vOcup6qcBpNvFNABJhZT9q56hg+EDQPfjckNS3IMi/qY02VIUv4MiZU4v6BAEQLej AGINfLkPWa3nORSq9Z7BE0dEDUKSBalE7hMf+vfVVMEQJFr+QcswH+Dd4klbp0seW1ve gb0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si1508282plp.252.2018.03.27.08.48.08; Tue, 27 Mar 2018 08:48:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752655AbeC0PrD (ORCPT + 99 others); Tue, 27 Mar 2018 11:47:03 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:42158 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752046AbeC0PrB (ORCPT ); Tue, 27 Mar 2018 11:47:01 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 144FD140A7A90; Tue, 27 Mar 2018 08:47:01 -0700 (PDT) Date: Tue, 27 Mar 2018 11:47:00 -0400 (EDT) Message-Id: <20180327.114700.1341444619952240925.davem@davemloft.net> To: neilb@suse.com Cc: tgraf@suug.ch, herbert@gondor.apana.org.au, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] rhashtable: improve documentation for rhashtable_walk_peek() From: David Miller In-Reply-To: <152210718418.11435.11573013181393548255.stgit@noble> References: <152210688405.11435.13010923693146415942.stgit@noble> <152210718418.11435.11573013181393548255.stgit@noble> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 27 Mar 2018 08:47:01 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: NeilBrown Date: Tue, 27 Mar 2018 10:33:04 +1100 > The documentation for rhashtable_walk_peek() wrong. It claims to > return the *next* entry, whereas it in fact returns the *previous* > entry. > However if no entries have yet been returned - or if the iterator > was reset due to a resize event, then rhashtable_walk_peek() > *does* return the next entry, but also advances the iterator. > > I suspect that this interface should be discarded and the one user > should be changed to not require it. Possibly this patch should be > seen as a first step in that conversation. > > This patch mostly corrects the documentation, but does make a > small code change so that the documentation can be correct without > listing too many special cases. I don't think the one user will > be affected by the code change. > > Signed-off-by: NeilBrown Please mention the "one user" explicitly in both locations where you refer to it in this commit message. Thank you.