diff mbox series

[2/3] drm/panthor: Explicitly include page.h for the {virt, __phys)_to_pfn() defs

Message ID 20240304090812.3941084-3-boris.brezillon@collabora.com (mailing list archive)
State New, archived
Headers show
Series drm/panthor: Fix 3 issues reported by the kernel test bot | expand

Commit Message

Boris Brezillon March 4, 2024, 9:08 a.m. UTC
Something on arm[64] must be including <asm/page.h>, but things fail
to compile on sparc64. Make sure this header is included explicitly
so this driver can be compile-tested on all supported architectures.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403031142.Vl4pW7X6-lkp@intel.com/
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 drivers/gpu/drm/panthor/panthor_device.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Liviu Dudau March 4, 2024, 11:16 a.m. UTC | #1
On Mon, Mar 04, 2024 at 10:08:11AM +0100, Boris Brezillon wrote:
> Something on arm[64] must be including <asm/page.h>, but things fail
> to compile on sparc64. Make sure this header is included explicitly
> so this driver can be compile-tested on all supported architectures.

Is compilation on sparc64 possible because of 'depends on COMPILE_TEST'?
Otherwise it doesn't make sense to try to build this for any arch other
than arm[64].

Regardless, patch looks harmless, so

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202403031142.Vl4pW7X6-lkp@intel.com/
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>  drivers/gpu/drm/panthor/panthor_device.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> index bfe8da4a6e4c..68e467ee458a 100644
> --- a/drivers/gpu/drm/panthor/panthor_device.c
> +++ b/drivers/gpu/drm/panthor/panthor_device.c
> @@ -3,6 +3,8 @@
>  /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
>  /* Copyright 2023 Collabora ltd. */
>  
> +#include <asm/page.h>
> +
>  #include <linux/clk.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_domain.h>
> -- 
> 2.43.0
>
Steven Price March 4, 2024, 12:31 p.m. UTC | #2
On 04/03/2024 09:08, Boris Brezillon wrote:
> Something on arm[64] must be including <asm/page.h>, but things fail
> to compile on sparc64. Make sure this header is included explicitly
> so this driver can be compile-tested on all supported architectures.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202403031142.Vl4pW7X6-lkp@intel.com/
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>

Seems reasonable, although I do wonder if it's right to include a "asm"
header here or if we should pull in something like "linux/mm.h" which
includes asm/page.h. I can find examples of both. Either way:

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
>  drivers/gpu/drm/panthor/panthor_device.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> index bfe8da4a6e4c..68e467ee458a 100644
> --- a/drivers/gpu/drm/panthor/panthor_device.c
> +++ b/drivers/gpu/drm/panthor/panthor_device.c
> @@ -3,6 +3,8 @@
>  /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
>  /* Copyright 2023 Collabora ltd. */
>  
> +#include <asm/page.h>
> +
>  #include <linux/clk.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_domain.h>
Boris Brezillon March 4, 2024, 1:17 p.m. UTC | #3
On Mon, 4 Mar 2024 12:31:23 +0000
Steven Price <steven.price@arm.com> wrote:

> On 04/03/2024 09:08, Boris Brezillon wrote:
> > Something on arm[64] must be including <asm/page.h>, but things fail
> > to compile on sparc64. Make sure this header is included explicitly
> > so this driver can be compile-tested on all supported architectures.
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202403031142.Vl4pW7X6-lkp@intel.com/
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>  
> 
> Seems reasonable, although I do wonder if it's right to include a "asm"
> header here or if we should pull in something like "linux/mm.h" which
> includes asm/page.h. I can find examples of both. Either way:

Actually, I considered including linux/mm.h too, so I'm happy to go for
this option (will fix when applying.

> 
> Reviewed-by: Steven Price <steven.price@arm.com>
> 
> > ---
> >  drivers/gpu/drm/panthor/panthor_device.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> > index bfe8da4a6e4c..68e467ee458a 100644
> > --- a/drivers/gpu/drm/panthor/panthor_device.c
> > +++ b/drivers/gpu/drm/panthor/panthor_device.c
> > @@ -3,6 +3,8 @@
> >  /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
> >  /* Copyright 2023 Collabora ltd. */
> >  
> > +#include <asm/page.h>
> > +
> >  #include <linux/clk.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/pm_domain.h>  
>
Boris Brezillon March 4, 2024, 1:17 p.m. UTC | #4
On Mon, 4 Mar 2024 11:16:48 +0000
Liviu Dudau <liviu.dudau@arm.com> wrote:

> On Mon, Mar 04, 2024 at 10:08:11AM +0100, Boris Brezillon wrote:
> > Something on arm[64] must be including <asm/page.h>, but things fail
> > to compile on sparc64. Make sure this header is included explicitly
> > so this driver can be compile-tested on all supported architectures.  
> 
> Is compilation on sparc64 possible because of 'depends on COMPILE_TEST'?

Yes.

> Otherwise it doesn't make sense to try to build this for any arch other
> than arm[64].
> 
> Regardless, patch looks harmless, so
> 
> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
> 
> Best regards,
> Liviu
> 
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202403031142.Vl4pW7X6-lkp@intel.com/
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > ---
> >  drivers/gpu/drm/panthor/panthor_device.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> > index bfe8da4a6e4c..68e467ee458a 100644
> > --- a/drivers/gpu/drm/panthor/panthor_device.c
> > +++ b/drivers/gpu/drm/panthor/panthor_device.c
> > @@ -3,6 +3,8 @@
> >  /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
> >  /* Copyright 2023 Collabora ltd. */
> >  
> > +#include <asm/page.h>
> > +
> >  #include <linux/clk.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/pm_domain.h>
> > -- 
> > 2.43.0
> >   
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
index bfe8da4a6e4c..68e467ee458a 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -3,6 +3,8 @@ 
 /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
 /* Copyright 2023 Collabora ltd. */
 
+#include <asm/page.h>
+
 #include <linux/clk.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>