public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 2/3] xfsprogs: make a couple of structures static
Date: Wed, 18 Dec 2019 15:09:35 -0800	[thread overview]
Message-ID: <20191218230935.GJ7489@magnolia> (raw)
In-Reply-To: <ea404006-44aa-ac0a-6bea-b23fb748e71d@sandeen.net>

On Wed, Dec 18, 2019 at 04:55:38PM -0600, Eric Sandeen wrote:
> From: Eric Sandeen <sandeen@redhat.com>
> 
> Eliminates 2 sparse warnings.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> diff --git a/db/btheight.c b/db/btheight.c
> index 8aa17c89..fdb19a6d 100644
> --- a/db/btheight.c
> +++ b/db/btheight.c
> @@ -22,7 +22,7 @@ static int rmap_maxrecs(struct xfs_mount *mp, int blocklen, int leaf)
>  	return libxfs_rmapbt_maxrecs(blocklen, leaf);
>  }
>  
> -struct btmap {
> +static struct btmap {

Maybe these both should be static const?

--D

>  	const char	*tag;
>  	int		(*maxrecs)(struct xfs_mount *mp, int blocklen,
>  				   int leaf);
> diff --git a/io/bulkstat.c b/io/bulkstat.c
> index 201470b2..05a3d6d6 100644
> --- a/io/bulkstat.c
> +++ b/io/bulkstat.c
> @@ -230,7 +230,7 @@ struct single_map {
>  	uint64_t		code;
>  };
>  
> -struct single_map tags[] = {
> +static struct single_map tags[] = {
>  	{"root", XFS_BULK_IREQ_SPECIAL_ROOT},
>  	{NULL, 0},
>  };
> 

  reply	other threads:[~2019-12-18 23:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 22:53 [PATCH 0/3] xfsprogs: trivial sparse tidyups Eric Sandeen
2019-12-18 22:54 ` [PATCH 1/3] xfsprogs: include headers to fix sparse warnings about statics Eric Sandeen
2019-12-18 23:10   ` Darrick J. Wong
2019-12-18 22:55 ` [PATCH 2/3] xfsprogs: make a couple of structures static Eric Sandeen
2019-12-18 23:09   ` Darrick J. Wong [this message]
2019-12-18 22:56 ` [PATCH 3/3] fsr: remove shadow variable in fsr_setup_attr_fork Eric Sandeen
2019-12-18 23:08   ` 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=20191218230935.GJ7489@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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