[PATCH] lib/crypto: md5: correct header inclusions
From: Mohamad Raizudeen
Date: Wed Oct 14 2026 - 23:39:50 EST
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 <raizudeen.kerneldev@xxxxxxxxx>
---
lib/crypto/md5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/crypto/md5.c b/lib/crypto/md5.c
index 3d2b017a0525..a838bb90103f 100644
--- a/lib/crypto/md5.c
+++ b/lib/crypto/md5.c
@@ -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 = {
--
2.53.0