Received: by 10.213.65.68 with SMTP id h4csp34767imn; Tue, 27 Mar 2018 15:48:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+0dP6GDDbQM36vPvDabB1fnntuAF6d1/C/uwZVuUHXhRAnPlhQK/tOxeGCp/tk55uWlVrd X-Received: by 10.101.73.74 with SMTP id q10mr771641pgs.323.1522190886064; Tue, 27 Mar 2018 15:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522190886; cv=none; d=google.com; s=arc-20160816; b=cPilSYsLAyq2Iq9dUXymDPwh2JBNtuhkN6GMLRouNsyoVEgJVA3TlYsWzMM9ZbmUaB SqIufOjApXy9ph/6blVntLMDWPJshFW2BdP1cKMbL4RFJ902P6vV4+PMLEWJd28tA99c waTDff0gvN0SV9gwz+tjxS0HFscDhxr+3pKJ4W2qyq6x+5l65DgfQHrkthUBdwS6TsVK Thj24TtEgFmC23eVJLBpFaaPlIoF4TDC+NIL82a02gYFNKenVBBuaLoJB2/CHnlLEHsp U5c2XdPFEIfkabDjpZ7ryx65oUoYuh9nuZxLKaGxgqsLQRcU/FRwpkzHTvm7aOB+SaNU YIqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=pxGC2IShISVWzKdyCjbat8E77fS/Oyu29QrV63/m34o=; b=i8OtR4Ce6Wz9pb5INKNQ86koXWscyO5LFFs3w2MRvrUmxSVT9vSC0llHwaXzAHFGH8 P3n+X9I/sLgS7WvIsvL4WLvyZkPRGLWR1PenPQndb4opSqHtFShpB9G2UKzBTD8CWubY qHUMbjiMFLTDrT+4dwQiEYfWxCOQF6namHeWsjFevmVfRLFFcPB3MLDB65t6YmlQSfKX BElvw4+G76/Rsn31XPqPVbmi81IdxZnHN7D17ZcMJat/vqI3e6E7El7Lv4nn3GsTwU4S 0Ah4OzTOc6idXn+OoMWD4KuiXOmPrH/jLxvzL+eIslZq3hJj5bpROdyn46v/vOvvONj9 2WPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K9u6kmzD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si1514504pgn.792.2018.03.27.15.47.51; Tue, 27 Mar 2018 15:48:06 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K9u6kmzD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752538AbeC0Wqt (ORCPT + 99 others); Tue, 27 Mar 2018 18:46:49 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:53086 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901AbeC0Wqr (ORCPT ); Tue, 27 Mar 2018 18:46:47 -0400 Received: by mail-wm0-f68.google.com with SMTP id l9so1537675wmh.2; Tue, 27 Mar 2018 15:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pxGC2IShISVWzKdyCjbat8E77fS/Oyu29QrV63/m34o=; b=K9u6kmzDvCs2nqHo7Fvyj22Zxa5WtJ9a6jl9ga+n6Ng8LW+XuQHQMPjqTIqe4GqJLU AlEBrmlRLjPrvWwHz1nzy8+dA/6JTjILIA3fhMr4EUtS2PU7D3AkbP48y6yT+suiK8Ti 4q5KFZ97vtXMF5gcpoRd2LAyxCqVsmch1W7A6uUwdprADkUT6+02M/I4mZogvBQQV2LN Ijx+Q/gdGvgXezMzOFlxJ8nQW8rtsJFteLWMwqL3DeCPRXXdfrJMaD16OgIDRGueug70 oSF7AttlVLAiWX7ycUAM5PRiTP3K87hCxNzSY5fEIe2pI7BG45h095MTZtd6KKYiwxvr zfeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pxGC2IShISVWzKdyCjbat8E77fS/Oyu29QrV63/m34o=; b=jwma11yORBB8ztKJmDx7qXCIj199ZaF4FshzinNaiWKyIRf/hxEi05YQAq0qnwgh3b uyXEiz/uqLYAWnFnwsVSwpKLFbuxyipznSzbzo04AVdl2rrhKXGTugc4f8+TdK3FCiz/ ClLEv0o+qqEvKfqOcp+Ik4Qqexr2GLjg71iqwB1R4ceOMpWqw7BpufkUL2uRDPzofwTh d1BC9vrZYyzdEbDwxNDa950qW2vu+xsK+Z6nvpwrElu0Au7xYz1fLRSesXIjzEtNIX3t xbPsoQlWu4rnuQZw4wzno6CbfdgpBuAK2LLi/uEZfFDZmJQlKb065faRXP1CZPohLpii 7wvQ== X-Gm-Message-State: AElRT7HfmqPR8gaYIysFxt2wFtswxYbwDrTETWJjQgBzcmn6JG9jwgqZ yBplN0jXqOdGZjtpHkx7PB8OWapNroRfLpbDZd0Dxg== X-Received: by 10.28.87.13 with SMTP id l13mr729755wmb.120.1522190806451; Tue, 27 Mar 2018 15:46:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.157.137 with HTTP; Tue, 27 Mar 2018 15:46:46 -0700 (PDT) In-Reply-To: <152210718418.11435.11573013181393548255.stgit@noble> References: <152210688405.11435.13010923693146415942.stgit@noble> <152210718418.11435.11573013181393548255.stgit@noble> From: =?UTF-8?Q?Andreas_Gr=C3=BCnbacher?= Date: Wed, 28 Mar 2018 00:46:46 +0200 Message-ID: Subject: Re: [PATCH 1/6] rhashtable: improve documentation for rhashtable_walk_peek() To: NeilBrown Cc: Thomas Graf , Herbert Xu , netdev@vger.kernel.org, Linux Kernel Mailing List , Bob Peterson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Neil, 2018-03-27 1:33 GMT+02:00 NeilBrown : > 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. how about I come up with a replacement so that we can remove rhashtable_walk_peek straight away without making it differently broken in the meantime? Thanks, Andreas