> +/* total space in use */ > +static inline int xfs_attr_sf_totsize(struct xfs_inode *dp) { > + struct xfs_attr_shortform *sf = > + (struct xfs_attr_shortform *)dp->i_afp->if_u1.if_data; > + return be16_to_cpu(sf->hdr.totsize); > +} The opening curly brace should go on a line of its own. > +/* space name/value uses */ > +static inline int xfs_attr_sf_entsize_byname(uint8_t nlen, uint8_t vlen) { > + return sizeof(struct xfs_attr_sf_entry) + nlen + vlen; > +} > + > +/* space an entry uses */ > +static inline int xfs_attr_sf_entsize(struct xfs_attr_sf_entry *sfep) { > + return struct_size(sfep, nameval, sfep->namelen + sfep->valuelen); > +} > + > +/* next entry in struct */ > +static inline struct xfs_attr_sf_entry * > +xfs_attr_sf_nextentry(struct xfs_attr_sf_entry *sfep) { > + return (struct xfs_attr_sf_entry *)((char *)(sfep) + > + xfs_attr_sf_entsize(sfep)); > +} Same for these. Also if you cast to void * instead of char * in xfs_attr_sf_nextentry (and gcc extension we make heavy use of), you don't need the case back.