public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: lustre: Fix unneeded byte-ordering cast
@ 2018-03-17  9:15 Justin Skists
  2018-03-20  1:06 ` NeilBrown
  0 siblings, 1 reply; 3+ messages in thread
From: Justin Skists @ 2018-03-17  9:15 UTC (permalink / raw)
  To: devel; +Cc: Greg Kroah-Hartman, Patrick Farrell, NeilBrown, linux-kernel

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>
---
 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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2018-03-20 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-17  9:15 [PATCH] staging: lustre: Fix unneeded byte-ordering cast Justin Skists
2018-03-20  1:06 ` NeilBrown
2018-03-20 15:50   ` Justin Skists

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox