[PATCH 02/10] xfs: make checksum verifiers consistently return bools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



xfs_verify_cksum returns the result of a comparison, so make it
a bool. xfs_buf_verify_cksum calls it, so make it a bool as well.
Other callers up the callchain from here are already bools.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
 fs/xfs/libxfs/xfs_cksum.h | 2 +-
 fs/xfs/xfs_buf.h          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_cksum.h b/fs/xfs/libxfs/xfs_cksum.h
index 999a290cfd72..1e3802a99867 100644
--- a/fs/xfs/libxfs/xfs_cksum.h
+++ b/fs/xfs/libxfs/xfs_cksum.h
@@ -71,7 +71,7 @@ xfs_update_cksum(char *buffer, size_t length, unsigned long cksum_offset)
 /*
  * Helper to verify the checksum for a buffer.
  */
-static inline int
+static inline bool
 xfs_verify_cksum(char *buffer, size_t length, unsigned long cksum_offset)
 {
 	uint32_t crc = xfs_start_cksum_safe(buffer, length, cksum_offset);
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
index b9f5511ea998..5015255b5ede 100644
--- a/fs/xfs/xfs_buf.h
+++ b/fs/xfs/xfs_buf.h
@@ -359,7 +359,7 @@ static inline void xfs_buf_relse(xfs_buf_t *bp)
 	xfs_buf_rele(bp);
 }
 
-static inline int
+static inline bool
 xfs_buf_verify_cksum(struct xfs_buf *bp, unsigned long cksum_offset)
 {
 	return xfs_verify_cksum(bp->b_addr, BBTOB(bp->b_length),
-- 
2.17.0





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux