public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [davidhildenbrand:cow_fixes_part_2 11/25] mm/memory-failure.c:1465:19: warning: parameter 'page_flags' set but not used
Date: Wed, 23 Feb 2022 14:52:51 +0800	[thread overview]
Message-ID: <202202231420.BvLSwH9N-lkp@intel.com> (raw)

tree:   git://github.com/davidhildenbrand/linux cow_fixes_part_2
head:   f818ce6b393017761287bf06620a25d322639053
commit: 6a6823bd941bee73b1a65936f6d2c70d2c3bc086 [11/25] mm/page-flags: reuse PG_slab as PG_anon_exclusive for PageAnon() pages
config: i386-randconfig-a012-20220221 (https://download.01.org/0day-ci/archive/20220223/202202231420.BvLSwH9N-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/davidhildenbrand/linux/commit/6a6823bd941bee73b1a65936f6d2c70d2c3bc086
        git remote add davidhildenbrand git://github.com/davidhildenbrand/linux
        git fetch --no-tags davidhildenbrand cow_fixes_part_2
        git checkout 6a6823bd941bee73b1a65936f6d2c70d2c3bc086
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> mm/memory-failure.c:1465:19: warning: parameter 'page_flags' set but not used [-Wunused-but-set-parameter]
                                   unsigned long page_flags)
                                                 ^
   1 warning generated.


vim +/page_flags +1465 mm/memory-failure.c

6a46079cf57a7f7 Andi Kleen        2009-09-16  1463  
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1464  static int identify_page_state(unsigned long pfn, struct page *p,
0348d2ebec9b00e Naoya Horiguchi   2017-07-10 @1465  				unsigned long page_flags)
761ad8d7c7b5485 Naoya Horiguchi   2017-07-10  1466  {
761ad8d7c7b5485 Naoya Horiguchi   2017-07-10  1467  	struct page_state *ps;
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1468  
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1469  	/*
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1470  	 * The first check uses the current page flags which may not have any
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1471  	 * relevant information. The second check with the saved page flags is
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1472  	 * carried out only if the first check can't determine the page status.
6a6823bd941bee7 David Hildenbrand 2021-12-20  1473  	 *
6a6823bd941bee7 David Hildenbrand 2021-12-20  1474  	 * Note that PG_slab is also used as PG_anon_exclusive for PageAnon()
6a6823bd941bee7 David Hildenbrand 2021-12-20  1475  	 * pages. Most of these pages should have been handled previously,
6a6823bd941bee7 David Hildenbrand 2021-12-20  1476  	 * however, let's play safe and verify via PageAnon().
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1477  	 */
6a6823bd941bee7 David Hildenbrand 2021-12-20  1478  	for (ps = error_states;; ps++) {
6a6823bd941bee7 David Hildenbrand 2021-12-20  1479  		if ((p->flags & ps->mask) != ps->res)
6a6823bd941bee7 David Hildenbrand 2021-12-20  1480  			continue;
6a6823bd941bee7 David Hildenbrand 2021-12-20  1481  		if ((ps->type == MF_MSG_SLAB) && PageAnon(p))
6a6823bd941bee7 David Hildenbrand 2021-12-20  1482  			continue;
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1483  		break;
6a6823bd941bee7 David Hildenbrand 2021-12-20  1484  	}
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1485  
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1486  	page_flags |= (p->flags & (1UL << PG_dirty));
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1487  
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1488  	if (!ps->mask)
6a6823bd941bee7 David Hildenbrand 2021-12-20  1489  		for (ps = error_states;; ps++) {
6a6823bd941bee7 David Hildenbrand 2021-12-20  1490  			if ((p->flags & ps->mask) != ps->res)
6a6823bd941bee7 David Hildenbrand 2021-12-20  1491  				continue;
6a6823bd941bee7 David Hildenbrand 2021-12-20  1492  			if ((ps->type == MF_MSG_SLAB) && PageAnon(p))
6a6823bd941bee7 David Hildenbrand 2021-12-20  1493  				continue;
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1494  			break;
6a6823bd941bee7 David Hildenbrand 2021-12-20  1495  		}
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1496  	return page_action(ps, p, pfn);
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1497  }
0348d2ebec9b00e Naoya Horiguchi   2017-07-10  1498  

:::::: The code at line 1465 was first introduced by commit
:::::: 0348d2ebec9b00ea87b42dffdb3f393007303b82 mm: hwpoison: introduce idenfity_page_state

:::::: TO: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

                 reply	other threads:[~2022-02-23  6:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202202231420.BvLSwH9N-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=david@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox