Skip to content

Commit

Permalink
nfsd: use correct enum type in decode_cb_op_status
Browse files Browse the repository at this point in the history
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>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Stefan Agner authored and J. Bruce Fields committed Apr 3, 2018
1 parent 51d87bc commit 47299f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 47299f7

Please sign in to comment.