public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [srcres258-doc:next 1/1] mm/memory-failure.c:1891:6: error: redefinition of 'is_raw_hwpoison_page_in_hugepage'
@ 2023-07-18  9:42 kernel test robot
  2023-07-18 10:26 ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2023-07-18  9:42 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: llvm, oe-kbuild-all, Hu Haowen

tree:   https://github.com/srcres258/linux-doc next
head:   1f94ea418de902796fa65b97c7138c5c6dff13dc
commit: 1f94ea418de902796fa65b97c7138c5c6dff13dc [1/1] Merge commit '899cbd7b84da84d430b58d3bab82314e7f41c71d' into next
config: x86_64-buildonly-randconfig-r001-20230717 (https://download.01.org/0day-ci/archive/20230718/202307181715.0dwDb1O9-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230718/202307181715.0dwDb1O9-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307181715.0dwDb1O9-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/memory-failure.c:1845:17: error: call to undeclared function 'raw_hwp_list_head'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
           raw_hwp_head = raw_hwp_list_head(folio);
                          ^
   mm/memory-failure.c:1845:15: error: incompatible integer to pointer conversion assigning to 'struct llist_head *' from 'int' [-Wint-conversion]
           raw_hwp_head = raw_hwp_list_head(folio);
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~
   mm/memory-failure.c:1878:17: error: call to undeclared function 'raw_hwp_list_head'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
           raw_hwp_head = raw_hwp_list_head(folio);
                          ^
   mm/memory-failure.c:1878:15: error: incompatible integer to pointer conversion assigning to 'struct llist_head *' from 'int' [-Wint-conversion]
           raw_hwp_head = raw_hwp_list_head(folio);
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/memory-failure.c:1891:6: error: redefinition of 'is_raw_hwpoison_page_in_hugepage'
   bool is_raw_hwpoison_page_in_hugepage(struct page *page)
        ^
   mm/memory-failure.c:1856:6: note: previous definition is here
   bool is_raw_hwpoison_page_in_hugepage(struct page *page)
        ^
   mm/memory-failure.c:1913:17: error: call to undeclared function 'raw_hwp_list_head'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
           raw_hwp_head = raw_hwp_list_head(folio);
                          ^
   mm/memory-failure.c:1913:15: error: incompatible integer to pointer conversion assigning to 'struct llist_head *' from 'int' [-Wint-conversion]
           raw_hwp_head = raw_hwp_list_head(folio);
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~
   mm/memory-failure.c:1931:23: error: call to undeclared function 'raw_hwp_list_head'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
           head = llist_del_all(raw_hwp_list_head(folio));
                                ^
   mm/memory-failure.c:1931:23: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct llist_head *' [-Wint-conversion]
           head = llist_del_all(raw_hwp_list_head(folio));
                                ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/llist.h:237:67: note: passing argument to parameter 'head' here
   static inline struct llist_node *llist_del_all(struct llist_head *head)
                                                                     ^
   mm/memory-failure.c:1959:9: error: call to undeclared function 'raw_hwp_list_head'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
           head = raw_hwp_list_head(folio);
                  ^
   mm/memory-failure.c:1959:7: error: incompatible integer to pointer conversion assigning to 'struct llist_head *' from 'int' [-Wint-conversion]
           head = raw_hwp_list_head(folio);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~
   11 errors generated.


vim +/is_raw_hwpoison_page_in_hugepage +1891 mm/memory-failure.c

161df60e9e8965 Naoya Horiguchi 2022-07-14  1828  
e833a46a28d799 Jiaqi Yan       2023-07-07  1829  bool __is_raw_hwp_subpage(struct folio *folio, struct page *subpage)
e833a46a28d799 Jiaqi Yan       2023-07-07  1830  {
e833a46a28d799 Jiaqi Yan       2023-07-07  1831  	struct llist_head *raw_hwp_head;
e833a46a28d799 Jiaqi Yan       2023-07-07  1832  	struct raw_hwp_page *p, *tmp;
e833a46a28d799 Jiaqi Yan       2023-07-07  1833  	bool ret = false;
e833a46a28d799 Jiaqi Yan       2023-07-07  1834  
e833a46a28d799 Jiaqi Yan       2023-07-07  1835  	if (!folio_test_hwpoison(folio))
e833a46a28d799 Jiaqi Yan       2023-07-07  1836  		return false;
e833a46a28d799 Jiaqi Yan       2023-07-07  1837  
161df60e9e8965 Naoya Horiguchi 2022-07-14  1838  	/*
e833a46a28d799 Jiaqi Yan       2023-07-07  1839  	 * When RawHwpUnreliable is set, kernel lost track of which subpages
e833a46a28d799 Jiaqi Yan       2023-07-07  1840  	 * are HWPOISON. So return as if ALL subpages are HWPOISONed.
161df60e9e8965 Naoya Horiguchi 2022-07-14  1841  	 */
e833a46a28d799 Jiaqi Yan       2023-07-07  1842  	if (folio_test_hugetlb_raw_hwp_unreliable(folio))
e833a46a28d799 Jiaqi Yan       2023-07-07  1843  		return true;
161df60e9e8965 Naoya Horiguchi 2022-07-14  1844  
e833a46a28d799 Jiaqi Yan       2023-07-07 @1845  	raw_hwp_head = raw_hwp_list_head(folio);
e833a46a28d799 Jiaqi Yan       2023-07-07  1846  	llist_for_each_entry_safe(p, tmp, raw_hwp_head->first, node) {
e833a46a28d799 Jiaqi Yan       2023-07-07  1847  		if (subpage == p->page) {
e833a46a28d799 Jiaqi Yan       2023-07-07  1848  			ret = true;
e833a46a28d799 Jiaqi Yan       2023-07-07  1849  			break;
e833a46a28d799 Jiaqi Yan       2023-07-07  1850  		}
e833a46a28d799 Jiaqi Yan       2023-07-07  1851  	}
e833a46a28d799 Jiaqi Yan       2023-07-07  1852  
e833a46a28d799 Jiaqi Yan       2023-07-07  1853  	return ret;
161df60e9e8965 Naoya Horiguchi 2022-07-14  1854  }
161df60e9e8965 Naoya Horiguchi 2022-07-14  1855  
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1856  bool is_raw_hwpoison_page_in_hugepage(struct page *page)
1f94ea418de902 Hu Haowen       2023-07-17  1857  {
1f94ea418de902 Hu Haowen       2023-07-17  1858  	struct llist_head *raw_hwp_head;
1f94ea418de902 Hu Haowen       2023-07-17  1859  	struct raw_hwp_page *p;
1f94ea418de902 Hu Haowen       2023-07-17  1860  	struct folio *folio = page_folio(page);
1f94ea418de902 Hu Haowen       2023-07-17  1861  	bool ret = false;
1f94ea418de902 Hu Haowen       2023-07-17  1862  
1f94ea418de902 Hu Haowen       2023-07-17  1863  	if (!folio_test_hwpoison(folio))
1f94ea418de902 Hu Haowen       2023-07-17  1864  		return false;
1f94ea418de902 Hu Haowen       2023-07-17  1865  
1f94ea418de902 Hu Haowen       2023-07-17  1866  	if (!folio_test_hugetlb(folio))
1f94ea418de902 Hu Haowen       2023-07-17  1867  		return PageHWPoison(page);
1f94ea418de902 Hu Haowen       2023-07-17  1868  
1f94ea418de902 Hu Haowen       2023-07-17  1869  	/*
1f94ea418de902 Hu Haowen       2023-07-17  1870  	 * When RawHwpUnreliable is set, kernel lost track of which subpages
1f94ea418de902 Hu Haowen       2023-07-17  1871  	 * are HWPOISON. So return as if ALL subpages are HWPOISONed.
1f94ea418de902 Hu Haowen       2023-07-17  1872  	 */
1f94ea418de902 Hu Haowen       2023-07-17  1873  	if (folio_test_hugetlb_raw_hwp_unreliable(folio))
1f94ea418de902 Hu Haowen       2023-07-17  1874  		return true;
1f94ea418de902 Hu Haowen       2023-07-17  1875  
1f94ea418de902 Hu Haowen       2023-07-17  1876  	mutex_lock(&mf_mutex);
1f94ea418de902 Hu Haowen       2023-07-17  1877  
1f94ea418de902 Hu Haowen       2023-07-17  1878  	raw_hwp_head = raw_hwp_list_head(folio);
1f94ea418de902 Hu Haowen       2023-07-17  1879  	llist_for_each_entry(p, raw_hwp_head->first, node) {
1f94ea418de902 Hu Haowen       2023-07-17  1880  		if (page == p->page) {
1f94ea418de902 Hu Haowen       2023-07-17  1881  			ret = true;
1f94ea418de902 Hu Haowen       2023-07-17  1882  			break;
1f94ea418de902 Hu Haowen       2023-07-17  1883  		}
1f94ea418de902 Hu Haowen       2023-07-17  1884  	}
1f94ea418de902 Hu Haowen       2023-07-17  1885  
1f94ea418de902 Hu Haowen       2023-07-17  1886  	mutex_unlock(&mf_mutex);
1f94ea418de902 Hu Haowen       2023-07-17  1887  
1f94ea418de902 Hu Haowen       2023-07-17  1888  	return ret;
161df60e9e8965 Naoya Horiguchi 2022-07-14  1889  }
161df60e9e8965 Naoya Horiguchi 2022-07-14  1890  
6877d647d86cd0 Jiaqi Yan       2023-07-13 @1891  bool is_raw_hwpoison_page_in_hugepage(struct page *page)
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1892  {
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1893  	struct llist_head *raw_hwp_head;
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1894  	struct raw_hwp_page *p;
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1895  	struct folio *folio = page_folio(page);
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1896  	bool ret = false;
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1897  
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1898  	if (!folio_test_hwpoison(folio))
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1899  		return false;
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1900  
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1901  	if (!folio_test_hugetlb(folio))
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1902  		return PageHWPoison(page);
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1903  
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1904  	/*
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1905  	 * When RawHwpUnreliable is set, kernel lost track of which subpages
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1906  	 * are HWPOISON. So return as if ALL subpages are HWPOISONed.
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1907  	 */
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1908  	if (folio_test_hugetlb_raw_hwp_unreliable(folio))
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1909  		return true;
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1910  
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1911  	mutex_lock(&mf_mutex);
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1912  
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1913  	raw_hwp_head = raw_hwp_list_head(folio);
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1914  	llist_for_each_entry(p, raw_hwp_head->first, node) {
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1915  		if (page == p->page) {
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1916  			ret = true;
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1917  			break;
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1918  		}
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1919  	}
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1920  
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1921  	mutex_unlock(&mf_mutex);
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1922  
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1923  	return ret;
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1924  }
14bdaafea3f2ec Jiaqi Yan       2023-07-13  1925  

:::::: The code at line 1891 was first introduced by commit
:::::: 6877d647d86cd0ed29687ce09f3a5787a6553c54 mm/hwpoison: check if a raw page in a hugetlb folio is raw HWPOISON

:::::: TO: Jiaqi Yan <jiaqiyan@google.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [srcres258-doc:next 1/1] mm/memory-failure.c:1891:6: error: redefinition of 'is_raw_hwpoison_page_in_hugepage'
  2023-07-18  9:42 [srcres258-doc:next 1/1] mm/memory-failure.c:1891:6: error: redefinition of 'is_raw_hwpoison_page_in_hugepage' kernel test robot
@ 2023-07-18 10:26 ` Stephen Rothwell
  2023-07-18 15:04   ` Hu Haowen
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2023-07-18 10:26 UTC (permalink / raw)
  To: kernel test robot; +Cc: Stephen Rothwell, llvm, oe-kbuild-all, Hu Haowen

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

Hi,

On Tue, 18 Jul 2023 17:42:05 +0800 kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://github.com/srcres258/linux-doc next

This is not the linux-next tree.  It is a tree that merges linux-next
every now and then which is *not* how to work with linux-next and will
create lots of merge conflicts which may, or may not, be resolved
correctly.  Please do *not* report any problems with this tree to me.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [srcres258-doc:next 1/1] mm/memory-failure.c:1891:6: error: redefinition of 'is_raw_hwpoison_page_in_hugepage'
  2023-07-18 10:26 ` Stephen Rothwell
@ 2023-07-18 15:04   ` Hu Haowen
  2023-07-18 15:38     ` Philip Li
  0 siblings, 1 reply; 4+ messages in thread
From: Hu Haowen @ 2023-07-18 15:04 UTC (permalink / raw)
  To: Stephen Rothwell, kernel test robot; +Cc: Stephen Rothwell, llvm, oe-kbuild-all



On 2023/7/18 18:26, Stephen Rothwell wrote:
> Hi,
> 
> On Tue, 18 Jul 2023 17:42:05 +0800 kernel test robot <lkp@intel.com> wrote:
>>
>> tree:   https://github.com/srcres258/linux-doc next
> 
> This is not the linux-next tree.  It is a tree that merges linux-next
> every now and then which is *not* how to work with linux-next and will
> create lots of merge conflicts which may, or may not, be resolved
> correctly.  Please do *not* report any problems with this tree to me.

Sorry for troubling you, Stephen. It might be a misunderstanding for the
kernel test robot as the address of my tree is mentioned within
MAINTAINERS and it is detected and put into CI automatically. In truth
the tree has nothing to do with Stephen's linux-next tree and it is used
by myself for kernel documentation translation stuffs.

Consequently my intention is identical with Stephen - to disable the CI
jobs and error reports as it might act as junk information for both
Stephen and myself.

Thanks,
Hu Haowen

> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [srcres258-doc:next 1/1] mm/memory-failure.c:1891:6: error: redefinition of 'is_raw_hwpoison_page_in_hugepage'
  2023-07-18 15:04   ` Hu Haowen
@ 2023-07-18 15:38     ` Philip Li
  0 siblings, 0 replies; 4+ messages in thread
From: Philip Li @ 2023-07-18 15:38 UTC (permalink / raw)
  To: Hu Haowen
  Cc: Stephen Rothwell, kernel test robot, Stephen Rothwell, llvm,
	oe-kbuild-all

On Tue, Jul 18, 2023 at 11:04:26PM +0800, Hu Haowen wrote:
> 
> 
> On 2023/7/18 18:26, Stephen Rothwell wrote:
> > Hi,
> > 
> > On Tue, 18 Jul 2023 17:42:05 +0800 kernel test robot <lkp@intel.com> wrote:
> > > 
> > > tree:   https://github.com/srcres258/linux-doc next
> > 
> > This is not the linux-next tree.  It is a tree that merges linux-next
> > every now and then which is *not* how to work with linux-next and will
> > create lots of merge conflicts which may, or may not, be resolved
> > correctly.  Please do *not* report any problems with this tree to me.
> 
> Sorry for troubling you, Stephen. It might be a misunderstanding for the
> kernel test robot as the address of my tree is mentioned within
> MAINTAINERS and it is detected and put into CI automatically. In truth
> the tree has nothing to do with Stephen's linux-next tree and it is used
> by myself for kernel documentation translation stuffs.
> 
> Consequently my intention is identical with Stephen - to disable the CI
> jobs and error reports as it might act as junk information for both
> Stephen and myself.

Hi Stephen and Haowen, sorry for the trouble. We will stop the testing
for the repo to avoid confusion.

> 
> Thanks,
> Hu Haowen
> 
> > 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-18 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18  9:42 [srcres258-doc:next 1/1] mm/memory-failure.c:1891:6: error: redefinition of 'is_raw_hwpoison_page_in_hugepage' kernel test robot
2023-07-18 10:26 ` Stephen Rothwell
2023-07-18 15:04   ` Hu Haowen
2023-07-18 15:38     ` Philip Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox