[PATCH 01/13] jffs2: Use RTEMS_CONTAINER_OF
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Jun 10 08:20:53 UTC 2022
---
cpukit/libfs/src/jffs2/src/os-rtems.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/libfs/src/jffs2/src/os-rtems.h b/cpukit/libfs/src/jffs2/src/os-rtems.h
index db1be61e67..0bec517691 100644
--- a/cpukit/libfs/src/jffs2/src/os-rtems.h
+++ b/cpukit/libfs/src/jffs2/src/os-rtems.h
@@ -56,7 +56,7 @@ static inline unsigned int full_name_hash(const void *salt, const unsigned char
#define jffs2_can_mark_obsolete(c) (1)
#define JFFS2_INODE_INFO(i) (&(i)->jffs2_i)
-#define OFNI_EDONI_2SFFJ(f) ((struct _inode *) ( ((char *)f) - ((char *)(&((struct _inode *)NULL)->jffs2_i)) ) )
+#define OFNI_EDONI_2SFFJ(f) RTEMS_CONTAINER_OF(f, struct _inode, jffs2_i)
#define ITIME(sec) (sec)
#define I_SEC(tv) (tv)
--
2.35.3
More information about the devel
mailing list