Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs there is no reason to use __unused here.



details:   https://anonhg.NetBSD.org/src/rev/9747a4f3d5de
branches:  trunk
changeset: 342829:9747a4f3d5de
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jan 10 16:14:27 2016 +0000

description:
there is no reason to use __unused here.

diffstat:

 sys/ufs/lfs/lfs_accessors.h |  124 ++++++++++++++++++++++----------------------
 1 files changed, 62 insertions(+), 62 deletions(-)

diffs (truncated from 555 to 300 lines):

diff -r e89e562c5275 -r 9747a4f3d5de sys/ufs/lfs/lfs_accessors.h
--- a/sys/ufs/lfs/lfs_accessors.h       Sun Jan 10 15:52:36 2016 +0000
+++ b/sys/ufs/lfs/lfs_accessors.h       Sun Jan 10 16:14:27 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_accessors.h,v 1.41 2016/01/10 02:40:21 dholland Exp $      */
+/*     $NetBSD: lfs_accessors.h,v 1.42 2016/01/10 16:14:27 christos Exp $      */
 
 /*  from NetBSD: lfs.h,v 1.165 2015/07/24 06:59:32 dholland Exp  */
 /*  from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp  */
@@ -255,7 +255,7 @@
 #define LFS_NEXTDIR(fs, dp) \
        ((LFS_DIRHEADER *)((char *)(dp) + lfs_dir_getreclen(fs, dp)))
 
-static __unused inline char *
+static __inline char *
 lfs_dir_nameptr(const STRUCT_LFS *fs, LFS_DIRHEADER *dh)
 {
        if (fs->lfs_is64) {
@@ -265,7 +265,7 @@
        }
 }
 
-static __unused inline uint64_t
+static __inline uint64_t
 lfs_dir_getino(const STRUCT_LFS *fs, const LFS_DIRHEADER *dh)
 {
        if (fs->lfs_is64) {
@@ -285,7 +285,7 @@
        }
 }
 
-static __unused inline uint16_t
+static __inline uint16_t
 lfs_dir_getreclen(const STRUCT_LFS *fs, const LFS_DIRHEADER *dh)
 {
        if (fs->lfs_is64) {
@@ -295,7 +295,7 @@
        }
 }
 
-static __unused inline uint8_t
+static __inline uint8_t
 lfs_dir_gettype(const STRUCT_LFS *fs, const LFS_DIRHEADER *dh)
 {
        if (fs->lfs_is64) {
@@ -308,7 +308,7 @@
        }
 }
 
-static __unused inline uint8_t
+static __inline uint8_t
 lfs_dir_getnamlen(const STRUCT_LFS *fs, const LFS_DIRHEADER *dh)
 {
        if (fs->lfs_is64) {
@@ -322,7 +322,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_dir_setino(STRUCT_LFS *fs, LFS_DIRHEADER *dh, uint64_t ino)
 {
        if (fs->lfs_is64) {
@@ -341,7 +341,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_dir_setreclen(STRUCT_LFS *fs, LFS_DIRHEADER *dh, uint16_t reclen)
 {
        if (fs->lfs_is64) {
@@ -351,7 +351,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_dir_settype(const STRUCT_LFS *fs, LFS_DIRHEADER *dh, uint8_t type)
 {
        if (fs->lfs_is64) {
@@ -365,7 +365,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_dir_setnamlen(const STRUCT_LFS *fs, LFS_DIRHEADER *dh, uint8_t namlen)
 {
        if (fs->lfs_is64) {
@@ -379,7 +379,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_copydirname(STRUCT_LFS *fs, char *dest, const char *src,
                unsigned namlen, unsigned reclen)
 {
@@ -395,7 +395,7 @@
        memset(dest + namlen, '\0', spacelen - namlen);
 }
 
-static __unused inline LFS_DIRHEADER *
+static __inline LFS_DIRHEADER *
 lfs_dirtemplate_dotdot(STRUCT_LFS *fs, union lfs_dirtemplate *dt)
 {
        /* XXX blah, be nice to have a way to do this w/o casts */
@@ -406,7 +406,7 @@
        }
 }
 
-static __unused inline char *
+static __inline char *
 lfs_dirtemplate_dotdotname(STRUCT_LFS *fs, union lfs_dirtemplate *dt)
 {
        if (fs->lfs_is64) {
@@ -434,7 +434,7 @@
 #define DINO_IN_BLOCK(fs, base, ix) \
        ((union lfs_dinode *)((char *)(base) + DINOSIZE(fs) * (ix)))
 
-static __unused inline void
+static __inline void
 lfs_copy_dinode(STRUCT_LFS *fs,
     union lfs_dinode *dst, const union lfs_dinode *src)
 {
@@ -452,7 +452,7 @@
 }
 
 #define LFS_DEF_DINO_ACCESSOR(type, type32, field) \
-       static __unused inline type                             \
+       static __inline type                            \
        lfs_dino_get##field(STRUCT_LFS *fs, union lfs_dinode *dip) \
        {                                                       \
                if (fs->lfs_is64) {                             \
@@ -461,7 +461,7 @@
                        return LFS_SWAP_##type32(fs, dip->u_32.di_##field); \
                }                                               \
        }                                                       \
-       static __unused inline void                             \
+       static __inline void                            \
        lfs_dino_set##field(STRUCT_LFS *fs, union lfs_dinode *dip, type val) \
        {                                                       \
                if (fs->lfs_is64) {                             \
@@ -494,7 +494,7 @@
 /* XXX this should be done differently (it's a fake field) */
 LFS_DEF_DINO_ACCESSOR(uint64_t, int32_t, rdev);
 
-static __unused inline daddr_t
+static __inline daddr_t
 lfs_dino_getdb(STRUCT_LFS *fs, union lfs_dinode *dip, unsigned ix)
 {
        KASSERT(ix < ULFS_NDADDR);
@@ -506,7 +506,7 @@
        }
 }
 
-static __unused inline daddr_t
+static __inline daddr_t
 lfs_dino_getib(STRUCT_LFS *fs, union lfs_dinode *dip, unsigned ix)
 {
        KASSERT(ix < ULFS_NIADDR);
@@ -518,7 +518,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_dino_setdb(STRUCT_LFS *fs, union lfs_dinode *dip, unsigned ix, daddr_t val)
 {
        KASSERT(ix < ULFS_NDADDR);
@@ -529,7 +529,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_dino_setib(STRUCT_LFS *fs, union lfs_dinode *dip, unsigned ix, daddr_t val)
 {
        KASSERT(ix < ULFS_NIADDR);
@@ -541,7 +541,7 @@
 }
 
 /* birthtime is present only in the 64-bit inode */
-static __unused inline void
+static __inline void
 lfs_dino_setbirthtime(STRUCT_LFS *fs, union lfs_dinode *dip,
     const struct timespec *ts)
 {
@@ -557,7 +557,7 @@
  * indirect blocks
  */
 
-static __unused inline daddr_t
+static __inline daddr_t
 lfs_iblock_get(STRUCT_LFS *fs, void *block, unsigned ix)
 {
        if (fs->lfs_is64) {
@@ -571,7 +571,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_iblock_set(STRUCT_LFS *fs, void *block, unsigned ix, daddr_t val)
 {
        if (fs->lfs_is64) {
@@ -713,7 +713,7 @@
        ((FINFO *)((char *)(fip) + FINFO_FULLSIZE(fs, fip)))
 
 #define LFS_DEF_FI_ACCESSOR(type, type32, field) \
-       static __unused inline type                             \
+       static __inline type                            \
        lfs_fi_get##field(STRUCT_LFS *fs, FINFO *fip)           \
        {                                                       \
                if (fs->lfs_is64) {                             \
@@ -722,7 +722,7 @@
                        return fip->u_32.fi_##field;            \
                }                                               \
        }                                                       \
-       static __unused inline void                             \
+       static __inline void                            \
        lfs_fi_set##field(STRUCT_LFS *fs, FINFO *fip, type val) \
        {                                                       \
                if (fs->lfs_is64) {                             \
@@ -741,7 +741,7 @@
 LFS_DEF_FI_ACCESSOR(uint64_t, uint32_t, ino);
 LFS_DEF_FI_ACCESSOR(uint32_t, uint32_t, lastlength);
 
-static __unused inline daddr_t
+static __inline daddr_t
 lfs_fi_getblock(STRUCT_LFS *fs, FINFO *fip, unsigned index)
 {
        void *firstblock;
@@ -755,7 +755,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_fi_setblock(STRUCT_LFS *fs, FINFO *fip, unsigned index, daddr_t blk)
 {
        void *firstblock;
@@ -785,7 +785,7 @@
 #define NTH_IINFO(fs, buf, n) \
        ((IINFO *)((char *)SEGSUM_IINFOSTART(fs, buf) - (n)*IINFOSIZE(fs)))
 
-static __unused inline uint64_t
+static __inline uint64_t
 lfs_ii_getblock(STRUCT_LFS *fs, IINFO *iip)
 {
        if (fs->lfs_is64) {
@@ -795,7 +795,7 @@
        }
 }
 
-static __unused inline void
+static __inline void
 lfs_ii_setblock(STRUCT_LFS *fs, IINFO *iip, uint64_t block)
 {
        if (fs->lfs_is64) {
@@ -848,7 +848,7 @@
 } while (0)
 
 #define LFS_DEF_IF_ACCESSOR(type, type32, field) \
-       static __unused inline type                             \
+       static __inline type                            \
        lfs_if_get##field(STRUCT_LFS *fs, IFILE *ifp)           \
        {                                                       \
                if (fs->lfs_is64) {                             \
@@ -857,7 +857,7 @@
                        return ifp->u_32.if_##field;            \
                }                                               \
        }                                                       \
-       static __unused inline void                             \
+       static __inline void                            \
        lfs_if_set##field(STRUCT_LFS *fs, IFILE *ifp, type val) \
        {                                                       \
                if (fs->lfs_is64) {                             \
@@ -887,7 +887,7 @@
                lfs_sb_getbsize(fs) - 1) >> lfs_sb_getbshift(fs))
 
 #define LFS_DEF_CI_ACCESSOR(type, type32, field) \
-       static __unused inline type                             \
+       static __inline type                            \
        lfs_ci_get##field(STRUCT_LFS *fs, CLEANERINFO *cip)     \
        {                                                       \
                if (fs->lfs_is64) {                             \
@@ -896,7 +896,7 @@
                        return cip->u_32.field;                 \
                }                                               \
        }                                                       \
-       static __unused inline void                             \
+       static __inline void                            \
        lfs_ci_set##field(STRUCT_LFS *fs, CLEANERINFO *cip, type val) \
        {                                                       \
                if (fs->lfs_is64) {                             \
@@ -918,14 +918,14 @@
 LFS_DEF_CI_ACCESSOR(u_int64_t, u_int32_t, free_tail);
 LFS_DEF_CI_ACCESSOR(u_int32_t, u_int32_t, flags);



Home | Main Index | Thread Index | Old Index