public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/4] xfs: remove typedef xfs_attr_sf_entry_t
Date: Mon, 31 Aug 2020 08:34:36 -0700	[thread overview]
Message-ID: <20200831153436.GC6096@magnolia> (raw)
In-Reply-To: <20200831130423.136509-4-cmaiolino@redhat.com>

On Mon, Aug 31, 2020 at 03:04:22PM +0200, Carlos Maiolino wrote:
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/libxfs/xfs_attr_leaf.c |  4 ++--
>  fs/xfs/libxfs/xfs_attr_sf.h   | 14 +++++++-------
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
> index a8a4e21d19726..bcc76ff298646 100644
> --- a/fs/xfs/libxfs/xfs_attr_leaf.c
> +++ b/fs/xfs/libxfs/xfs_attr_leaf.c
> @@ -736,7 +736,7 @@ xfs_attr_shortform_add(
>  	size = xfs_attr_sf_entsize_byname(args->namelen, args->valuelen);
>  	xfs_idata_realloc(dp, size, XFS_ATTR_FORK);
>  	sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data;
> -	sfe = (xfs_attr_sf_entry_t *)((char *)sf + offset);
> +	sfe = (struct xfs_attr_sf_entry *)((char *)sf + offset);
>  
>  	sfe->namelen = args->namelen;
>  	sfe->valuelen = args->valuelen;
> @@ -838,7 +838,7 @@ int
>  xfs_attr_shortform_lookup(xfs_da_args_t *args)
>  {
>  	xfs_attr_shortform_t *sf;
> -	xfs_attr_sf_entry_t *sfe;
> +	struct xfs_attr_sf_entry *sfe;
>  	int i;
>  	struct xfs_ifork *ifp;
>  
> diff --git a/fs/xfs/libxfs/xfs_attr_sf.h b/fs/xfs/libxfs/xfs_attr_sf.h
> index 48906c5196505..6b09a010940ea 100644
> --- a/fs/xfs/libxfs/xfs_attr_sf.h
> +++ b/fs/xfs/libxfs/xfs_attr_sf.h
> @@ -13,7 +13,6 @@
>   * to fit into the literal area of the inode.
>   */
>  typedef struct xfs_attr_sf_hdr xfs_attr_sf_hdr_t;
> -typedef struct xfs_attr_sf_entry xfs_attr_sf_entry_t;
>  
>  /*
>   * We generate this then sort it, attr_list() must return things in hash-order.
> @@ -31,17 +30,18 @@ typedef struct xfs_attr_sf_sort {
>  	(1 << (NBBY*(int)sizeof(uint8_t)))
>  
>  static inline int xfs_attr_sf_entsize_byname(uint8_t nlen, uint8_t vlen) {
> -	return sizeof(xfs_attr_sf_entry_t) + nlen + vlen;
> +	return sizeof(struct xfs_attr_sf_entry) + nlen + vlen;
>  }
>  
>  /* space an entry uses */
> -static inline int xfs_attr_sf_entsize(xfs_attr_sf_entry_t *sfep) {
> -	return sizeof(xfs_attr_sf_entry_t) + sfep->namelen + sfep->valuelen;
> +static inline int xfs_attr_sf_entsize(struct xfs_attr_sf_entry *sfep) {
> +	return sizeof(struct xfs_attr_sf_entry) +
> +		sfep->namelen + sfep->valuelen;
>  }
>  
> -static inline xfs_attr_sf_entry_t *
> -xfs_attr_sf_nextentry(xfs_attr_sf_entry_t *sfep) {
> -	return (xfs_attr_sf_entry_t *)((char *)(sfep) +
> +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));
>  }
>  #endif	/* __XFS_ATTR_SF_H__ */
> -- 
> 2.26.2
> 

  reply	other threads:[~2020-08-31 15:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31 13:04 [PATCH 0/4] Clean up xfs_attr_sf_entry Carlos Maiolino
2020-08-31 13:04 ` [PATCH 1/4] xfs: Use variable-size array for nameval in xfs_attr_sf_entry Carlos Maiolino
2020-08-31 14:53   ` Eric Sandeen
2020-08-31 14:54     ` Eric Sandeen
2020-08-31 15:31   ` Darrick J. Wong
2020-09-02 11:13     ` Carlos Maiolino
2020-08-31 13:04 ` [PATCH 2/4] xfs: Convert xfs_attr_sf macros to inline functions Carlos Maiolino
2020-08-31 15:34   ` Darrick J. Wong
2020-09-01  7:43     ` Carlos Maiolino
2020-08-31 13:04 ` [PATCH 3/4] xfs: remove typedef xfs_attr_sf_entry_t Carlos Maiolino
2020-08-31 15:34   ` Darrick J. Wong [this message]
2020-08-31 13:04 ` [PATCH 4/4] xfs: Remove typedef xfs_attr_shortform_t Carlos Maiolino
2020-08-31 15:35   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200831153436.GC6096@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=cmaiolino@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox