[v1,1/1] util_macros.h: Add missing insclusion

Message ID 20230103121937.32085-1-andriy.shevchenko@linux.intel.com
State New
Headers
Series [v1,1/1] util_macros.h: Add missing insclusion |

Commit Message

Andy Shevchenko Jan. 3, 2023, 12:19 p.m. UTC
  The header is the direct user of definitions from the math.h,
include it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/util_macros.h | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Andrew Morton Jan. 6, 2023, 2:43 a.m. UTC | #1
On Tue,  3 Jan 2023 14:19:37 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> The header is the direct user of definitions from the math.h,
> include it.
> 
> ...
>
> --- a/include/linux/util_macros.h
> +++ b/include/linux/util_macros.h
> @@ -2,6 +2,8 @@
>  #ifndef _LINUX_HELPER_MACROS_H_
>  #define _LINUX_HELPER_MACROS_H_
>  
> +#include <linux/math.h>
> +
>  #define __find_closest(x, a, as, op)					\
>  ({									\
>  	typeof(as) __fc_i, __fc_as = (as) - 1;				\

Does this fix any known build errors, or was it an I-noticed-this thing?
  
Andy Shevchenko Jan. 9, 2023, 10:33 a.m. UTC | #2
On Thu, Jan 05, 2023 at 06:43:54PM -0800, Andrew Morton wrote:
> On Tue,  3 Jan 2023 14:19:37 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

...

> Does this fix any known build errors, or was it an I-noticed-this thing?

Not for my knowledge. It's rather the latter category to prevent such due
to header changes.
  

Patch

diff --git a/include/linux/util_macros.h b/include/linux/util_macros.h
index 72299f261b25..b641ec00be3e 100644
--- a/include/linux/util_macros.h
+++ b/include/linux/util_macros.h
@@ -2,6 +2,8 @@ 
 #ifndef _LINUX_HELPER_MACROS_H_
 #define _LINUX_HELPER_MACROS_H_
 
+#include <linux/math.h>
+
 #define __find_closest(x, a, as, op)					\
 ({									\
 	typeof(as) __fc_i, __fc_as = (as) - 1;				\