lib/crypto: md5: correct header inclusions
Subsystems (2)
PATCH 1/1 lib/crypto: md5: correct header inclusions
The file uses 'rol32()' inline function (inside the MD5STEP macro) but does not explicitly include <linux/bitops.h>, currently relying on indirect includes.
Also, <linux/unaligned.h> is included but never used, as the code relies on direct pointer casts.
Add the missing <linux/bitops.h> and remove the unused <linux/unaligned.h>.
--- lib/crypto/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/crypto/md5.c +1 -1
@@ -13,10 +13,10 @@#include <crypto/hmac.h> #include <crypto/md5.h> #include <linux/export.h> +#include <linux/bitops.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/string.h> -#include <linux/unaligned.h> #include <linux/wordpart.h> static const struct md5_block_state md5_iv = {
Signature · 1 line
2.53.0
Herbert Xu
maintainerQuoted 20 lines · Mohamad Raizudeen
The file uses '
rol32()' inline function (inside the MD5STEP macro) but does not explicitly include<linux/bitops.h>, currently relying on indirect includes.Also,
<linux/unaligned.h>is included but never used, as the code relies on direct pointer casts.Add the missing
<linux/bitops.h>and remove the unused<linux/unaligned.h>.Signed-off-by Mohamad Raizudeen <[email protected]>---
lib/crypto/md5.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)lib/crypto/md5.c +0
-0
lib/crypto/md5.c line 17
Quoted 5 lines
lib/crypto/md5.c +1
-0@@ -13,10 +13,10 @@#include <crypto/hmac.h> #include <crypto/md5.h> #include <linux/export.h> +#include <linux/bitops.h> #include <linux/kernel.h>
bitops.h is redundant because kernel.h already includes it.
Cheers,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Quoted 29 lines · Herbert Xu
Quoted 20 lines · Mohamad Raizudeen
The file uses '
rol32()' inline function (inside the MD5STEP macro) but does not explicitly include<linux/bitops.h>, currently relying on indirect includes.Also,
<linux/unaligned.h>is included but never used, as the code relies on direct pointer casts.Add the missing
<linux/bitops.h>and remove the unused<linux/unaligned.h>.Signed-off-by Mohamad Raizudeen <[email protected]>---
lib/crypto/md5.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)lib/crypto/md5.c +0
-0lib/crypto/md5.c line 17
Quoted 5 lines
lib/crypto/md5.c +1
-0@@ -13,10 +13,10 @@#include <crypto/hmac.h> #include <crypto/md5.h> #include <linux/export.h> +#include <linux/bitops.h> #include <linux/kernel.h>
bitops.his redundant becausekernel.halready includes it.
Quoted 5 lines
Cheers,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Understood. I will drop the bitops.h addition. I will send a v2 that only removes the unused <linux/unaligned.h> include.
Thanks,
Mohamad Raizudeen