From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 391E21FF5E3 for ; Mon, 30 Mar 2026 10:49:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774867782; cv=none; b=Bg7LqI5Rpfe6OJtC07vM3zKx1ZWgAzOr7/B6GNbrjsjw8Eh7aYrRZdvw6zHHtCQjr2G+nWnWkApQAHiqNQ84gPd8kwHP+cSbfmPX+yCu5eW6B/zgIq42EV7f2euNa+F7HSmjAlPisxAeVhVtd/F+0WaIANLkd++idUXY+kGRMWk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774867782; c=relaxed/simple; bh=TkWSAOyKf9pHzREC1ZInMjKXj+zxxRlCU5cWRTHk0bs=; h=In-Reply-To:References:To:Cc:Subject:MIME-Version:Content-Type: From:Date:Message-ID; b=dMF0ei4D/P4pxm4zGgGXIpoXg95IErsNoehtT9cReCz1DUNySdbysWLsavSdM2Br9cBaX8TdnWH5zMlLVu6bKRY15Ky/FED5XNwGMxmlqVo7VkqVkQbyF1gKXBZ9qoXTzax16rnegENcAJ5Na0xeXKEDns8xRaxT5A2NZpeTHDA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Za8O/dPl; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Za8O/dPl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774867780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T6CbeBbXEhiNM7kEGDQxi0LjkO7hSdtdP9Ej33IXIkE=; b=Za8O/dPljq+2mdnNwvD96Bgn4Kc/x34FwXSmadNLbF8+tW4MTjcIAv1pKsRQOxAT2v7zk5 KEzNLHChQM6ZgfpAcF64SThMDjv2pmVwnpgkWH4F+8JctWlZ3xpnN8J9Kze4Cl5zYaAX8W diwoFzox4Hl/JIVYFuzBg4moDv7GjlE= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-343-vgCQ4JUgMBOlmC67iSTGSQ-1; Mon, 30 Mar 2026 06:49:37 -0400 X-MC-Unique: vgCQ4JUgMBOlmC67iSTGSQ-1 X-Mimecast-MFC-AGG-ID: vgCQ4JUgMBOlmC67iSTGSQ_1774867775 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5587C195608E; Mon, 30 Mar 2026 10:49:33 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.44.35.245]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4C7AD1955D84; Mon, 30 Mar 2026 10:49:28 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 In-Reply-To: References: <20260326131838.634095-1-dhowells@redhat.com> <20260326131838.634095-5-dhowells@redhat.com> <20260329121208.6092419d@kernel.org> To: Linus Torvalds Cc: dhowells@redhat.com, Jakub Kicinski , netdev@vger.kernel.org, Marc Dionne , "David S. Miller" , Eric Dumazet , Paolo Abeni , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, Mathieu Desnoyers , John Johansen , Minas Harutyunyan , Simon Horman , apparmor@lists.ubuntu.com, linux-usb@vger.kernel.org, stable@kernel.org Subject: Re: [PATCH net v3 04/11] list: Move on_list_rcu() to list.h and add on_list() also Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <972872.1774858862.1@warthog.procyon.org.uk> From: David Howells Date: Mon, 30 Mar 2026 11:49:25 +0100 Message-ID: <1179840.1774867765@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Linus Torvalds wrote: > ... and I do *not* see a huge advantage to a helper function that just wraps > "list_empty()" with another name that is actually *less* descriptive. I don't like list_empty() as the name of the function used to find out whether an entry is on a list. Yes, technically, all it's doing is seeing if the list_head is 'empty', but, linguistically, it looks wrong: the question you're asking is not if the list is empty (you're not looking at the list head), but if the entry is on a list. So if I see in the code: if (list_empty(p)) what is the test actually asking? Note that various other list types in the kernel have separate "is the list empty" and "is the entry on a list" primitives, though, granted, usually because they require separate functions programmatically. Anyway, I'll find a different way to do this, not involving checking the prev pointer. What I don't want to do is hard code "prev == LIST_POISON2" into my stuff. Anything like that really needs to be in list.h. David