aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-10-29 06:08:43 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-11-06 04:06:31 -0500
commite84461ad9c4f0ff91ab8553596acdb7bf5522df4 (patch)
treee5b17679617466289603df7644d11bd213cef2ff /fs
parente2966cbe8901e3f1c120ef82d29c59db1b3bd882 (diff)
UBIFS: fix compilation warnings
We print 'ino_t' type using '%lu' printk() placeholder, but this results in many warnings when compiling for Alpha platform. Fix this by adding (unsingned long) casts. Fixes these warnings: fs/ubifs/journal.c:693: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/journal.c:1131: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/dir.c:163: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/tnc.c:2680: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/tnc.c:2700: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'ino_t' fs/ubifs/replay.c:1066: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'ino_t' fs/ubifs/orphan.c:108: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/orphan.c:135: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/orphan.c:142: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/orphan.c:154: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/orphan.c:159: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/orphan.c:451: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/orphan.c:539: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/orphan.c:612: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/orphan.c:843: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/orphan.c:856: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/recovery.c:1438: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/recovery.c:1443: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/recovery.c:1475: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/recovery.c:1495: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:105: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t' fs/ubifs/debug.c:105: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t' fs/ubifs/debug.c:110: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t' fs/ubifs/debug.c:110: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t' fs/ubifs/debug.c:114: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t' fs/ubifs/debug.c:114: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t' fs/ubifs/debug.c:118: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t' fs/ubifs/debug.c:118: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'ino_t' fs/ubifs/debug.c:1591: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1671: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1674: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'ino_t' fs/ubifs/debug.c:1680: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1699: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'ino_t' fs/ubifs/debug.c:1788: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'ino_t' fs/ubifs/debug.c:1821: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'ino_t' fs/ubifs/debug.c:1833: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'ino_t' fs/ubifs/debug.c:1924: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1932: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1938: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1945: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1953: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1960: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1967: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1973: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1988: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'ino_t' fs/ubifs/debug.c:1991: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'ino_t' fs/ubifs/debug.c:2009: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'ino_t' Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/debug.c62
-rw-r--r--fs/ubifs/dir.c2
-rw-r--r--fs/ubifs/journal.c8
-rw-r--r--fs/ubifs/orphan.c28
-rw-r--r--fs/ubifs/recovery.c13
-rw-r--r--fs/ubifs/replay.c2
-rw-r--r--fs/ubifs/tnc.c5
7 files changed, 70 insertions, 50 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index f9deccbc90c..510ffa0bbda 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -101,21 +101,24 @@ static void sprintf_key(const struct ubifs_info *c, const union ubifs_key *key,
101 if (c->key_fmt == UBIFS_SIMPLE_KEY_FMT) { 101 if (c->key_fmt == UBIFS_SIMPLE_KEY_FMT) {
102 switch (type) { 102 switch (type) {
103 case UBIFS_INO_KEY: 103 case UBIFS_INO_KEY:
104 sprintf(p, "(%lu, %s)", key_inum(c, key), 104 sprintf(p, "(%lu, %s)", (unsigned long)key_inum(c, key),
105 get_key_type(type)); 105 get_key_type(type));
106 break; 106 break;
107 case UBIFS_DENT_KEY: 107 case UBIFS_DENT_KEY:
108 case UBIFS_XENT_KEY: 108 case UBIFS_XENT_KEY:
109 sprintf(p, "(%lu, %s, %#08x)", key_inum(c, key), 109 sprintf(p, "(%lu, %s, %#08x)",
110 (unsigned long)key_inum(c, key),
110 get_key_type(type), key_hash(c, key)); 111 get_key_type(type), key_hash(c, key));
111 break; 112 break;
112 case UBIFS_DATA_KEY: 113 case UBIFS_DATA_KEY:
113 sprintf(p, "(%lu, %s, %u)", key_inum(c, key), 114 sprintf(p, "(%lu, %s, %u)",
115 (unsigned long)key_inum(c, key),
114 get_key_type(type), key_block(c, key)); 116 get_key_type(type), key_block(c, key));
115 break; 117 break;
116 case UBIFS_TRUN_KEY: 118 case UBIFS_TRUN_KEY:
117 sprintf(p, "(%lu, %s)", 119 sprintf(p, "(%lu, %s)",
118 key_inum(c, key), get_key_type(type)); 120 (unsigned long)key_inum(c, key),
121 get_key_type(type));
119 break; 122 break;
120 default: 123 default:
121 sprintf(p, "(bad key type: %#08x, %#08x)", 124 sprintf(p, "(bad key type: %#08x, %#08x)",
@@ -1589,7 +1592,7 @@ static struct fsck_inode *add_inode(struct ubifs_info *c,
1589 1592
1590 if (inum > c->highest_inum) { 1593 if (inum > c->highest_inum) {
1591 ubifs_err("too high inode number, max. is %lu", 1594 ubifs_err("too high inode number, max. is %lu",
1592 c->highest_inum); 1595 (unsigned long)c->highest_inum);
1593 return ERR_PTR(-EINVAL); 1596 return ERR_PTR(-EINVAL);
1594 } 1597 }
1595 1598
@@ -1668,16 +1671,18 @@ static struct fsck_inode *read_add_inode(struct ubifs_info *c,
1668 ino_key_init(c, &key, inum); 1671 ino_key_init(c, &key, inum);
1669 err = ubifs_lookup_level0(c, &key, &znode, &n); 1672 err = ubifs_lookup_level0(c, &key, &znode, &n);
1670 if (!err) { 1673 if (!err) {
1671 ubifs_err("inode %lu not found in index", inum); 1674 ubifs_err("inode %lu not found in index", (unsigned long)inum);
1672 return ERR_PTR(-ENOENT); 1675 return ERR_PTR(-ENOENT);
1673 } else if (err < 0) { 1676 } else if (err < 0) {
1674 ubifs_err("error %d while looking up inode %lu", err, inum); 1677 ubifs_err("error %d while looking up inode %lu",
1678 err, (unsigned long)inum);
1675 return ERR_PTR(err); 1679 return ERR_PTR(err);
1676 } 1680 }
1677 1681
1678 zbr = &znode->zbranch[n]; 1682 zbr = &znode->zbranch[n];
1679 if (zbr->len < UBIFS_INO_NODE_SZ) { 1683 if (zbr->len < UBIFS_INO_NODE_SZ) {
1680 ubifs_err("bad node %lu node length %d", inum, zbr->len); 1684 ubifs_err("bad node %lu node length %d",
1685 (unsigned long)inum, zbr->len);
1681 return ERR_PTR(-EINVAL); 1686 return ERR_PTR(-EINVAL);
1682 } 1687 }
1683 1688
@@ -1697,7 +1702,7 @@ static struct fsck_inode *read_add_inode(struct ubifs_info *c,
1697 kfree(ino); 1702 kfree(ino);
1698 if (IS_ERR(fscki)) { 1703 if (IS_ERR(fscki)) {
1699 ubifs_err("error %ld while adding inode %lu node", 1704 ubifs_err("error %ld while adding inode %lu node",
1700 PTR_ERR(fscki), inum); 1705 PTR_ERR(fscki), (unsigned long)inum);
1701 return fscki; 1706 return fscki;
1702 } 1707 }
1703 1708
@@ -1786,7 +1791,8 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr,
1786 if (IS_ERR(fscki)) { 1791 if (IS_ERR(fscki)) {
1787 err = PTR_ERR(fscki); 1792 err = PTR_ERR(fscki);
1788 ubifs_err("error %d while processing data node and " 1793 ubifs_err("error %d while processing data node and "
1789 "trying to find inode node %lu", err, inum); 1794 "trying to find inode node %lu",
1795 err, (unsigned long)inum);
1790 goto out_dump; 1796 goto out_dump;
1791 } 1797 }
1792 1798
@@ -1819,7 +1825,8 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr,
1819 if (IS_ERR(fscki)) { 1825 if (IS_ERR(fscki)) {
1820 err = PTR_ERR(fscki); 1826 err = PTR_ERR(fscki);
1821 ubifs_err("error %d while processing entry node and " 1827 ubifs_err("error %d while processing entry node and "
1822 "trying to find inode node %lu", err, inum); 1828 "trying to find inode node %lu",
1829 err, (unsigned long)inum);
1823 goto out_dump; 1830 goto out_dump;
1824 } 1831 }
1825 1832
@@ -1832,7 +1839,7 @@ static int check_leaf(struct ubifs_info *c, struct ubifs_zbranch *zbr,
1832 err = PTR_ERR(fscki); 1839 err = PTR_ERR(fscki);
1833 ubifs_err("error %d while processing entry node and " 1840 ubifs_err("error %d while processing entry node and "
1834 "trying to find parent inode node %lu", 1841 "trying to find parent inode node %lu",
1835 err, inum); 1842 err, (unsigned long)inum);
1836 goto out_dump; 1843 goto out_dump;
1837 } 1844 }
1838 1845
@@ -1923,7 +1930,8 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd)
1923 fscki->references != 1) { 1930 fscki->references != 1) {
1924 ubifs_err("directory inode %lu has %d " 1931 ubifs_err("directory inode %lu has %d "
1925 "direntries which refer it, but " 1932 "direntries which refer it, but "
1926 "should be 1", fscki->inum, 1933 "should be 1",
1934 (unsigned long)fscki->inum,
1927 fscki->references); 1935 fscki->references);
1928 goto out_dump; 1936 goto out_dump;
1929 } 1937 }
@@ -1931,27 +1939,29 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd)
1931 fscki->references != 0) { 1939 fscki->references != 0) {
1932 ubifs_err("root inode %lu has non-zero (%d) " 1940 ubifs_err("root inode %lu has non-zero (%d) "
1933 "direntries which refer it", 1941 "direntries which refer it",
1934 fscki->inum, fscki->references); 1942 (unsigned long)fscki->inum,
1943 fscki->references);
1935 goto out_dump; 1944 goto out_dump;
1936 } 1945 }
1937 if (fscki->calc_sz != fscki->size) { 1946 if (fscki->calc_sz != fscki->size) {
1938 ubifs_err("directory inode %lu size is %lld, " 1947 ubifs_err("directory inode %lu size is %lld, "
1939 "but calculated size is %lld", 1948 "but calculated size is %lld",
1940 fscki->inum, fscki->size, 1949 (unsigned long)fscki->inum,
1941 fscki->calc_sz); 1950 fscki->size, fscki->calc_sz);
1942 goto out_dump; 1951 goto out_dump;
1943 } 1952 }
1944 if (fscki->calc_cnt != fscki->nlink) { 1953 if (fscki->calc_cnt != fscki->nlink) {
1945 ubifs_err("directory inode %lu nlink is %d, " 1954 ubifs_err("directory inode %lu nlink is %d, "
1946 "but calculated nlink is %d", 1955 "but calculated nlink is %d",
1947 fscki->inum, fscki->nlink, 1956 (unsigned long)fscki->inum,
1948 fscki->calc_cnt); 1957 fscki->nlink, fscki->calc_cnt);
1949 goto out_dump; 1958 goto out_dump;
1950 } 1959 }
1951 } else { 1960 } else {
1952 if (fscki->references != fscki->nlink) { 1961 if (fscki->references != fscki->nlink) {
1953 ubifs_err("inode %lu nlink is %d, but " 1962 ubifs_err("inode %lu nlink is %d, but "
1954 "calculated nlink is %d", fscki->inum, 1963 "calculated nlink is %d",
1964 (unsigned long)fscki->inum,
1955 fscki->nlink, fscki->references); 1965 fscki->nlink, fscki->references);
1956 goto out_dump; 1966 goto out_dump;
1957 } 1967 }
@@ -1959,20 +1969,21 @@ static int check_inodes(struct ubifs_info *c, struct fsck_data *fsckd)
1959 if (fscki->xattr_sz != fscki->calc_xsz) { 1969 if (fscki->xattr_sz != fscki->calc_xsz) {
1960 ubifs_err("inode %lu has xattr size %u, but " 1970 ubifs_err("inode %lu has xattr size %u, but "
1961 "calculated size is %lld", 1971 "calculated size is %lld",
1962 fscki->inum, fscki->xattr_sz, 1972 (unsigned long)fscki->inum, fscki->xattr_sz,
1963 fscki->calc_xsz); 1973 fscki->calc_xsz);
1964 goto out_dump; 1974 goto out_dump;
1965 } 1975 }
1966 if (fscki->xattr_cnt != fscki->calc_xcnt) { 1976 if (fscki->xattr_cnt != fscki->calc_xcnt) {
1967 ubifs_err("inode %lu has %u xattrs, but " 1977 ubifs_err("inode %lu has %u xattrs, but "
1968 "calculated count is %lld", fscki->inum, 1978 "calculated count is %lld",
1979 (unsigned long)fscki->inum,
1969 fscki->xattr_cnt, fscki->calc_xcnt); 1980 fscki->xattr_cnt, fscki->calc_xcnt);
1970 goto out_dump; 1981 goto out_dump;
1971 } 1982 }
1972 if (fscki->xattr_nms != fscki->calc_xnms) { 1983 if (fscki->xattr_nms != fscki->calc_xnms) {
1973 ubifs_err("inode %lu has xattr names' size %u, but " 1984 ubifs_err("inode %lu has xattr names' size %u, but "
1974 "calculated names' size is %lld", 1985 "calculated names' size is %lld",
1975 fscki->inum, fscki->xattr_nms, 1986 (unsigned long)fscki->inum, fscki->xattr_nms,
1976 fscki->calc_xnms); 1987 fscki->calc_xnms);
1977 goto out_dump; 1988 goto out_dump;
1978 } 1989 }
@@ -1985,11 +1996,12 @@ out_dump:
1985 ino_key_init(c, &key, fscki->inum); 1996 ino_key_init(c, &key, fscki->inum);
1986 err = ubifs_lookup_level0(c, &key, &znode, &n); 1997 err = ubifs_lookup_level0(c, &key, &znode, &n);
1987 if (!err) { 1998 if (!err) {
1988 ubifs_err("inode %lu not found in index", fscki->inum); 1999 ubifs_err("inode %lu not found in index",
2000 (unsigned long)fscki->inum);
1989 return -ENOENT; 2001 return -ENOENT;
1990 } else if (err < 0) { 2002 } else if (err < 0) {
1991 ubifs_err("error %d while looking up inode %lu", 2003 ubifs_err("error %d while looking up inode %lu",
1992 err, fscki->inum); 2004 err, (unsigned long)fscki->inum);
1993 return err; 2005 return err;
1994 } 2006 }
1995 2007
@@ -2007,7 +2019,7 @@ out_dump:
2007 } 2019 }
2008 2020
2009 ubifs_msg("dump of the inode %lu sitting in LEB %d:%d", 2021 ubifs_msg("dump of the inode %lu sitting in LEB %d:%d",
2010 fscki->inum, zbr->lnum, zbr->offs); 2022 (unsigned long)fscki->inum, zbr->lnum, zbr->offs);
2011 dbg_dump_node(c, ino); 2023 dbg_dump_node(c, ino);
2012 kfree(ino); 2024 kfree(ino);
2013 return -EINVAL; 2025 return -EINVAL;
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index 37a9e604c3e..0422c98e179 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -161,7 +161,7 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir,
161 return ERR_PTR(-EINVAL); 161 return ERR_PTR(-EINVAL);
162 } 162 }
163 ubifs_warn("running out of inode numbers (current %lu, max %d)", 163 ubifs_warn("running out of inode numbers (current %lu, max %d)",
164 c->highest_inum, INUM_WATERMARK); 164 (unsigned long)c->highest_inum, INUM_WATERMARK);
165 } 165 }
166 166
167 inode->i_ino = ++c->highest_inum; 167 inode->i_ino = ++c->highest_inum;
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index 22993f867d1..f91b745908e 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -690,8 +690,9 @@ int ubifs_jnl_write_data(struct ubifs_info *c, const struct inode *inode,
690 int dlen = UBIFS_DATA_NODE_SZ + UBIFS_BLOCK_SIZE * WORST_COMPR_FACTOR; 690 int dlen = UBIFS_DATA_NODE_SZ + UBIFS_BLOCK_SIZE * WORST_COMPR_FACTOR;
691 struct ubifs_inode *ui = ubifs_inode(inode); 691 struct ubifs_inode *ui = ubifs_inode(inode);
692 692
693 dbg_jnl("ino %lu, blk %u, len %d, key %s", key_inum(c, key), 693 dbg_jnl("ino %lu, blk %u, len %d, key %s",
694 key_block(c, key), len, DBGKEY(key)); 694 (unsigned long)key_inum(c, key), key_block(c, key), len,
695 DBGKEY(key));
695 ubifs_assert(len <= UBIFS_BLOCK_SIZE); 696 ubifs_assert(len <= UBIFS_BLOCK_SIZE);
696 697
697 data = kmalloc(dlen, GFP_NOFS); 698 data = kmalloc(dlen, GFP_NOFS);
@@ -1128,7 +1129,8 @@ int ubifs_jnl_truncate(struct ubifs_info *c, const struct inode *inode,
1128 ino_t inum = inode->i_ino; 1129 ino_t inum = inode->i_ino;
1129 unsigned int blk; 1130 unsigned int blk;
1130 1131
1131 dbg_jnl("ino %lu, size %lld -> %lld", inum, old_size, new_size); 1132 dbg_jnl("ino %lu, size %lld -> %lld",
1133 (unsigned long)inum, old_size, new_size);
1132 ubifs_assert(!ui->data_len); 1134 ubifs_assert(!ui->data_len);
1133 ubifs_assert(S_ISREG(inode->i_mode)); 1135 ubifs_assert(S_ISREG(inode->i_mode));
1134 ubifs_assert(mutex_is_locked(&ui->ui_mutex)); 1136 ubifs_assert(mutex_is_locked(&ui->ui_mutex));
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
index 02d3462f4d3..9bd5a43d452 100644
--- a/fs/ubifs/orphan.c
+++ b/fs/ubifs/orphan.c
@@ -105,7 +105,7 @@ int ubifs_add_orphan(struct ubifs_info *c, ino_t inum)
105 list_add_tail(&orphan->list, &c->orph_list); 105 list_add_tail(&orphan->list, &c->orph_list);
106 list_add_tail(&orphan->new_list, &c->orph_new); 106 list_add_tail(&orphan->new_list, &c->orph_new);
107 spin_unlock(&c->orphan_lock); 107 spin_unlock(&c->orphan_lock);
108 dbg_gen("ino %lu", inum); 108 dbg_gen("ino %lu", (unsigned long)inum);
109 return 0; 109 return 0;
110} 110}
111 111
@@ -132,14 +132,16 @@ void ubifs_delete_orphan(struct ubifs_info *c, ino_t inum)
132 else { 132 else {
133 if (o->dnext) { 133 if (o->dnext) {
134 spin_unlock(&c->orphan_lock); 134 spin_unlock(&c->orphan_lock);
135 dbg_gen("deleted twice ino %lu", inum); 135 dbg_gen("deleted twice ino %lu",
136 (unsigned long)inum);
136 return; 137 return;
137 } 138 }
138 if (o->cnext) { 139 if (o->cnext) {
139 o->dnext = c->orph_dnext; 140 o->dnext = c->orph_dnext;
140 c->orph_dnext = o; 141 c->orph_dnext = o;
141 spin_unlock(&c->orphan_lock); 142 spin_unlock(&c->orphan_lock);
142 dbg_gen("delete later ino %lu", inum); 143 dbg_gen("delete later ino %lu",
144 (unsigned long)inum);
143 return; 145 return;
144 } 146 }
145 rb_erase(p, &c->orph_tree); 147 rb_erase(p, &c->orph_tree);
@@ -151,12 +153,12 @@ void ubifs_delete_orphan(struct ubifs_info *c, ino_t inum)
151 } 153 }
152 spin_unlock(&c->orphan_lock); 154 spin_unlock(&c->orphan_lock);
153 kfree(o); 155 kfree(o);
154 dbg_gen("inum %lu", inum); 156 dbg_gen("inum %lu", (unsigned long)inum);
155 return; 157 return;
156 } 158 }
157 } 159 }
158 spin_unlock(&c->orphan_lock); 160 spin_unlock(&c->orphan_lock);
159 dbg_err("missing orphan ino %lu", inum); 161 dbg_err("missing orphan ino %lu", (unsigned long)inum);
160 dbg_dump_stack(); 162 dbg_dump_stack();
161} 163}
162 164
@@ -448,7 +450,7 @@ static void erase_deleted(struct ubifs_info *c)
448 rb_erase(&orphan->rb, &c->orph_tree); 450 rb_erase(&orphan->rb, &c->orph_tree);
449 list_del(&orphan->list); 451 list_del(&orphan->list);
450 c->tot_orphans -= 1; 452 c->tot_orphans -= 1;
451 dbg_gen("deleting orphan ino %lu", orphan->inum); 453 dbg_gen("deleting orphan ino %lu", (unsigned long)orphan->inum);
452 kfree(orphan); 454 kfree(orphan);
453 } 455 }
454 c->orph_dnext = NULL; 456 c->orph_dnext = NULL;
@@ -536,8 +538,8 @@ static int insert_dead_orphan(struct ubifs_info *c, ino_t inum)
536 list_add_tail(&orphan->list, &c->orph_list); 538 list_add_tail(&orphan->list, &c->orph_list);
537 orphan->dnext = c->orph_dnext; 539 orphan->dnext = c->orph_dnext;
538 c->orph_dnext = orphan; 540 c->orph_dnext = orphan;
539 dbg_mnt("ino %lu, new %d, tot %d", 541 dbg_mnt("ino %lu, new %d, tot %d", (unsigned long)inum,
540 inum, c->new_orphans, c->tot_orphans); 542 c->new_orphans, c->tot_orphans);
541 return 0; 543 return 0;
542} 544}
543 545
@@ -609,7 +611,8 @@ static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb,
609 n = (le32_to_cpu(orph->ch.len) - UBIFS_ORPH_NODE_SZ) >> 3; 611 n = (le32_to_cpu(orph->ch.len) - UBIFS_ORPH_NODE_SZ) >> 3;
610 for (i = 0; i < n; i++) { 612 for (i = 0; i < n; i++) {
611 inum = le64_to_cpu(orph->inos[i]); 613 inum = le64_to_cpu(orph->inos[i]);
612 dbg_rcvry("deleting orphaned inode %lu", inum); 614 dbg_rcvry("deleting orphaned inode %lu",
615 (unsigned long)inum);
613 err = ubifs_tnc_remove_ino(c, inum); 616 err = ubifs_tnc_remove_ino(c, inum);
614 if (err) 617 if (err)
615 return err; 618 return err;
@@ -840,8 +843,8 @@ static int dbg_orphan_check(struct ubifs_info *c, struct ubifs_zbranch *zbr,
840 if (inum != ci->last_ino) { 843 if (inum != ci->last_ino) {
841 /* Lowest node type is the inode node, so it comes first */ 844 /* Lowest node type is the inode node, so it comes first */
842 if (key_type(c, &zbr->key) != UBIFS_INO_KEY) 845 if (key_type(c, &zbr->key) != UBIFS_INO_KEY)
843 ubifs_err("found orphan node ino %lu, type %d", inum, 846 ubifs_err("found orphan node ino %lu, type %d",
844 key_type(c, &zbr->key)); 847 (unsigned long)inum, key_type(c, &zbr->key));
845 ci->last_ino = inum; 848 ci->last_ino = inum;
846 ci->tot_inos += 1; 849 ci->tot_inos += 1;
847 err = ubifs_tnc_read_node(c, zbr, ci->node); 850 err = ubifs_tnc_read_node(c, zbr, ci->node);
@@ -853,7 +856,8 @@ static int dbg_orphan_check(struct ubifs_info *c, struct ubifs_zbranch *zbr,
853 /* Must be recorded as an orphan */ 856 /* Must be recorded as an orphan */
854 if (!dbg_find_check_orphan(&ci->root, inum) && 857 if (!dbg_find_check_orphan(&ci->root, inum) &&
855 !dbg_find_orphan(c, inum)) { 858 !dbg_find_orphan(c, inum)) {
856 ubifs_err("missing orphan, ino %lu", inum); 859 ubifs_err("missing orphan, ino %lu",
860 (unsigned long)inum);
857 ci->missing += 1; 861 ci->missing += 1;
858 } 862 }
859 } 863 }
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
index bed97421b97..90acac603e6 100644
--- a/fs/ubifs/recovery.c
+++ b/fs/ubifs/recovery.c
@@ -1435,13 +1435,13 @@ static int fix_size_in_place(struct ubifs_info *c, struct size_entry *e)
1435 err = ubi_leb_change(c->ubi, lnum, c->sbuf, len, UBI_UNKNOWN); 1435 err = ubi_leb_change(c->ubi, lnum, c->sbuf, len, UBI_UNKNOWN);
1436 if (err) 1436 if (err)
1437 goto out; 1437 goto out;
1438 dbg_rcvry("inode %lu at %d:%d size %lld -> %lld ", e->inum, lnum, offs, 1438 dbg_rcvry("inode %lu at %d:%d size %lld -> %lld ",
1439 i_size, e->d_size); 1439 (unsigned long)e->inum, lnum, offs, i_size, e->d_size);
1440 return 0; 1440 return 0;
1441 1441
1442out: 1442out:
1443 ubifs_warn("inode %lu failed to fix size %lld -> %lld error %d", 1443 ubifs_warn("inode %lu failed to fix size %lld -> %lld error %d",
1444 e->inum, e->i_size, e->d_size, err); 1444 (unsigned long)e->inum, e->i_size, e->d_size, err);
1445 return err; 1445 return err;
1446} 1446}
1447 1447
@@ -1472,7 +1472,8 @@ int ubifs_recover_size(struct ubifs_info *c)
1472 return err; 1472 return err;
1473 if (err == -ENOENT) { 1473 if (err == -ENOENT) {
1474 /* Remove data nodes that have no inode */ 1474 /* Remove data nodes that have no inode */
1475 dbg_rcvry("removing ino %lu", e->inum); 1475 dbg_rcvry("removing ino %lu",
1476 (unsigned long)e->inum);
1476 err = ubifs_tnc_remove_ino(c, e->inum); 1477 err = ubifs_tnc_remove_ino(c, e->inum);
1477 if (err) 1478 if (err)
1478 return err; 1479 return err;
@@ -1493,8 +1494,8 @@ int ubifs_recover_size(struct ubifs_info *c)
1493 return PTR_ERR(inode); 1494 return PTR_ERR(inode);
1494 if (inode->i_size < e->d_size) { 1495 if (inode->i_size < e->d_size) {
1495 dbg_rcvry("ino %lu size %lld -> %lld", 1496 dbg_rcvry("ino %lu size %lld -> %lld",
1496 e->inum, e->d_size, 1497 (unsigned long)e->inum,
1497 inode->i_size); 1498 e->d_size, inode->i_size);
1498 inode->i_size = e->d_size; 1499 inode->i_size = e->d_size;
1499 ubifs_inode(inode)->ui_size = e->d_size; 1500 ubifs_inode(inode)->ui_size = e->d_size;
1500 e->inode = inode; 1501 e->inode = inode;
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index 7399692af85..21f7d047c30 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -1065,7 +1065,7 @@ int ubifs_replay_journal(struct ubifs_info *c)
1065 ubifs_assert(c->bud_bytes <= c->max_bud_bytes || c->need_recovery); 1065 ubifs_assert(c->bud_bytes <= c->max_bud_bytes || c->need_recovery);
1066 dbg_mnt("finished, log head LEB %d:%d, max_sqnum %llu, " 1066 dbg_mnt("finished, log head LEB %d:%d, max_sqnum %llu, "
1067 "highest_inum %lu", c->lhead_lnum, c->lhead_offs, c->max_sqnum, 1067 "highest_inum %lu", c->lhead_lnum, c->lhead_offs, c->max_sqnum,
1068 c->highest_inum); 1068 (unsigned long)c->highest_inum);
1069out: 1069out:
1070 destroy_replay_tree(c); 1070 destroy_replay_tree(c);
1071 destroy_bud_list(c); 1071 destroy_bud_list(c);
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index d27fd918b9c..99e9a744cfd 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -2677,7 +2677,7 @@ int ubifs_tnc_remove_ino(struct ubifs_info *c, ino_t inum)
2677 struct ubifs_dent_node *xent, *pxent = NULL; 2677 struct ubifs_dent_node *xent, *pxent = NULL;
2678 struct qstr nm = { .name = NULL }; 2678 struct qstr nm = { .name = NULL };
2679 2679
2680 dbg_tnc("ino %lu", inum); 2680 dbg_tnc("ino %lu", (unsigned long)inum);
2681 2681
2682 /* 2682 /*
2683 * Walk all extended attribute entries and remove them together with 2683 * Walk all extended attribute entries and remove them together with
@@ -2697,7 +2697,8 @@ int ubifs_tnc_remove_ino(struct ubifs_info *c, ino_t inum)
2697 } 2697 }
2698 2698
2699 xattr_inum = le64_to_cpu(xent->inum); 2699 xattr_inum = le64_to_cpu(xent->inum);
2700 dbg_tnc("xent '%s', ino %lu", xent->name, xattr_inum); 2700 dbg_tnc("xent '%s', ino %lu", xent->name,
2701 (unsigned long)xattr_inum);
2701 2702
2702 nm.name = xent->name; 2703 nm.name = xent->name;
2703 nm.len = le16_to_cpu(xent->nlen); 2704 nm.len = le16_to_cpu(xent->nlen);