All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Hu Haowen <src.res.211@gmail.com>
Subject: [srcres258-doc:next 1/1] mm/memory-failure.c:1891:6: error: redefinition of 'is_raw_hwpoison_page_in_hugepage'
Date: Tue, 18 Jul 2023 17:42:05 +0800	[thread overview]
Message-ID: <202307181715.0dwDb1O9-lkp@intel.com> (raw)

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

             reply	other threads:[~2023-07-18  9:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18  9:42 kernel test robot [this message]
2023-07-18 10:26 ` [srcres258-doc:next 1/1] mm/memory-failure.c:1891:6: error: redefinition of 'is_raw_hwpoison_page_in_hugepage' Stephen Rothwell
2023-07-18 15:04   ` Hu Haowen
2023-07-18 15:38     ` Philip Li
  -- strict thread matches above, loose matches on Subject: below --
2023-07-18 13:04 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202307181715.0dwDb1O9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sfr@canb.auug.org.au \
    --cc=src.res.211@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.