All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Xu Wang <vulab@iscas.ac.cn>, axboe@kernel.dk
Cc: kbuild-all@lists.01.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] blk-zoned: Remove needless request_queue NULL pointer checks
Date: Fri, 10 Sep 2021 17:45:17 +0800	[thread overview]
Message-ID: <202109101702.RWna3NPk-lkp@intel.com> (raw)
In-Reply-To: <20210910064412.80446-1-vulab@iscas.ac.cn>

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

Hi Xu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on v5.14 next-20210910]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Xu-Wang/blk-zoned-Remove-needless-request_queue-NULL-pointer-checks/20210910-144721
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: microblaze-randconfig-r023-20210910 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 11.2.0
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/0day-ci/linux/commit/bc1beb73948b721209a36db7693ed7a621037757
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xu-Wang/blk-zoned-Remove-needless-request_queue-NULL-pointer-checks/20210910-144721
        git checkout bc1beb73948b721209a36db7693ed7a621037757
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=microblaze 

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

All errors (new ones prefixed by >>):

   block/blk-zoned.c: In function 'blkdev_report_zones_ioctl':
>> block/blk-zoned.c:349:35: error: implicit declaration of function 'dev_get_queue'; did you mean 'bdev_get_queue'? [-Werror=implicit-function-declaration]
     349 |         struct request_queue *q = dev_get_queue(bdev);
         |                                   ^~~~~~~~~~~~~
         |                                   bdev_get_queue
>> block/blk-zoned.c:349:35: error: initialization of 'struct request_queue *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
   cc1: all warnings being treated as errors


vim +349 block/blk-zoned.c

   339	
   340	/*
   341	 * BLKREPORTZONE ioctl processing.
   342	 * Called from blkdev_ioctl.
   343	 */
   344	int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode,
   345				      unsigned int cmd, unsigned long arg)
   346	{
   347		void __user *argp = (void __user *)arg;
   348		struct zone_report_args args;
 > 349		struct request_queue *q = dev_get_queue(bdev);
   350		struct blk_zone_report rep;
   351		int ret;
   352	
   353		if (!argp)
   354			return -EINVAL;
   355	
   356		if (!blk_queue_is_zoned(q))
   357			return -ENOTTY;
   358	
   359		if (copy_from_user(&rep, argp, sizeof(struct blk_zone_report)))
   360			return -EFAULT;
   361	
   362		if (!rep.nr_zones)
   363			return -EINVAL;
   364	
   365		args.zones = argp + sizeof(struct blk_zone_report);
   366		ret = blkdev_report_zones(bdev, rep.sector, rep.nr_zones,
   367					  blkdev_copy_zone_to_user, &args);
   368		if (ret < 0)
   369			return ret;
   370	
   371		rep.nr_zones = ret;
   372		rep.flags = BLK_ZONE_REP_CAPACITY;
   373		if (copy_to_user(argp, &rep, sizeof(struct blk_zone_report)))
   374			return -EFAULT;
   375		return 0;
   376	}
   377	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35188 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2] blk-zoned: Remove needless request_queue NULL pointer checks
Date: Fri, 10 Sep 2021 17:45:17 +0800	[thread overview]
Message-ID: <202109101702.RWna3NPk-lkp@intel.com> (raw)
In-Reply-To: <20210910064412.80446-1-vulab@iscas.ac.cn>

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

Hi Xu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on v5.14 next-20210910]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Xu-Wang/blk-zoned-Remove-needless-request_queue-NULL-pointer-checks/20210910-144721
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: microblaze-randconfig-r023-20210910 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 11.2.0
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/0day-ci/linux/commit/bc1beb73948b721209a36db7693ed7a621037757
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Xu-Wang/blk-zoned-Remove-needless-request_queue-NULL-pointer-checks/20210910-144721
        git checkout bc1beb73948b721209a36db7693ed7a621037757
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=microblaze 

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

All errors (new ones prefixed by >>):

   block/blk-zoned.c: In function 'blkdev_report_zones_ioctl':
>> block/blk-zoned.c:349:35: error: implicit declaration of function 'dev_get_queue'; did you mean 'bdev_get_queue'? [-Werror=implicit-function-declaration]
     349 |         struct request_queue *q = dev_get_queue(bdev);
         |                                   ^~~~~~~~~~~~~
         |                                   bdev_get_queue
>> block/blk-zoned.c:349:35: error: initialization of 'struct request_queue *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
   cc1: all warnings being treated as errors


vim +349 block/blk-zoned.c

   339	
   340	/*
   341	 * BLKREPORTZONE ioctl processing.
   342	 * Called from blkdev_ioctl.
   343	 */
   344	int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode,
   345				      unsigned int cmd, unsigned long arg)
   346	{
   347		void __user *argp = (void __user *)arg;
   348		struct zone_report_args args;
 > 349		struct request_queue *q = dev_get_queue(bdev);
   350		struct blk_zone_report rep;
   351		int ret;
   352	
   353		if (!argp)
   354			return -EINVAL;
   355	
   356		if (!blk_queue_is_zoned(q))
   357			return -ENOTTY;
   358	
   359		if (copy_from_user(&rep, argp, sizeof(struct blk_zone_report)))
   360			return -EFAULT;
   361	
   362		if (!rep.nr_zones)
   363			return -EINVAL;
   364	
   365		args.zones = argp + sizeof(struct blk_zone_report);
   366		ret = blkdev_report_zones(bdev, rep.sector, rep.nr_zones,
   367					  blkdev_copy_zone_to_user, &args);
   368		if (ret < 0)
   369			return ret;
   370	
   371		rep.nr_zones = ret;
   372		rep.flags = BLK_ZONE_REP_CAPACITY;
   373		if (copy_to_user(argp, &rep, sizeof(struct blk_zone_report)))
   374			return -EFAULT;
   375		return 0;
   376	}
   377	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35188 bytes --]

  parent reply	other threads:[~2021-09-10  9:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10  6:44 [PATCH v2] blk-zoned: Remove needless request_queue NULL pointer checks Xu Wang
2021-09-10  9:33 ` Chaitanya Kulkarni
2021-09-10  9:45 ` kernel test robot [this message]
2021-09-10  9:45   ` kernel test robot
2021-09-10 11:45 ` kernel test robot
2021-09-10 11:45   ` kernel test robot
2021-09-10 14:04 ` kernel test robot
2021-09-10 14: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=202109101702.RWna3NPk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=axboe@kernel.dk \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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.