mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* SquashFS cleanup: container_of over list_entry
@ 2005-05-01 17:04 Blaisorblade
  0 siblings, 0 replies; only message in thread
From: Blaisorblade @ 2005-05-01 17:04 UTC (permalink / raw)
  To: plougher, LKML

Looking at fs/squashfs/inode.c (in the release used on Gentoo) I've found this 
code:

static inline struct squashfs_inode_info *SQUASHFS_I(struct inode *inode)
{
        return list_entry(inode, struct squashfs_inode_info, vfs_inode);
}

>From the cosmetical point of view, shouldn't that be:
        return container_of(inode, struct squashfs_inode_info, vfs_inode);
? The implementation is the same, but the second is clearer (adding a 
definition in the header would be OK if you need that it works on 2.4, if 
that's the reason).

My 2 cents.

Regards.
-- 
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-02 19:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-01 17:04 SquashFS cleanup: container_of over list_entry Blaisorblade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®