Skip to content

Commit

Permalink
zonefs: Remove to_attr() helper function
Browse files Browse the repository at this point in the history
to_attr() in zonefs sysfs code is unused, which it causes a warning when
compiling with clang and W=1. Delete it to prevent the warning.

Signed-off-by: Damien Le Moal <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Damien Le Moal committed Nov 16, 2022
1 parent 7dd12d6 commit 61ba9e9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/zonefs/sysfs.c
Original file line number Diff line number Diff line change
@@ -15,11 +15,6 @@ struct zonefs_sysfs_attr {
ssize_t (*show)(struct zonefs_sb_info *sbi, char *buf);
};

static inline struct zonefs_sysfs_attr *to_attr(struct attribute *attr)
{
return container_of(attr, struct zonefs_sysfs_attr, attr);
}

#define ZONEFS_SYSFS_ATTR_RO(name) \
static struct zonefs_sysfs_attr zonefs_sysfs_attr_##name = __ATTR_RO(name)

0 comments on commit 61ba9e9

Please sign in to comment.