Skip to content

Commit

Permalink
staging: lustre: Fix unneeded byte-ordering cast
Browse files Browse the repository at this point in the history
Fix sparse warning:

  CHECK   drivers/staging//lustre/lnet/lnet/acceptor.c
drivers/staging//lustre/lnet/lnet/acceptor.c:243:30: warning: cast to
restricted __le32

LNET_PROTO_TCP_MAGIC, as a define, is already CPU byte-ordered when
compared to 'magic', so no need for a cast.

Signed-off-by: Justin Skists <j.skists@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Justin Skists authored and Greg Kroah-Hartman committed Mar 19, 2018
1 parent ad7d95e commit 8078292
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lnet/lnet/acceptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ lnet_accept(struct socket *sock, __u32 magic)
return -EPROTO;
}

if (magic == le32_to_cpu(LNET_PROTO_TCP_MAGIC))
if (magic == LNET_PROTO_TCP_MAGIC)
str = "'old' socknal/tcpnal";
else
str = "unrecognised";
Expand Down

0 comments on commit 8078292

Please sign in to comment.