On Friday 15 July 2005 00:04, Christoph Hellwig wrote:
> normally we prefer a patch per actual change, not per file so the
> description fits. Given that all these are pretty trivial fixes one
> patch would have done it aswell, though.
>
> With these changes the code is fine for mainline in my opinion.
Can I make one more nitpicking comment?
All these functions can use cpu_to_le*() and le*_to_cpu().
> --- /dev/null
> +++ 25-akpm/fs/9p/conv.c
> +static inline void buf_put_int16(struct cbuf *buf, u16 val)
> +{
> + buf_check_sizev(buf, 2);
> +
> + buf->p[0] = val;
> + buf->p[1] = val >> 8;
> + buf->p += 2;
> +}
> +
> +static inline void buf_put_int32(struct cbuf *buf, u32 val)
> +{
> + buf_check_sizev(buf, 4);
> +
> + buf->p[0] = val;
> + buf->p[1] = val >> 8;
> + buf->p[2] = val >> 16;
> + buf->p[3] = val >> 24;
> + buf->p += 4;
> +}
> +
> +static inline void buf_put_int64(struct cbuf *buf, u64 val)
> +{
> + buf_check_sizev(buf, 8);
> +
> + buf->p[0] = val;
> + buf->p[1] = val >> 8;
> + buf->p[2] = val >> 16;
> + buf->p[3] = val >> 24;
> + buf->p[4] = val >> 32;
> + buf->p[5] = val >> 40;
> + buf->p[6] = val >> 48;
> + buf->p[7] = val >> 56;
> + buf->p += 8;
> +}
> +static inline u16 buf_get_int16(struct cbuf *buf)
> +{
> + u16 ret = 0;
> +
> + buf_check_size(buf, 2);
> + ret = buf->p[0] | (buf->p[1] << 8);
> +
> + buf->p += 2;
> +
> + return ret;
> +}
> +
> +static inline u32 buf_get_int32(struct cbuf *buf)
> +{
> + u32 ret = 0;
> +
> + buf_check_size(buf, 4);
> + ret =
> + buf->p[0] | (buf->p[1] << 8) | (buf->p[2] << 16) | (buf->
> + p[3] << 24);
> +
> + buf->p += 4;
> +
> + return ret;
> +}
> +
> +static inline u64 buf_get_int64(struct cbuf *buf)
> +{
> + u64 ret = 0;
> +
> + buf_check_size(buf, 8);
> + ret = (u64) buf->p[0] | ((u64) buf->p[1] << 8) |
> + ((u64) buf->p[2] << 16) | ((u64) buf->p[3] << 24) |
> + ((u64) buf->p[4] << 32) | ((u64) buf->p[5] << 40) |
> + ((u64) buf->p[6] << 48) | ((u64) buf->p[7] << 56);
> +
> + buf->p += 8;
> +
> + return ret;
> +}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|