Skip to content

Commit

Permalink
xfs: fix static and extern sparse warnings
Browse files Browse the repository at this point in the history
The kbuild test robot indicated that there were some new sparse
warnings in fs/xfs/xfs_dquot_buf.c. Actually, there were a lot more
that is wasn't warning about, so fix them all up.

Reported-by: kbuild test robot
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
  • Loading branch information
Dave Chinner authored and Ben Myers committed Oct 30, 2013
1 parent a629362 commit 632b89e
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions fs/xfs/xfs_alloc_btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
Expand Down
1 change: 1 addition & 0 deletions fs/xfs/xfs_attr_leaf.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
Expand Down
1 change: 1 addition & 0 deletions fs/xfs/xfs_attr_remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
Expand Down
1 change: 1 addition & 0 deletions fs/xfs/xfs_bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
#include "xfs.h"
#include "xfs_log_format.h"
#include "xfs_bit.h"

/*
* XFS bit manipulation routines, used in non-realtime code.
Expand Down
1 change: 1 addition & 0 deletions fs/xfs/xfs_bmap_btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
Expand Down
2 changes: 1 addition & 1 deletion fs/xfs/xfs_buf_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ xfs_buf_item_init(
* Mark bytes first through last inclusive as dirty in the buf
* item's bitmap.
*/
void
static void
xfs_buf_item_log_segment(
struct xfs_buf_log_item *bip,
uint first,
Expand Down
11 changes: 6 additions & 5 deletions fs/xfs/xfs_da_format.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
Expand Down Expand Up @@ -706,7 +707,7 @@ xfs_dir3_free_hdr_to_disk(
hdr3->nused = cpu_to_be32(from->nused);
}

const struct xfs_dir_ops xfs_dir2_ops = {
static const struct xfs_dir_ops xfs_dir2_ops = {
.sf_entsize = xfs_dir2_sf_entsize,
.sf_nextentry = xfs_dir2_sf_nextentry,
.sf_get_ftype = xfs_dir2_sfe_get_ftype,
Expand Down Expand Up @@ -756,7 +757,7 @@ const struct xfs_dir_ops xfs_dir2_ops = {
.db_to_fdindex = xfs_dir2_db_to_fdindex,
};

const struct xfs_dir_ops xfs_dir2_ftype_ops = {
static const struct xfs_dir_ops xfs_dir2_ftype_ops = {
.sf_entsize = xfs_dir3_sf_entsize,
.sf_nextentry = xfs_dir3_sf_nextentry,
.sf_get_ftype = xfs_dir3_sfe_get_ftype,
Expand Down Expand Up @@ -806,7 +807,7 @@ const struct xfs_dir_ops xfs_dir2_ftype_ops = {
.db_to_fdindex = xfs_dir2_db_to_fdindex,
};

const struct xfs_dir_ops xfs_dir3_ops = {
static const struct xfs_dir_ops xfs_dir3_ops = {
.sf_entsize = xfs_dir3_sf_entsize,
.sf_nextentry = xfs_dir3_sf_nextentry,
.sf_get_ftype = xfs_dir3_sfe_get_ftype,
Expand Down Expand Up @@ -856,14 +857,14 @@ const struct xfs_dir_ops xfs_dir3_ops = {
.db_to_fdindex = xfs_dir3_db_to_fdindex,
};

const struct xfs_dir_ops xfs_dir2_nondir_ops = {
static const struct xfs_dir_ops xfs_dir2_nondir_ops = {
.node_hdr_size = sizeof(struct xfs_da_node_hdr),
.node_hdr_to_disk = xfs_da2_node_hdr_to_disk,
.node_hdr_from_disk = xfs_da2_node_hdr_from_disk,
.node_tree_p = xfs_da2_node_tree_p,
};

const struct xfs_dir_ops xfs_dir3_nondir_ops = {
static const struct xfs_dir_ops xfs_dir3_nondir_ops = {
.node_hdr_size = sizeof(struct xfs_da3_node_hdr),
.node_hdr_to_disk = xfs_da3_node_hdr_to_disk,
.node_hdr_from_disk = xfs_da3_node_hdr_from_disk,
Expand Down
3 changes: 2 additions & 1 deletion fs/xfs/xfs_dquot_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
Expand Down Expand Up @@ -267,7 +268,7 @@ xfs_dquot_buf_read_verify(
* the buffer after the update is done. This ensures that the dquot in the
* buffer always has an up-to-date CRC value.
*/
void
static void
xfs_dquot_buf_write_verify(
struct xfs_buf *bp)
{
Expand Down
1 change: 1 addition & 0 deletions fs/xfs/xfs_ialloc_btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
Expand Down
1 change: 1 addition & 0 deletions fs/xfs/xfs_rtbitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "xfs_buf.h"
#include "xfs_icache.h"
#include "xfs_dinode.h"
#include "xfs_rtalloc.h"


/*
Expand Down
1 change: 1 addition & 0 deletions fs/xfs/xfs_sb.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
Expand Down
2 changes: 1 addition & 1 deletion fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ xfs_restore_resvblks(struct xfs_mount *mp)
* Note: xfs_log_quiesce() stops background log work - the callers must ensure
* it is started again when appropriate.
*/
void
static void
xfs_quiesce_attr(
struct xfs_mount *mp)
{
Expand Down

0 comments on commit 632b89e

Please sign in to comment.