Skip to contentSkip to conversation

xfs: add some 'static' annotations

PATCH In review Eric Biggers 2 participants 2 messages Oct 11, 2016 – Oct 15, 2016 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: add some 'static' annotations

sparse reported that several variables and a function were not forward-declared anywhere and therefore should be 'static'.

Found with sparse by running 'make C=2 CF=-D__CHECK_ENDIAN__ fs/xfs/'

---
 fs/xfs/libxfs/xfs_btree.c | 2 +-
 fs/xfs/xfs_sysfs.c        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
fs/xfs/libxfs/xfs_btree.c +1 -1
index aa1752f..b2190ca 100644
@@ -4822,7 +4822,7 @@ xfs_btree_calc_size(
 	return rval;
 }
 
-int
+static int
 xfs_btree_count_blocks_helper(
 	struct xfs_btree_cur	*cur,
 	int			level,
fs/xfs/xfs_sysfs.c +2 -2
index 5f8d55d..276d302 100644
@@ -512,13 +512,13 @@ static struct attribute *xfs_error_attrs[] = {
 };
 
 
-struct kobj_type xfs_error_cfg_ktype = {
+static struct kobj_type xfs_error_cfg_ktype = {
 	.release = xfs_sysfs_release,
 	.sysfs_ops = &xfs_sysfs_ops,
 	.default_attrs = xfs_error_attrs,
 };
 
-struct kobj_type xfs_error_ktype = {
+static struct kobj_type xfs_error_ktype = {
 	.release = xfs_sysfs_release,
 	.sysfs_ops = &xfs_sysfs_ops,
 };
Signature · 1 line
2.8.0.rc3.226.g39d4020