Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8f82a4a authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Alex Elder
Browse files

xfs: kill the STATIC_INLINE macro



Remove our own STATIC_INLINE macro.  For small function inside
implementation files just use STATIC and let gcc inline it, and for
those in headers do the normal static inline - they are all small
enough to be inlined for debug builds, too.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <david@fromorbit.com>
Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
parent 5683f53e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ xfs_map_blocks(
	return -xfs_iomap(XFS_I(inode), offset, count, flags, mapp, &nmaps);
}

STATIC_INLINE int
STATIC int
xfs_iomap_valid(
	xfs_iomap_t		*iomapp,
	loff_t			offset)
+3 −3
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ page_region_mask(
	return mask;
}

STATIC_INLINE void
STATIC void
set_page_region(
	struct page	*page,
	size_t		offset,
@@ -161,7 +161,7 @@ set_page_region(
		SetPageUptodate(page);
}

STATIC_INLINE int
STATIC int
test_page_region(
	struct page	*page,
	size_t		offset,
@@ -1113,7 +1113,7 @@ xfs_bdwrite(
	xfs_buf_delwri_queue(bp, 1);
}

STATIC_INLINE void
STATIC void
_xfs_buf_ioend(
	xfs_buf_t		*bp,
	int			schedule)
+0 −18
Original line number Diff line number Diff line
@@ -41,10 +41,6 @@ extern void assfail(char *expr, char *f, int l);
# define STATIC static noinline
#endif

#ifndef STATIC_INLINE
# define STATIC_INLINE static inline
#endif

#else /* DEBUG */

#define ASSERT(expr)	\
@@ -54,19 +50,5 @@ extern void assfail(char *expr, char *f, int l);
# define STATIC noinline
#endif

/*
 * We stop inlining of inline functions in debug mode.
 * Unfortunately, this means static inline in header files
 * get multiple definitions, so they need to remain static.
 * This then gives tonnes of warnings about unused but defined
 * functions, so we need to add the unused attribute to prevent
 * these spurious warnings.
 */
#ifndef STATIC_INLINE
# define STATIC_INLINE static __attribute__ ((unused)) noinline
#endif

#endif /* DEBUG */


#endif  /* __XFS_SUPPORT_DEBUG_H__ */
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ STATIC int xfs_attr_leaf_entsize(xfs_attr_leafblock_t *leaf, int index);
 * If namespace bits don't match return 0.
 * If all match then return 1.
 */
STATIC_INLINE int
STATIC int
xfs_attr_namesp_match(int arg_flags, int ondisk_flags)
{
	return XFS_ATTR_NSP_ONDISK(ondisk_flags) == XFS_ATTR_NSP_ARGS_TO_ONDISK(arg_flags);
+1 −2
Original line number Diff line number Diff line
@@ -98,8 +98,7 @@ xfs_bmdr_to_bmbt(
 * This code must be in sync with the routines xfs_bmbt_get_startoff,
 * xfs_bmbt_get_startblock, xfs_bmbt_get_blockcount and xfs_bmbt_get_state.
 */

STATIC_INLINE void
STATIC void
__xfs_bmbt_get_all(
		__uint64_t l0,
		__uint64_t l1,
Loading