All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsd: fix dprintk in nfsd4_encode_getdeviceinfo
@ 2016-09-22 11:19 Jeff Layton
  2016-09-22 16:12 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2016-09-22 11:19 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

nfserr is big-endian, so we should convert it to host-endian before
printing it.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/nfsd/nfs4xdr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 0aa0236a1429..7f8232e32dc7 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -4062,7 +4062,7 @@ nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
 	u32 starting_len = xdr->buf->len, needed_len;
 	__be32 *p;
 
-	dprintk("%s: err %d\n", __func__, nfserr);
+	dprintk("%s: err %d\n", __func__, be32_to_cpu(nfserr));
 	if (nfserr)
 		goto out;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfsd: fix dprintk in nfsd4_encode_getdeviceinfo
  2016-09-22 11:19 [PATCH] nfsd: fix dprintk in nfsd4_encode_getdeviceinfo Jeff Layton
@ 2016-09-22 16:12 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2016-09-22 16:12 UTC (permalink / raw)
  To: Jeff Layton; +Cc: linux-nfs

On Thu, Sep 22, 2016 at 07:19:02AM -0400, Jeff Layton wrote:
> nfserr is big-endian, so we should convert it to host-endian before
> printing it.

Thanks, applying.--b.

> 
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
>  fs/nfsd/nfs4xdr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 0aa0236a1429..7f8232e32dc7 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -4062,7 +4062,7 @@ nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
>  	u32 starting_len = xdr->buf->len, needed_len;
>  	__be32 *p;
>  
> -	dprintk("%s: err %d\n", __func__, nfserr);
> +	dprintk("%s: err %d\n", __func__, be32_to_cpu(nfserr));
>  	if (nfserr)
>  		goto out;
>  
> -- 
> 2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-22 16:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 11:19 [PATCH] nfsd: fix dprintk in nfsd4_encode_getdeviceinfo Jeff Layton
2016-09-22 16:12 ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.