Re: [linux-next:master] BUILD REGRESSION a54df7622717a40ddec95fd98086aff8ba7839a6

2023-01-24 Thread Mike Kravetz
On 01/24/23 12:28, Andrew Morton wrote:
> On Wed, 25 Jan 2023 00:37:05 +0800 kernel test robot  wrote:
> 
> > tree/branch: 
> > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > branch HEAD: a54df7622717a40ddec95fd98086aff8ba7839a6  Add linux-next 
> > specific files for 20230124
> > 
> > Error/Warning: (recently discovered and may have been fixed)
> > 
> > ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/fsl-edma.ko] 
> > undefined!
> > ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/idma64.ko] 
> > undefined!
> > drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_training.c:1585:38: 
> > warning: variable 'result' set but not used [-Wunused-but-set-variable]
> > 
> > Unverified Error/Warning (likely false positive, please contact us if 
> > interested):
> > 
> > ...
> >
> > mm/hugetlb.c:3100 alloc_hugetlb_folio() error: uninitialized symbol 'h_cg'.
> 
>   hugetlb_cgroup_commit_charge(idx, pages_per_huge_page(h), h_cg, folio);
> 
> The warning looks to be bogus.  I guess we could put a "= NULL" in
> there to keep the compiler quiet?

I took a brief look at that yesterday.

h_cg will be initialized, but not in this routine.  Address of h_cg is passed
to hugetlb_cgroup_charge_cgroup which will ensure h_cg is initialized.  TBH,
I am not sure how the compiler would know this as hugetlb_cgroup_charge_cgroup
is in another file.

IMO, this was not introduced by Sid's changes.  However, I can not explain
why it is showing up now.  Neither can I reproduce with my compiler, otherwise
I would have sent a patch yesterday.

I will send a patch to initialize to NULL to keep compiler quiet.
-- 
Mike Kravetz


Re: [linux-next:master] BUILD REGRESSION a54df7622717a40ddec95fd98086aff8ba7839a6

2023-01-24 Thread Andrew Morton
On Wed, 25 Jan 2023 00:37:05 +0800 kernel test robot  wrote:

> tree/branch: 
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> branch HEAD: a54df7622717a40ddec95fd98086aff8ba7839a6  Add linux-next 
> specific files for 20230124
> 
> Error/Warning: (recently discovered and may have been fixed)
> 
> ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/fsl-edma.ko] 
> undefined!
> ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/idma64.ko] 
> undefined!
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_training.c:1585:38: 
> warning: variable 'result' set but not used [-Wunused-but-set-variable]
> 
> Unverified Error/Warning (likely false positive, please contact us if 
> interested):
> 
> ...
>
> mm/hugetlb.c:3100 alloc_hugetlb_folio() error: uninitialized symbol 'h_cg'.

hugetlb_cgroup_commit_charge(idx, pages_per_huge_page(h), h_cg, folio);

The warning looks to be bogus.  I guess we could put a "= NULL" in
there to keep the compiler quiet?



Re: [linux-next:master] BUILD REGRESSION a54df7622717a40ddec95fd98086aff8ba7839a6

2023-01-24 Thread Mike Kravetz
On 01/24/23 12:42, Sidhartha Kumar wrote:
> On 1/24/23 12:28 PM, Andrew Morton wrote:
> > On Wed, 25 Jan 2023 00:37:05 +0800 kernel test robot  wrote:
> > 
> > > tree/branch: 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > branch HEAD: a54df7622717a40ddec95fd98086aff8ba7839a6  Add linux-next 
> > > specific files for 20230124
> > > 
> > > Error/Warning: (recently discovered and may have been fixed)
> > > 
> > > ERROR: modpost: "devm_platform_ioremap_resource" 
> > > [drivers/dma/fsl-edma.ko] undefined!
> > > ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/idma64.ko] 
> > > undefined!
> > > drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_training.c:1585:38: 
> > > warning: variable 'result' set but not used [-Wunused-but-set-variable]
> > > 
> > > Unverified Error/Warning (likely false positive, please contact us if 
> > > interested):
> > > 
> > > ...
> > > 
> > > mm/hugetlb.c:3100 alloc_hugetlb_folio() error: uninitialized symbol 
> > > 'h_cg'.
> > 
> > hugetlb_cgroup_commit_charge(idx, pages_per_huge_page(h), h_cg, folio);
> > 
> > The warning looks to be bogus.  I guess we could put a "= NULL" in
> > there to keep the compiler quiet?
> > 
> This could be because if CONFIG_CGROUP_HUGETLB is not set, the function in
> alloc_hugetlb_folio() which initializes h_cg just returns 0
> 
> static inline int hugetlb_cgroup_charge_cgroup_rsvd(int idx,
>   unsigned long nr_pages,
>   struct hugetlb_cgroup **ptr)
> {
>   return 0;
> }

Yes!

> 
> where ptr is h_cg. I can add a "= NULL" in the v2 of my hugetlb page fault
> conversion series.

Thanks
-- 
Mike Kravetz


Re: [linux-next:master] BUILD REGRESSION a54df7622717a40ddec95fd98086aff8ba7839a6

2023-01-24 Thread Sidhartha Kumar

On 1/24/23 12:28 PM, Andrew Morton wrote:

On Wed, 25 Jan 2023 00:37:05 +0800 kernel test robot  wrote:


tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
branch HEAD: a54df7622717a40ddec95fd98086aff8ba7839a6  Add linux-next specific 
files for 20230124

Error/Warning: (recently discovered and may have been fixed)

ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/fsl-edma.ko] 
undefined!
ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/idma64.ko] 
undefined!
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_training.c:1585:38: 
warning: variable 'result' set but not used [-Wunused-but-set-variable]

Unverified Error/Warning (likely false positive, please contact us if 
interested):

...

mm/hugetlb.c:3100 alloc_hugetlb_folio() error: uninitialized symbol 'h_cg'.


hugetlb_cgroup_commit_charge(idx, pages_per_huge_page(h), h_cg, folio);

The warning looks to be bogus.  I guess we could put a "= NULL" in
there to keep the compiler quiet?

This could be because if CONFIG_CGROUP_HUGETLB is not set, the function 
in alloc_hugetlb_folio() which initializes h_cg just returns 0


static inline int hugetlb_cgroup_charge_cgroup_rsvd(int idx,
unsigned long nr_pages,
struct hugetlb_cgroup **ptr)
{
return 0;
}

where ptr is h_cg. I can add a "= NULL" in the v2 of my hugetlb page 
fault conversion series.