aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-02-17 16:46:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-17 17:34:52 -0500
commit08fe100d91bc09baca9eb22206f6b050286bd43c (patch)
treee7e631a14f9c20e5f4c3c299a1b09f2134f944bd /fs/affs
parente22553e2a25ed3f2a9c874088e0f20cdcd97c7b0 (diff)
fs/affs: fix casting in printed messages
- "inode.i_ino" is "unsigned long", - "loff_t" is always "unsigned long long", - "sector_t" should be cast to "unsigned long long" for printing, - "u32" should not be cast to "unsigned int" for printing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/affs')
-rw-r--r--fs/affs/amigaffs.c6
-rw-r--r--fs/affs/dir.c8
-rw-r--r--fs/affs/file.c36
-rw-r--r--fs/affs/inode.c5
-rw-r--r--fs/affs/namei.c18
5 files changed, 33 insertions, 40 deletions
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index c852f2fa1710..511ab6b12618 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -30,7 +30,7 @@ affs_insert_hash(struct inode *dir, struct buffer_head *bh)
30 ino = bh->b_blocknr; 30 ino = bh->b_blocknr;
31 offset = affs_hash_name(sb, AFFS_TAIL(sb, bh)->name + 1, AFFS_TAIL(sb, bh)->name[0]); 31 offset = affs_hash_name(sb, AFFS_TAIL(sb, bh)->name + 1, AFFS_TAIL(sb, bh)->name[0]);
32 32
33 pr_debug("%s(dir=%u, ino=%d)\n", __func__, (u32)dir->i_ino, ino); 33 pr_debug("%s(dir=%lu, ino=%d)\n", __func__, dir->i_ino, ino);
34 34
35 dir_bh = affs_bread(sb, dir->i_ino); 35 dir_bh = affs_bread(sb, dir->i_ino);
36 if (!dir_bh) 36 if (!dir_bh)
@@ -80,8 +80,8 @@ affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh)
80 sb = dir->i_sb; 80 sb = dir->i_sb;
81 rem_ino = rem_bh->b_blocknr; 81 rem_ino = rem_bh->b_blocknr;
82 offset = affs_hash_name(sb, AFFS_TAIL(sb, rem_bh)->name+1, AFFS_TAIL(sb, rem_bh)->name[0]); 82 offset = affs_hash_name(sb, AFFS_TAIL(sb, rem_bh)->name+1, AFFS_TAIL(sb, rem_bh)->name[0]);
83 pr_debug("%s(dir=%d, ino=%d, hashval=%d)\n", 83 pr_debug("%s(dir=%lu, ino=%d, hashval=%d)\n", __func__, dir->i_ino,
84 __func__, (u32)dir->i_ino, rem_ino, offset); 84 rem_ino, offset);
85 85
86 bh = affs_bread(sb, dir->i_ino); 86 bh = affs_bread(sb, dir->i_ino);
87 if (!bh) 87 if (!bh)
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index 59f07bec92a6..a682892878a8 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -54,8 +54,7 @@ affs_readdir(struct file *file, struct dir_context *ctx)
54 u32 ino; 54 u32 ino;
55 int error = 0; 55 int error = 0;
56 56
57 pr_debug("%s(ino=%lu,f_pos=%lx)\n", 57 pr_debug("%s(ino=%lu,f_pos=%llx)\n", __func__, inode->i_ino, ctx->pos);
58 __func__, inode->i_ino, (unsigned long)ctx->pos);
59 58
60 if (ctx->pos < 2) { 59 if (ctx->pos < 2) {
61 file->private_data = (void *)0; 60 file->private_data = (void *)0;
@@ -117,9 +116,8 @@ inside:
117 116
118 namelen = min(AFFS_TAIL(sb, fh_bh)->name[0], (u8)30); 117 namelen = min(AFFS_TAIL(sb, fh_bh)->name[0], (u8)30);
119 name = AFFS_TAIL(sb, fh_bh)->name + 1; 118 name = AFFS_TAIL(sb, fh_bh)->name + 1;
120 pr_debug("readdir(): dir_emit(\"%.*s\", " 119 pr_debug("readdir(): dir_emit(\"%.*s\", ino=%u), hash=%d, f_pos=%llx\n",
121 "ino=%u), hash=%d, f_pos=%x\n", 120 namelen, name, ino, hash_pos, ctx->pos);
122 namelen, name, ino, hash_pos, (u32)ctx->pos);
123 121
124 if (!dir_emit(ctx, name, namelen, ino, DT_UNKNOWN)) 122 if (!dir_emit(ctx, name, namelen, ino, DT_UNKNOWN))
125 goto done; 123 goto done;
diff --git a/fs/affs/file.c b/fs/affs/file.c
index 8faa6593ca6d..40a024a9b41d 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -299,8 +299,8 @@ affs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_resul
299 struct buffer_head *ext_bh; 299 struct buffer_head *ext_bh;
300 u32 ext; 300 u32 ext;
301 301
302 pr_debug("%s(%u, %lu)\n", 302 pr_debug("%s(%lu, %llu)\n", __func__, inode->i_ino,
303 __func__, (u32)inode->i_ino, (unsigned long)block); 303 (unsigned long long)block);
304 304
305 BUG_ON(block > (sector_t)0x7fffffffUL); 305 BUG_ON(block > (sector_t)0x7fffffffUL);
306 306
@@ -330,8 +330,9 @@ affs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_resul
330 330
331 /* store new block */ 331 /* store new block */
332 if (bh_result->b_blocknr) 332 if (bh_result->b_blocknr)
333 affs_warning(sb, "get_block", "block already set (%lx)", 333 affs_warning(sb, "get_block",
334 (unsigned long)bh_result->b_blocknr); 334 "block already set (%llx)",
335 (unsigned long long)bh_result->b_blocknr);
335 AFFS_BLOCK(sb, ext_bh, block) = cpu_to_be32(blocknr); 336 AFFS_BLOCK(sb, ext_bh, block) = cpu_to_be32(blocknr);
336 AFFS_HEAD(ext_bh)->block_count = cpu_to_be32(block + 1); 337 AFFS_HEAD(ext_bh)->block_count = cpu_to_be32(block + 1);
337 affs_adjust_checksum(ext_bh, blocknr - bh_result->b_blocknr + 1); 338 affs_adjust_checksum(ext_bh, blocknr - bh_result->b_blocknr + 1);
@@ -353,8 +354,8 @@ affs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_resul
353 return 0; 354 return 0;
354 355
355err_big: 356err_big:
356 affs_error(inode->i_sb, "get_block", "strange block request %d", 357 affs_error(inode->i_sb, "get_block", "strange block request %llu",
357 (int)block); 358 (unsigned long long)block);
358 return -EIO; 359 return -EIO;
359err_ext: 360err_ext:
360 // unlock cache 361 // unlock cache
@@ -503,7 +504,7 @@ affs_do_readpage_ofs(struct page *page, unsigned to)
503 u32 bidx, boff, bsize; 504 u32 bidx, boff, bsize;
504 u32 tmp; 505 u32 tmp;
505 506
506 pr_debug("%s(%u, %ld, 0, %d)\n", __func__, (u32)inode->i_ino, 507 pr_debug("%s(%lu, %ld, 0, %d)\n", __func__, inode->i_ino,
507 page->index, to); 508 page->index, to);
508 BUG_ON(to > PAGE_CACHE_SIZE); 509 BUG_ON(to > PAGE_CACHE_SIZE);
509 kmap(page); 510 kmap(page);
@@ -539,7 +540,7 @@ affs_extent_file_ofs(struct inode *inode, u32 newsize)
539 u32 size, bsize; 540 u32 size, bsize;
540 u32 tmp; 541 u32 tmp;
541 542
542 pr_debug("%s(%u, %d)\n", __func__, (u32)inode->i_ino, newsize); 543 pr_debug("%s(%lu, %d)\n", __func__, inode->i_ino, newsize);
543 bsize = AFFS_SB(sb)->s_data_blksize; 544 bsize = AFFS_SB(sb)->s_data_blksize;
544 bh = NULL; 545 bh = NULL;
545 size = AFFS_I(inode)->mmu_private; 546 size = AFFS_I(inode)->mmu_private;
@@ -608,7 +609,7 @@ affs_readpage_ofs(struct file *file, struct page *page)
608 u32 to; 609 u32 to;
609 int err; 610 int err;
610 611
611 pr_debug("%s(%u, %ld)\n", __func__, (u32)inode->i_ino, page->index); 612 pr_debug("%s(%lu, %ld)\n", __func__, inode->i_ino, page->index);
612 to = PAGE_CACHE_SIZE; 613 to = PAGE_CACHE_SIZE;
613 if (((page->index + 1) << PAGE_CACHE_SHIFT) > inode->i_size) { 614 if (((page->index + 1) << PAGE_CACHE_SHIFT) > inode->i_size) {
614 to = inode->i_size & ~PAGE_CACHE_MASK; 615 to = inode->i_size & ~PAGE_CACHE_MASK;
@@ -631,8 +632,8 @@ static int affs_write_begin_ofs(struct file *file, struct address_space *mapping
631 pgoff_t index; 632 pgoff_t index;
632 int err = 0; 633 int err = 0;
633 634
634 pr_debug("%s(%u, %llu, %llu)\n", __func__, (u32)inode->i_ino, 635 pr_debug("%s(%lu, %llu, %llu)\n", __func__, inode->i_ino, pos,
635 (unsigned long long)pos, (unsigned long long)pos + len); 636 pos + len);
636 if (pos > AFFS_I(inode)->mmu_private) { 637 if (pos > AFFS_I(inode)->mmu_private) {
637 /* XXX: this probably leaves a too-big i_size in case of 638 /* XXX: this probably leaves a too-big i_size in case of
638 * failure. Should really be updating i_size at write_end time 639 * failure. Should really be updating i_size at write_end time
@@ -681,9 +682,8 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping,
681 * due to write_begin. 682 * due to write_begin.
682 */ 683 */
683 684
684 pr_debug("%s(%u, %llu, %llu)\n", 685 pr_debug("%s(%lu, %llu, %llu)\n", __func__, inode->i_ino, pos,
685 __func__, (u32)inode->i_ino, (unsigned long long)pos, 686 pos + len);
686 (unsigned long long)pos + len);
687 bsize = AFFS_SB(sb)->s_data_blksize; 687 bsize = AFFS_SB(sb)->s_data_blksize;
688 data = page_address(page); 688 data = page_address(page);
689 689
@@ -831,8 +831,8 @@ affs_truncate(struct inode *inode)
831 struct buffer_head *ext_bh; 831 struct buffer_head *ext_bh;
832 int i; 832 int i;
833 833
834 pr_debug("truncate(inode=%d, oldsize=%u, newsize=%u)\n", 834 pr_debug("truncate(inode=%lu, oldsize=%llu, newsize=%llu)\n",
835 (u32)inode->i_ino, (u32)AFFS_I(inode)->mmu_private, (u32)inode->i_size); 835 inode->i_ino, AFFS_I(inode)->mmu_private, inode->i_size);
836 836
837 last_blk = 0; 837 last_blk = 0;
838 ext = 0; 838 ext = 0;
@@ -863,7 +863,7 @@ affs_truncate(struct inode *inode)
863 if (IS_ERR(ext_bh)) { 863 if (IS_ERR(ext_bh)) {
864 affs_warning(sb, "truncate", 864 affs_warning(sb, "truncate",
865 "unexpected read error for ext block %u (%ld)", 865 "unexpected read error for ext block %u (%ld)",
866 (unsigned int)ext, PTR_ERR(ext_bh)); 866 ext, PTR_ERR(ext_bh));
867 return; 867 return;
868 } 868 }
869 if (AFFS_I(inode)->i_lc) { 869 if (AFFS_I(inode)->i_lc) {
@@ -911,7 +911,7 @@ affs_truncate(struct inode *inode)
911 if (IS_ERR(bh)) { 911 if (IS_ERR(bh)) {
912 affs_warning(sb, "truncate", 912 affs_warning(sb, "truncate",
913 "unexpected read error for last block %u (%ld)", 913 "unexpected read error for last block %u (%ld)",
914 (unsigned int)ext, PTR_ERR(bh)); 914 ext, PTR_ERR(bh));
915 return; 915 return;
916 } 916 }
917 tmp = be32_to_cpu(AFFS_DATA_HEAD(bh)->next); 917 tmp = be32_to_cpu(AFFS_DATA_HEAD(bh)->next);
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index d0609a282e1d..25cb4b43f2f1 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -348,9 +348,8 @@ affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s3
348 u32 block = 0; 348 u32 block = 0;
349 int retval; 349 int retval;
350 350
351 pr_debug("%s(dir=%u, inode=%u, \"%pd\", type=%d)\n", 351 pr_debug("%s(dir=%lu, inode=%lu, \"%pd\", type=%d)\n", __func__,
352 __func__, (u32)dir->i_ino, 352 dir->i_ino, inode->i_ino, dentry, type);
353 (u32)inode->i_ino, dentry, type);
354 353
355 retval = -EIO; 354 retval = -EIO;
356 bh = affs_bread(sb, inode->i_ino); 355 bh = affs_bread(sb, inode->i_ino);
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index bbc38530e924..de84f4d3e9ec 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -248,9 +248,8 @@ affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
248int 248int
249affs_unlink(struct inode *dir, struct dentry *dentry) 249affs_unlink(struct inode *dir, struct dentry *dentry)
250{ 250{
251 pr_debug("%s(dir=%d, %lu \"%pd\")\n", 251 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino,
252 __func__, (u32)dir->i_ino, dentry->d_inode->i_ino, 252 dentry->d_inode->i_ino, dentry);
253 dentry);
254 253
255 return affs_remove_header(dentry); 254 return affs_remove_header(dentry);
256} 255}
@@ -317,9 +316,8 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
317int 316int
318affs_rmdir(struct inode *dir, struct dentry *dentry) 317affs_rmdir(struct inode *dir, struct dentry *dentry)
319{ 318{
320 pr_debug("%s(dir=%u, %lu \"%pd\")\n", 319 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino,
321 __func__, (u32)dir->i_ino, dentry->d_inode->i_ino, 320 dentry->d_inode->i_ino, dentry);
322 dentry);
323 321
324 return affs_remove_header(dentry); 322 return affs_remove_header(dentry);
325} 323}
@@ -404,8 +402,7 @@ affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
404{ 402{
405 struct inode *inode = old_dentry->d_inode; 403 struct inode *inode = old_dentry->d_inode;
406 404
407 pr_debug("%s(%u, %u, \"%pd\")\n", 405 pr_debug("%s(%lu, %lu, \"%pd\")\n", __func__, inode->i_ino, dir->i_ino,
408 __func__, (u32)inode->i_ino, (u32)dir->i_ino,
409 dentry); 406 dentry);
410 407
411 return affs_add_entry(dir, inode, dentry, ST_LINKFILE); 408 return affs_add_entry(dir, inode, dentry, ST_LINKFILE);
@@ -419,9 +416,8 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
419 struct buffer_head *bh = NULL; 416 struct buffer_head *bh = NULL;
420 int retval; 417 int retval;
421 418
422 pr_debug("%s(old=%u,\"%pd\" to new=%u,\"%pd\")\n", 419 pr_debug("%s(old=%lu,\"%pd\" to new=%lu,\"%pd\")\n", __func__,
423 __func__, (u32)old_dir->i_ino, old_dentry, 420 old_dir->i_ino, old_dentry, new_dir->i_ino, new_dentry);
424 (u32)new_dir->i_ino, new_dentry);
425 421
426 retval = affs_check_name(new_dentry->d_name.name, 422 retval = affs_check_name(new_dentry->d_name.name,
427 new_dentry->d_name.len, 423 new_dentry->d_name.len,