mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [bvanassche:md-raid10 1/1] drivers/md/raid10.c:2648:17: error: 'rw' undeclared; did you mean 'rq'?
Date: Wed, 10 Aug 2022 08:02:21 +0800	[thread overview]
Message-ID: <202208100709.3WYowHQE-lkp@intel.com> (raw)

tree:   https://github.com/bvanassche/linux md-raid10
head:   31d1ab290843e8d1c00cfdbdd7bfccb907f5d64c
commit: 31d1ab290843e8d1c00cfdbdd7bfccb907f5d64c [1/1] md/raid10: Fix a recently introduced sparse warning
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220810/202208100709.3WYowHQE-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/bvanassche/linux/commit/31d1ab290843e8d1c00cfdbdd7bfccb907f5d64c
        git remote add bvanassche https://github.com/bvanassche/linux
        git fetch --no-tags bvanassche md-raid10
        git checkout 31d1ab290843e8d1c00cfdbdd7bfccb907f5d64c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/

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

All errors (new ones prefixed by >>):

   drivers/md/raid10.c: In function 'r10_sync_page_io':
>> drivers/md/raid10.c:2648:17: error: 'rw' undeclared (first use in this function); did you mean 'rq'?
    2648 |             && (rw == READ || test_bit(WriteErrorSeen, &rdev->flags)))
         |                 ^~
         |                 rq
   drivers/md/raid10.c:2648:17: note: each undeclared identifier is reported only once for each function it appears in


vim +2648 drivers/md/raid10.c

1e50915fe0bbf7 Robert Becker   2009-12-14  2640  
3cb03002000f13 NeilBrown       2011-10-11  2641  static int r10_sync_page_io(struct md_rdev *rdev, sector_t sector,
31d1ab290843e8 Bart Van Assche 2022-08-09  2642  			    int sectors, struct page *page, enum req_op op)
58c54fcca3bac5 NeilBrown       2011-07-28  2643  {
58c54fcca3bac5 NeilBrown       2011-07-28  2644  	sector_t first_bad;
58c54fcca3bac5 NeilBrown       2011-07-28  2645  	int bad_sectors;
58c54fcca3bac5 NeilBrown       2011-07-28  2646  
58c54fcca3bac5 NeilBrown       2011-07-28  2647  	if (is_badblock(rdev, sector, sectors, &first_bad, &bad_sectors)
58c54fcca3bac5 NeilBrown       2011-07-28 @2648  	    && (rw == READ || test_bit(WriteErrorSeen, &rdev->flags)))
58c54fcca3bac5 NeilBrown       2011-07-28  2649  		return -1;
31d1ab290843e8 Bart Van Assche 2022-08-09  2650  	if (sync_page_io(rdev, sector, sectors << 9, page, op, false))
58c54fcca3bac5 NeilBrown       2011-07-28  2651  		/* success */
58c54fcca3bac5 NeilBrown       2011-07-28  2652  		return 1;
b7044d41b5a09c NeilBrown       2011-12-23  2653  	if (rw == WRITE) {
58c54fcca3bac5 NeilBrown       2011-07-28  2654  		set_bit(WriteErrorSeen, &rdev->flags);
b7044d41b5a09c NeilBrown       2011-12-23  2655  		if (!test_and_set_bit(WantReplacement, &rdev->flags))
b7044d41b5a09c NeilBrown       2011-12-23  2656  			set_bit(MD_RECOVERY_NEEDED,
b7044d41b5a09c NeilBrown       2011-12-23  2657  				&rdev->mddev->recovery);
b7044d41b5a09c NeilBrown       2011-12-23  2658  	}
58c54fcca3bac5 NeilBrown       2011-07-28  2659  	/* need to record an error - either for the block or the device */
58c54fcca3bac5 NeilBrown       2011-07-28  2660  	if (!rdev_set_badblocks(rdev, sector, sectors, 0))
58c54fcca3bac5 NeilBrown       2011-07-28  2661  		md_error(rdev->mddev, rdev);
58c54fcca3bac5 NeilBrown       2011-07-28  2662  	return 0;
58c54fcca3bac5 NeilBrown       2011-07-28  2663  }
58c54fcca3bac5 NeilBrown       2011-07-28  2664  

:::::: The code at line 2648 was first introduced by commit
:::::: 58c54fcca3bac5bf9290cfed31c76e4c4bfbabaf md/raid10: handle further errors during fix_read_error better.

:::::: TO: NeilBrown <neilb@suse.de>
:::::: CC: NeilBrown <neilb@suse.de>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-08-10  0:03 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=202208100709.3WYowHQE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bvanassche@acm.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®