@@ -232,19 +232,19 @@ static inline void be64_add_cpu(__be64 *a, __s64 b)
*a = cpu_to_be64(be64_to_cpu(*a) + b);
}
-static inline uint16_t get_unaligned_be16(void *p)
+static inline uint16_t get_unaligned_be16(const void *p)
{
- uint8_t *__p = p;
+ const uint8_t *__p = p;
return __p[0] << 8 | __p[1];
}
-static inline uint32_t get_unaligned_be32(void *p)
+static inline uint32_t get_unaligned_be32(const void *p)
{
- uint8_t *__p = p;
+ const uint8_t *__p = p;
return (uint32_t)__p[0] << 24 | __p[1] << 16 | __p[2] << 8 | __p[3];
}
-static inline uint64_t get_unaligned_be64(void *p)
+static inline uint64_t get_unaligned_be64(const void *p)
{
return (uint64_t)get_unaligned_be32(p) << 32 |
get_unaligned_be32(p + 4);
@@ -56,7 +56,7 @@ xfs_bmdr_to_bmbt(
void
xfs_bmbt_disk_get_all(
- struct xfs_bmbt_rec *rec,
+ const struct xfs_bmbt_rec *rec,
struct xfs_bmbt_irec *irec)
{
uint64_t l0 = get_unaligned_be64(&rec->l0);
@@ -90,7 +90,8 @@ extern void xfs_bmdr_to_bmbt(struct xfs_inode *, xfs_bmdr_block_t *, int,
void xfs_bmbt_disk_set_all(struct xfs_bmbt_rec *r, struct xfs_bmbt_irec *s);
extern xfs_filblks_t xfs_bmbt_disk_get_blockcount(const struct xfs_bmbt_rec *r);
extern xfs_fileoff_t xfs_bmbt_disk_get_startoff(const struct xfs_bmbt_rec *r);
-extern void xfs_bmbt_disk_get_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s);
+void xfs_bmbt_disk_get_all(const struct xfs_bmbt_rec *r,
+ struct xfs_bmbt_irec *s);
extern void xfs_bmbt_to_bmdr(struct xfs_mount *, struct xfs_btree_block *, int,
xfs_bmdr_block_t *, int);