mm/memory-failure.c:1926 soft_offline_page() error: '%pG' must be followed by one of [gpv]
PATCH 47/53 mm/memory-failure.c:1926 soft_offline_page() error: '%pG' must be followed by one of [gpv]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-5.10 head: 7bc636a9c8ac76445b7aac5ad0636c27711cdd80 commit: c60183ae1a1b4adea62af23fe1f18474a2511759 [47/53] mm,hwpoison: refactor get_any_page config: i386-randconfig-141-20230831 (https://download.01.org/0day-ci/archive/20230831/[email protected]/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce: (https://download.01.org/0day-ci/archive/20230831/[email protected]/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 <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/
smatch warnings:mm/memory-failure.c:1926 soft_offline_page() error: '%pG' must be followed by one of [gpv]
vim +1926 mm/memory-failure.c
feec24a6139d46 Naoya Horiguchi 2019-11-30 1892 int soft_offline_page(unsigned long pfn, int flags)
86e057734bd1c4 Wanpeng Li 2013-09-11 1893 {
86e057734bd1c4 Wanpeng Li 2013-09-11 1894 int ret;
feec24a6139d46 Naoya Horiguchi 2019-11-30 1895 struct page *page;
b94e02822debdf Oscar Salvador 2020-10-15 1896 bool try_again = true;
86e057734bd1c4 Wanpeng Li 2013-09-11 1897
feec24a6139d46 Naoya Horiguchi 2019-11-30 1898 if (!pfn_valid(pfn))
feec24a6139d46 Naoya Horiguchi 2019-11-30 1899 return -ENXIO;
feec24a6139d46 Naoya Horiguchi 2019-11-30 1900 /* Only online pages can be soft-offlined (esp., not ZONE_DEVICE). */
feec24a6139d46 Naoya Horiguchi 2019-11-30 1901 page = pfn_to_online_page(pfn);
feec24a6139d46 Naoya Horiguchi 2019-11-30 1902 if (!page)
86a66810baa87e Dan Williams 2018-07-13 1903 return -EIO;
86a66810baa87e Dan Williams 2018-07-13 1904
86e057734bd1c4 Wanpeng Li 2013-09-11 1905 if (PageHWPoison(page)) {
c60183ae1a1b4a Oscar Salvador 2020-12-14 1906 pr_info("%s: %#lx page already poisoned\n", __func__, pfn);
1e0e635be82132 Wanpeng Li 2015-09-08 1907 if (flags & MF_COUNT_INCREASED)
dd6e2402fad966 Oscar Salvador 2020-10-15 1908 put_page(page);
5a2ffca3c23333 Oscar Salvador 2020-10-15 1909 return 0;
86e057734bd1c4 Wanpeng Li 2013-09-11 1910 }
4e41a30c6d506c Naoya Horiguchi 2016-01-15 1911
b94e02822debdf Oscar Salvador 2020-10-15 1912 retry:
4e41a30c6d506c Naoya Horiguchi 2016-01-15 1913 get_online_mems();
c60183ae1a1b4a Oscar Salvador 2020-12-14 1914 ret = get_any_page(page, flags);
4e41a30c6d506c Naoya Horiguchi 2016-01-15 1915 put_online_mems();
4e41a30c6d506c Naoya Horiguchi 2016-01-15 1916
c60183ae1a1b4a Oscar Salvador 2020-12-14 1917 if (ret > 0) {
6b9a217eda4a13 Oscar Salvador 2020-10-15 1918 ret = soft_offline_in_use_page(page);
c60183ae1a1b4a Oscar Salvador 2020-12-14 1919 } else if (ret == 0) {
b94e02822debdf Oscar Salvador 2020-10-15 1920 if (soft_offline_free_page(page) && try_again) {
b94e02822debdf Oscar Salvador 2020-10-15 1921 try_again = false;
1f207076740101 Liu Shixin 2021-12-24 1922 flags &= ~MF_COUNT_INCREASED;
b94e02822debdf Oscar Salvador 2020-10-15 1923 goto retry;
b94e02822debdf Oscar Salvador 2020-10-15 1924 }
c60183ae1a1b4a Oscar Salvador 2020-12-14 1925 } else if (ret == -EIO) {
c60183ae1a1b4a Oscar Salvador 2020-12-14 @1926 pr_info("%s: %#lx: unknown page type: %lx (%pGP)\n",
^This was intended to be lower case 'p' was intended. Fixed in commit 6696d2a6f38c ("mm,hwpoison: fix printing of page flags").
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki