* [PATCH] fix type mismatch in jffs.
@ 2003-09-09 21:44 Stephen Hemminger
2003-09-10 2:40 ` viro
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2003-09-09 21:44 UTC (permalink / raw)
To: jffs-dev; +Cc: linux-kernel
On 2.6.0-test5 jffs generates a warning about type mismatch because it casting a short
to a pointer. Look like an obvious typo.
Builds clean, not tested on real hardware.
diff -Nru a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c
--- a/fs/jffs/inode-v23.c Tue Sep 9 14:41:53 2003
+++ b/fs/jffs/inode-v23.c Tue Sep 9 14:41:53 2003
@@ -1734,7 +1734,7 @@
the device should be read from the flash memory and then
added to the inode's i_rdev member. */
u16 val;
- jffs_read_data(f, (char *)val, 0, 2);
+ jffs_read_data(f, (char *)&val, 0, 2);
init_special_inode(inode, inode->i_mode,
old_decode_dev(val));
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix type mismatch in jffs.
2003-09-09 21:44 [PATCH] fix type mismatch in jffs Stephen Hemminger
@ 2003-09-10 2:40 ` viro
2003-09-10 17:14 ` Geert Uytterhoeven
0 siblings, 1 reply; 8+ messages in thread
From: viro @ 2003-09-10 2:40 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: jffs-dev, linux-kernel, Linus Torvalds
On Tue, Sep 09, 2003 at 02:44:20PM -0700, Stephen Hemminger wrote:
> On 2.6.0-test5 jffs generates a warning about type mismatch because it casting a short
> to a pointer. Look like an obvious typo.
Which it is. Thanks for spotting. Linux, please apply.
> Builds clean, not tested on real hardware.
>
> diff -Nru a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c
> --- a/fs/jffs/inode-v23.c Tue Sep 9 14:41:53 2003
> +++ b/fs/jffs/inode-v23.c Tue Sep 9 14:41:53 2003
> @@ -1734,7 +1734,7 @@
> the device should be read from the flash memory and then
> added to the inode's i_rdev member. */
> u16 val;
> - jffs_read_data(f, (char *)val, 0, 2);
> + jffs_read_data(f, (char *)&val, 0, 2);
> init_special_inode(inode, inode->i_mode,
> old_decode_dev(val));
> }
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix type mismatch in jffs.
2003-09-10 2:40 ` viro
@ 2003-09-10 17:14 ` Geert Uytterhoeven
2003-09-10 18:18 ` viro
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2003-09-10 17:14 UTC (permalink / raw)
To: viro
Cc: Stephen Hemminger, jffs-dev, Linux Kernel Development, Linus Torvalds
On Wed, 10 Sep 2003 viro@parcelfarce.linux.theplanet.co.uk wrote:
> On Tue, Sep 09, 2003 at 02:44:20PM -0700, Stephen Hemminger wrote:
> > On 2.6.0-test5 jffs generates a warning about type mismatch because it casting a short
> > to a pointer. Look like an obvious typo.
>
> Which it is. Thanks for spotting. Linux, please apply.
>
> > Builds clean, not tested on real hardware.
> >
> > diff -Nru a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c
> > --- a/fs/jffs/inode-v23.c Tue Sep 9 14:41:53 2003
> > +++ b/fs/jffs/inode-v23.c Tue Sep 9 14:41:53 2003
> > @@ -1734,7 +1734,7 @@
> > the device should be read from the flash memory and then
> > added to the inode's i_rdev member. */
> > u16 val;
> > - jffs_read_data(f, (char *)val, 0, 2);
> > + jffs_read_data(f, (char *)&val, 0, 2);
> > init_special_inode(inode, inode->i_mode,
> > old_decode_dev(val));
> > }
Is this endian-safe?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix type mismatch in jffs.
2003-09-10 17:14 ` Geert Uytterhoeven
@ 2003-09-10 18:18 ` viro
2003-09-10 18:54 ` Linus Torvalds
0 siblings, 1 reply; 8+ messages in thread
From: viro @ 2003-09-10 18:18 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Stephen Hemminger, jffs-dev, Linux Kernel Development, Linus Torvalds
On Wed, Sep 10, 2003 at 07:14:37PM +0200, Geert Uytterhoeven wrote:
> Is this endian-safe?
JFFS is host-endian. If you want to make it swing both ways - feel free,
but AFAICS it's not worth the trouble.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix type mismatch in jffs.
2003-09-10 18:18 ` viro
@ 2003-09-10 18:54 ` Linus Torvalds
2003-09-10 19:03 ` viro
0 siblings, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2003-09-10 18:54 UTC (permalink / raw)
To: viro
Cc: Geert Uytterhoeven, Stephen Hemminger, jffs-dev,
Linux Kernel Development
On Wed, 10 Sep 2003 viro@parcelfarce.linux.theplanet.co.uk wrote:
>
> JFFS is host-endian. If you want to make it swing both ways - feel free,
Please don't.
Dual-endianness is _evil_.
Admittedly host-endian is stupid too, but it's less stupid than being
dual.
The only sane thing to do is fixed-endianness. I'm sure the m68k people
remember being forced to fix their ext2 partitions back in the bad old
days. It's painful once, but after that, fixed-endian is a lot more
efficient and much simpler to handle.
Linus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix type mismatch in jffs.
2003-09-10 18:54 ` Linus Torvalds
@ 2003-09-10 19:03 ` viro
2003-09-10 19:16 ` Russell King
0 siblings, 1 reply; 8+ messages in thread
From: viro @ 2003-09-10 19:03 UTC (permalink / raw)
To: Linus Torvalds
Cc: Geert Uytterhoeven, Stephen Hemminger, jffs-dev,
Linux Kernel Development
On Wed, Sep 10, 2003 at 11:54:13AM -0700, Linus Torvalds wrote:
>
> On Wed, 10 Sep 2003 viro@parcelfarce.linux.theplanet.co.uk wrote:
> >
> > JFFS is host-endian. If you want to make it swing both ways - feel free,
>
> Please don't.
>
> Dual-endianness is _evil_.
>
> Admittedly host-endian is stupid too, but it's less stupid than being
> dual.
>
> The only sane thing to do is fixed-endianness. I'm sure the m68k people
> remember being forced to fix their ext2 partitions back in the bad old
> days. It's painful once, but after that, fixed-endian is a lot more
> efficient and much simpler to handle.
a) you've snipped the critical part ;-)
b) nobody sane uses that beast these days
c) if somebody wants to grow a private patch - it's their time,
after all...
Seriously, though, by now fs/jffs/* has only one real use - extracting
data from old filesystem. IIRC, there was even a talk about having it go
the way of ext and xiafs. He's dead, Jim...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix type mismatch in jffs.
2003-09-10 19:03 ` viro
@ 2003-09-10 19:16 ` Russell King
2003-09-11 16:50 ` Jörn Engel
0 siblings, 1 reply; 8+ messages in thread
From: Russell King @ 2003-09-10 19:16 UTC (permalink / raw)
To: viro
Cc: Linus Torvalds, Geert Uytterhoeven, Stephen Hemminger, jffs-dev,
Linux Kernel Development
On Wed, Sep 10, 2003 at 08:03:04PM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:
>
> a) you've snipped the critical part ;-)
> b) nobody sane uses that beast these days
> c) if somebody wants to grow a private patch - it's their time,
> after all...
>
> Seriously, though, by now fs/jffs/* has only one real use - extracting
> data from old filesystem. IIRC, there was even a talk about having it go
> the way of ext and xiafs. He's dead, Jim...
It isn't that dead - I get the occasional patch from people wanting to keep
it working, although I really wish people would send them to dwmw2 rather
than myself.
--
Russell King (rmk@arm.linux.org.uk) http://www.arm.linux.org.uk/personal/
Linux kernel maintainer of:
2.6 ARM Linux - http://www.arm.linux.org.uk/
2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] fix type mismatch in jffs.
2003-09-10 19:16 ` Russell King
@ 2003-09-11 16:50 ` Jörn Engel
0 siblings, 0 replies; 8+ messages in thread
From: Jörn Engel @ 2003-09-11 16:50 UTC (permalink / raw)
To: viro, Linus Torvalds, Geert Uytterhoeven, Stephen Hemminger,
jffs-dev, Linux Kernel Development, David Woodhouse
On Wed, 10 September 2003 20:16:07 +0100, Russell King wrote:
> On Wed, Sep 10, 2003 at 08:03:04PM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:
> >
> > Seriously, though, by now fs/jffs/* has only one real use - extracting
> > data from old filesystem. IIRC, there was even a talk about having it go
> > the way of ext and xiafs. He's dead, Jim...
>
> It isn't that dead - I get the occasional patch from people wanting to keep
> it working, although I really wish people would send them to dwmw2 rather
> than myself.
Yes, it still beats jffs2 in cases where people have <=5 flash blocks
and want a r/w filesystem on them. Until David, myself or someone
else finds the time to improve jffs2 for corner cases like this, jffs
has a use - sadly.
Jörn
--
When you close your hand, you own nothing. When you open it up, you
own the whole world.
-- Li Mu Bai in Tiger & Dragon
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-09-11 16:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-09 21:44 [PATCH] fix type mismatch in jffs Stephen Hemminger
2003-09-10 2:40 ` viro
2003-09-10 17:14 ` Geert Uytterhoeven
2003-09-10 18:18 ` viro
2003-09-10 18:54 ` Linus Torvalds
2003-09-10 19:03 ` viro
2003-09-10 19:16 ` Russell King
2003-09-11 16:50 ` Jörn Engel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).