Re: [PATCH] lib/crypto: md5: correct header inclusions

From: Herbert Xu

Date: Thu Oct 15 2026 - 00:48:01 EST


Mohamad Raizudeen <raizudeen.kerneldev@xxxxxxxxx> wrote:
> 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>

bitops.h is redundant because kernel.h already includes it.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt