[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180317091530.GA18271@tanglefoot>
Date: Sat, 17 Mar 2018 09:15:41 +0000
From: Justin Skists <j.skists@...il.com>
To: devel@...verdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
James Simmons <jsimmons@...radead.org>,
NeilBrown <neilb@...e.com>, Patrick Farrell <paf@...y.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] staging: lustre: Fix unneeded byte-ordering cast
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@...il.com>
---
drivers/staging/lustre/lnet/lnet/acceptor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lnet/lnet/acceptor.c b/drivers/staging/lustre/lnet/lnet/acceptor.c
index fb478e20e204..13e981781b9a 100644
--- a/drivers/staging/lustre/lnet/lnet/acceptor.c
+++ b/drivers/staging/lustre/lnet/lnet/acceptor.c
@@ -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";
--
2.16.2
Powered by blists - more mailing lists