* [PATCH] nfsd: use correct enum type in decode_cb_op_status
@ 2018-03-19 22:37 Stefan Agner
2018-03-22 20:18 ` J. Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2018-03-19 22:37 UTC (permalink / raw)
To: bfields, jlayton; +Cc: linux-nfs, linux-kernel, Stefan Agner
Use enum nfs_cb_opnum4 in decode_cb_op_status. This fixes warnings
seen with clang:
fs/nfsd/nfs4callback.c:451:36: warning: implicit conversion from
enumeration type 'enum nfs_cb_opnum4' to different enumeration
type 'enum nfs_opnum4' [-Wenum-conversion]
status = decode_cb_op_status(xdr, OP_CB_SEQUENCE, &cb->cb_seq_status);
~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
fs/nfsd/nfs4callback.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 49b0a9e7ff18..1f04d2a70d25 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -223,8 +223,8 @@ static int nfs_cb_stat_to_errno(int status)
return -status;
}
-static int decode_cb_op_status(struct xdr_stream *xdr, enum nfs_opnum4 expected,
- int *status)
+static int decode_cb_op_status(struct xdr_stream *xdr,
+ enum nfs_cb_opnum4 expected, int *status)
{
__be32 *p;
u32 op;
--
2.16.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfsd: use correct enum type in decode_cb_op_status
2018-03-19 22:37 [PATCH] nfsd: use correct enum type in decode_cb_op_status Stefan Agner
@ 2018-03-22 20:18 ` J. Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2018-03-22 20:18 UTC (permalink / raw)
To: Stefan Agner; +Cc: jlayton, linux-nfs, linux-kernel
Applying, thanks!--b.
On Mon, Mar 19, 2018 at 11:37:05PM +0100, Stefan Agner wrote:
> Use enum nfs_cb_opnum4 in decode_cb_op_status. This fixes warnings
> seen with clang:
> fs/nfsd/nfs4callback.c:451:36: warning: implicit conversion from
> enumeration type 'enum nfs_cb_opnum4' to different enumeration
> type 'enum nfs_opnum4' [-Wenum-conversion]
> status = decode_cb_op_status(xdr, OP_CB_SEQUENCE, &cb->cb_seq_status);
> ~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> fs/nfsd/nfs4callback.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index 49b0a9e7ff18..1f04d2a70d25 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -223,8 +223,8 @@ static int nfs_cb_stat_to_errno(int status)
> return -status;
> }
>
> -static int decode_cb_op_status(struct xdr_stream *xdr, enum nfs_opnum4 expected,
> - int *status)
> +static int decode_cb_op_status(struct xdr_stream *xdr,
> + enum nfs_cb_opnum4 expected, int *status)
> {
> __be32 *p;
> u32 op;
> --
> 2.16.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-22 20:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 22:37 [PATCH] nfsd: use correct enum type in decode_cb_op_status Stefan Agner
2018-03-22 20:18 ` 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.