SquashFS cleanup: container_of over list_entry

From: Blaisorblade
Date: Mon May 02 2005 - 14:15:30 EST


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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/