From: Stephan Mueller <smueller@chronox.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: kbuild test robot <fengguang.wu@intel.com>,
kbuild-all@01.org, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] DRBG: fix sparse warning for cpu_to_be[32|64]
Date: Tue, 26 Aug 2014 09:32:24 +0200 [thread overview]
Message-ID: <1803846.LZmvEct3qr@myon.chronox.de> (raw)
In-Reply-To: <53fc2da5.AS8xtJ0DprRMVjVq%fengguang.wu@intel.com>
The sparse tool complained that the cpu_to_be[32|64] functions return
__be[32|64] instead of __u32 or __u64. The patch replaces the __u32 and
__u64 with __be32 and __be64.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
---
crypto/drbg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/drbg.c b/crypto/drbg.c
index 9fd239f..39ed918 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -277,7 +277,7 @@ static bool drbg_fips_continuous_test(struct drbg_state *drbg,
static inline void drbg_cpu_to_be32(__u32 val, unsigned char *buf)
{
struct s {
- __u32 conv;
+ __be32 conv;
};
struct s *conversion = (struct s *) buf;
@@ -989,7 +989,7 @@ static int drbg_hash_generate(struct drbg_state *drbg,
int ret = 0;
union {
unsigned char req[8];
- __u64 req_int;
+ __be64 req_int;
} u;
unsigned char prefix = DRBG_PREFIX3;
struct drbg_string data1, data2;
--
1.9.3
next parent reply other threads:[~2014-08-26 7:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <53fc2da5.AS8xtJ0DprRMVjVq%fengguang.wu@intel.com>
2014-08-26 7:32 ` Stephan Mueller [this message]
2014-08-26 7:34 ` [PATCH] DRBG: fix sparse warning for cpu_to_be[32|64] Herbert Xu
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=1803846.LZmvEct3qr@myon.chronox.de \
--to=smueller@chronox.de \
--cc=fengguang.wu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=kbuild-all@01.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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