Re: [patch] fat/msdos/vfat crud removal

OGAWA Hirofumi
2002-06-09T05:07:46Z

"Albert D. Cahalan" <acahalan@cs.uml.edu> writes:

> OGAWA Hirofumi writes:
> > "Albert D. Cahalan" <acahalan@cs.uml.edu> writes:
>
> >> - * Conversion from and to little-endian byte order. (no-op on i386/i486)
> >> - *
> >> - * Naming: Ca_b_c, where a: F = from, T = to, b: LE = little-endian,
> >> - * BE = big-endian, c: W = word (16 bits), L = longword (32 bits)
> >> - */
> >> -
> >> -#define CF_LE_W(v) le16_to_cpu(v)
> >> -#define CF_LE_L(v) le32_to_cpu(v)
> >> -#define CT_LE_W(v) cpu_to_le16(v)
> >> -#define CT_LE_L(v) cpu_to_le32(v)
> >
> > Personally I think this patch makes code readable. But please don't
> > remove Cx_LE_x macros. Cx_LE_x is used from dosfsck.
>
> Then the macros should be put in dosfsck, which is not
> part of the kernel.

Why do we throw away backward compatible?

> > - logical_sector_size =
> > - le16_to_cpu(get_unaligned((unsigned short *) &b->sector_size));
> > + logical_sector_size = le16_to_cpu(get_unaligned((u16*)&b->sector_size));
>
> I notice lots of casts in the code. It would be better to
> use the correct types to begin with.

No, this field is aliment problem.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>