From: Justin Skists <j.skists@gmail.com>
To: devel@driverdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Patrick Farrell <paf@cray.com>, NeilBrown <neilb@suse.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] staging: lustre: Fix unneeded byte-ordering cast
Date: Sat, 17 Mar 2018 09:15:41 +0000 [thread overview]
Message-ID: <20180317091530.GA18271@tanglefoot> (raw)
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
next reply other threads:[~2018-03-17 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-17 9:15 Justin Skists [this message]
2018-03-20 1:06 ` [PATCH] staging: lustre: Fix unneeded byte-ordering cast NeilBrown
2018-03-20 15:50 ` Justin Skists
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180317091530.GA18271@tanglefoot \
--to=j.skists@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.com \
--cc=paf@cray.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox