Re: [PATCH] UBIFS: fix compilation warnings

Sebastian Andrzej Siewior
2008-11-30T18:58:24Z

* Adrian Hunter | 2008-11-24 12:03:41 [+0200]:

> Doesn't help:
>
> fs/ubifs/journal.c:699: warning: format ???%zu??? expects type
> ???size_t???, but argument 4 has type ???ino_t???
Indeed. BUT:

Is there actually a reason why Alpha is the only arch having
__kernel_ino_t defined as unsigned int instead of unsigned long ?
(except s390 in 32bit mode).

I just checked and I haven't seen anything that would point out that
__kernel_ino_t / ino_t is part of user space API.
What I've found instead is for instance that ext2 relies that ino_t is a
long:

|struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
|{
....
| raw_inode = ext2_get_inode(inode->i_sb, ino, &bh);

and the prototype is:
|static struct ext2_inode *ext2_get_inode(struct super_block *sb, ino_t ino,
| struct buffer_head **p)

So we lose the upper 32bit on Alpha. Unless the whole system is
self-contained and the ext2_iget() user never passes something > ino_t.

Any comments?

Sebastian