2023-09-14 15:42:09

by Huacai Chen

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] LoongArch: Add missing headers

Hi, Andy,

Thank you for your patch, can this patch solve the problem below?
https://lore.kernel.org/oe-kbuild-all/[email protected]/T/#u

If yes, please add a reference in the commit message. I have
investigated this problem for a long time but failed to solve it.

Huacai

On Thu, Sep 14, 2023 at 6:34 PM Andy Shevchenko
<[email protected]> wrote:
>
> The header uses definitions from sizes.h, include it.
> For __iomem we need the compiler_types.h, include it.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> arch/loongarch/include/asm/addrspace.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/loongarch/include/asm/addrspace.h b/arch/loongarch/include/asm/addrspace.h
> index 5c9c03bdf915..eaf8ac098622 100644
> --- a/arch/loongarch/include/asm/addrspace.h
> +++ b/arch/loongarch/include/asm/addrspace.h
> @@ -10,7 +10,9 @@
> #ifndef _ASM_ADDRSPACE_H
> #define _ASM_ADDRSPACE_H
>
> +#include <linux/compiler_types.h>
> #include <linux/const.h>
> +#include <linux/sizes.h>
>
> #include <asm/loongarch.h>
>
> --
> 2.40.0.1.gaa8946217a0b
>
>


2023-09-14 23:51:54

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] LoongArch: Add missing headers

On Thu, Sep 14, 2023 at 11:25:22PM +0800, Huacai Chen wrote:
> Hi, Andy,
>
> Thank you for your patch, can this patch solve the problem below?
> https://lore.kernel.org/oe-kbuild-all/[email protected]/T/#u

Nope, this just adds missing includes.
No functional change, so warnings will still be there.

> If yes, please add a reference in the commit message. I have
> investigated this problem for a long time but failed to solve it.

--
With Best Regards,
Andy Shevchenko


2023-09-15 00:36:47

by Huacai Chen

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] LoongArch: Add missing headers

Hi, Andy,

On Fri, Sep 15, 2023 at 2:53 AM Andy Shevchenko
<[email protected]> wrote:
>
> On Thu, Sep 14, 2023 at 11:25:22PM +0800, Huacai Chen wrote:
> > Hi, Andy,
> >
> > Thank you for your patch, can this patch solve the problem below?
> > https://lore.kernel.org/oe-kbuild-all/[email protected]/T/#u
>
> Nope, this just adds missing includes.
> No functional change, so warnings will still be there.
But I think a patch should solve a problem. If we don't get a build
error or warning without this patch, does that mean the 'missing'
headers are actually included indirectly?

Huacai

>
> > If yes, please add a reference in the commit message. I have
> > investigated this problem for a long time but failed to solve it.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

2023-09-17 02:49:05

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] LoongArch: Add missing headers

On Fri, Sep 15, 2023 at 08:36:24AM +0800, Huacai Chen wrote:
> On Fri, Sep 15, 2023 at 2:53 AM Andy Shevchenko
> <[email protected]> wrote:
> > On Thu, Sep 14, 2023 at 11:25:22PM +0800, Huacai Chen wrote:

> > > Thank you for your patch, can this patch solve the problem below?
> > > https://lore.kernel.org/oe-kbuild-all/[email protected]/T/#u
> >
> > Nope, this just adds missing includes.
> > No functional change, so warnings will still be there.
> But I think a patch should solve a problem.

No, that problem is static analyser concern, not the compiler nor linker.

> If we don't get a build
> error or warning without this patch, does that mean the 'missing'
> headers are actually included indirectly?

I might be missing something, but I do not see any build error in the above message.

--
With Best Regards,
Andy Shevchenko