Thread (82 messages) 82 messages, 14 authors, 2025-12-01

Re: [PATCH v17 01/47] llist: move llist_{head,node} definition to types.h

flat view

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: 2025-10-02 13:53:33
Also in: dri-devel, linux-arch, linux-block, linux-doc, linux-ext4, linux-fsdevel, linux-i2c, linux-ide, linux-media, linux-mm, linux-nfs, linux-rt-devel, lkml, netdev, rcu

On 2025-10-02 04:24, Greg KH wrote:
On Thu, Oct 02, 2025 at 05:12:01PM +0900, Byungchul Park wrote:
quoted
llist_head and llist_node can be used by some other header files.  For
example, dept for tracking dependencies uses llist in its header.  To
avoid header dependency, move them to types.h.
If you need llist in your code, then include llist.h.  Don't force all
types.h users to do so as there is not a dependency in types.h for
llist.h.

This patch shouldn't be needed as you are hiding "header dependency" for
other files.
I agree that moving this into a catch-all types.h is not what we should
aim for.

However, it's a good practice to move the type declarations to a
separate header file, so code that only cares about type and not
implementation of static inline functions can include just that.

Perhaps we can move struct llist_head and struct llist_node to a new
include/linux/llist_types.h instead ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help