]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mtd: spi-nor: explicitly include <linux/math64.h>
authorTudor Ambarus <tudor.ambarus@linaro.org>
Sun, 23 Feb 2025 06:51:10 +0000 (06:51 +0000)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Fri, 7 Mar 2025 06:36:38 +0000 (08:36 +0200)
swp and otp drivers use div_u64 and div64_u64 and rely on implicit
inclusion of <linux/math64.h>.

It is good practice to directly include all headers used, it avoids
implicit dependencies and spurious breakage if someone rearranges
headers and causes the implicit include to vanish.

Include the missing header.

Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20250223-snor-math64-v2-1-6f0313eea331@linaro.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/otp.c
drivers/mtd/spi-nor/swp.c

index 9a729aa3452d23b09a04b08aba7a7b8064525bc8..7d0b145d78d8a95f9959514692d766414d96c867 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <linux/log2.h>
+#include <linux/math64.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/spi-nor.h>
 
index e48c3cff247a87fc6bb4df435f8f3d01f6be33c7..9c9328478d8a5ba3f54de18cda4fae91232cce51 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright (C) 2005, Intec Automation Inc.
  * Copyright (C) 2014, Freescale Semiconductor, Inc.
  */
+#include <linux/math64.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/spi-nor.h>