Re: [PATCH] UBIFS: fix compilation warnings

From: Sebastian Andrzej Siewior
Date: Sun Nov 30 2008 - 13:58:29 EST


* 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/