[PATCH v1 2/3] lib: math: polynomial: Don't use 'proxy' headers

Andy Shevchenko posted 3 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v1 2/3] lib: math: polynomial: Don't use 'proxy' headers
Posted by Andy Shevchenko 1 month, 1 week ago
Update header inclusions to follow IWYU (Include What You Use)
principle.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 lib/math/polynomial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/math/polynomial.c b/lib/math/polynomial.c
index 66d383445fec..805d1de56b9a 100644
--- a/lib/math/polynomial.c
+++ b/lib/math/polynomial.c
@@ -10,7 +10,7 @@
  *
  */
 
-#include <linux/kernel.h>
+#include <linux/export.h>
 #include <linux/module.h>
 #include <linux/polynomial.h>
 
-- 
2.50.1
Re: [PATCH v1 2/3] lib: math: polynomial: Don't use 'proxy' headers
Posted by Kuan-Wei Chiu 1 month, 1 week ago
Hi Andy,

On Fri, Feb 27, 2026 at 08:47:59AM +0100, Andy Shevchenko wrote:
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  lib/math/polynomial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/math/polynomial.c b/lib/math/polynomial.c
> index 66d383445fec..805d1de56b9a 100644
> --- a/lib/math/polynomial.c
> +++ b/lib/math/polynomial.c
> @@ -10,7 +10,7 @@
>   *
>   */
>  
> -#include <linux/kernel.h>
> +#include <linux/export.h>
>  #include <linux/module.h>
>  #include <linux/polynomial.h>

Since polynomial.c uses mult_frac(), perhaps we should also add an
explicit #include <linux/math.h>?

Regards,
Kuan-Wei

>  
> -- 
> 2.50.1
> 
>
Re: [PATCH v1 2/3] lib: math: polynomial: Don't use 'proxy' headers
Posted by Andy Shevchenko 1 month, 1 week ago
On Sat, Feb 28, 2026 at 12:13:34AM +0800, Kuan-Wei Chiu wrote:
> On Fri, Feb 27, 2026 at 08:47:59AM +0100, Andy Shevchenko wrote:
> > Update header inclusions to follow IWYU (Include What You Use)
> > principle.

...

> > -#include <linux/kernel.h>
> > +#include <linux/export.h>
> >  #include <linux/module.h>

#include <linux/math.h>

> >  #include <linux/polynomial.h>
> 
> Since polynomial.c uses mult_frac(), perhaps we should also add an
> explicit #include <linux/math.h>?

Good point! I missed it somehow. Andrew, do you want a new version or can you
amend that in this patch?

Thanks for the review!

-- 
With Best Regards,
Andy Shevchenko