diff mbox series

[10/8] libxfs: remove duplicate attr function declarations

Message ID 20200130181330.GY3447196@magnolia (mailing list archive)
State Accepted, archived
Headers show
Series xfsprogs: random fixes | expand

Commit Message

Darrick J. Wong Jan. 30, 2020, 6:13 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Remove these function declarations since they're in libxfs/xfs_attr.h
and are therefore redundant.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 libxfs/libxfs_priv.h |    8 --------
 1 file changed, 8 deletions(-)

Comments

Christoph Hellwig Jan. 30, 2020, 6:17 p.m. UTC | #1
On Thu, Jan 30, 2020 at 10:13:30AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Remove these function declarations since they're in libxfs/xfs_attr.h
> and are therefore redundant.

Looks fine - in fact I have these removals in my attr series, just
piecemail..

Reviewed-by: Christoph Hellwig <hch@lst.de>
Eric Sandeen Jan. 30, 2020, 6:28 p.m. UTC | #2
On 1/30/20 12:13 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Remove these function declarations since they're in libxfs/xfs_attr.h
> and are therefore redundant.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Is it worth keeping this exporting hack around to make static checkers
happy if it's just one more thing to keep up to date in userspace?

-Eric
Darrick J. Wong Jan. 30, 2020, 6:40 p.m. UTC | #3
On Thu, Jan 30, 2020 at 12:28:43PM -0600, Eric Sandeen wrote:
> On 1/30/20 12:13 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Remove these function declarations since they're in libxfs/xfs_attr.h
> > and are therefore redundant.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Is it worth keeping this exporting hack around to make static checkers
> happy if it's just one more thing to keep up to date in userspace?

Probably?  It depends on how much you like culling known false positives
when you run smatch/sparse against xfsprogs.

(I for one don't mind not having to remember that stuff...)

--D

> -Eric
Eric Sandeen Jan. 30, 2020, 6:48 p.m. UTC | #4
On 1/30/20 12:40 PM, Darrick J. Wong wrote:
> On Thu, Jan 30, 2020 at 12:28:43PM -0600, Eric Sandeen wrote:
>> On 1/30/20 12:13 PM, Darrick J. Wong wrote:
>>> From: Darrick J. Wong <darrick.wong@oracle.com>
>>>
>>> Remove these function declarations since they're in libxfs/xfs_attr.h
>>> and are therefore redundant.
>>>
>>> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>>
>> Is it worth keeping this exporting hack around to make static checkers
>> happy if it's just one more thing to keep up to date in userspace?
> 
> Probably?  It depends on how much you like culling known false positives
> when you run smatch/sparse against xfsprogs.
> 
> (I for one don't mind not having to remember that stuff...)

Ok.  I'm wondering how you guys happened to notice the dups.

Seems like

bool xfs_verify_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno);

can be removed as well, FWIW.

-Eric
diff mbox series

Patch

diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
index 03edf0d3..fe08f96b 100644
--- a/libxfs/libxfs_priv.h
+++ b/libxfs/libxfs_priv.h
@@ -607,14 +607,6 @@  static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
 }
 
 /* Keep static checkers quiet about nonstatic functions by exporting */
-int xfs_inode_hasattr(struct xfs_inode *ip);
-int xfs_attr_get_ilocked(struct xfs_inode *ip, struct xfs_da_args *args);
-int xfs_attr_get(struct xfs_inode *ip, const unsigned char *name,
-                unsigned char **value, int *valuelenp, int flags);
-int xfs_attr_set(struct xfs_inode *dp, const unsigned char *name,
-                 unsigned char *value, int valuelen, int flags);
-int xfs_attr_remove(struct xfs_inode *dp, const unsigned char *name, int flags);
-
 int xfs_rtbuf_get(struct xfs_mount *mp, struct xfs_trans *tp,
 		  xfs_rtblock_t block, int issum, struct xfs_buf **bpp);
 int xfs_rtcheck_range(struct xfs_mount *mp, struct xfs_trans *tp,