Re: [PATCH RFC 03/13] sunrpc: introduce 32-bit Xcoding helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-08-12 at 18:21 +0300, Benny Halevy wrote:
> To be used instead of WRITE32/READ32.
> 
> Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx>
> ---
>  include/linux/sunrpc/xdr.h |   17 +++++++++++++++++
>  1 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
> index 7da466b..466ea12 100644
> --- a/include/linux/sunrpc/xdr.h
> +++ b/include/linux/sunrpc/xdr.h
> @@ -112,6 +112,23 @@ static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int le
>  }
>  
>  /*
> + * Xcode 32bit quantities
> + */
> +static inline __be32 *
> +xdr_encode_int(__be32 *p, __u32 val)
> +{
> +	*p = cpu_to_be32(val);
> +	return p + 1;
> +}
> +
> +static inline __be32 *
> +xdr_decode_int(__be32 *p, __u32 *valp)
> +{
> +	*valp = be32_to_cpu(*p);
> +	return p + 1;
> +}
> +
> +/*
>   * Decode 64bit quantities (NFSv3 support)
>   */
>  static inline __be32 *

These two functions are completely superfluous. Please just open code
trivial cases like these...

Cheers
  Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux