All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [norov:find_and-v4.1 24/42] drivers/block/null_blk/main.c:774:9: error: implicit declaration of function 'put_tag'; did you mean 'put_page'?
@ 2024-04-13  5:51 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-13  5:51 UTC (permalink / raw
  To: Yury Norov; +Cc: oe-kbuild-all

tree:   https://github.com/norov/linux find_and-v4.1
head:   5204e77ce1de66ec15b3e47e3867b1a52922deb2
commit: a879cc36a6d1a8b9a7084b24110b0046ed110626 [24/42] block: null_blk: replace get_tag() with a generic find_and_set_bit_lock()
config: x86_64-rhel-8.3-ltp (https://download.01.org/0day-ci/archive/20240413/202404131337.PTQQEijy-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240413/202404131337.PTQQEijy-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/202404131337.PTQQEijy-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/block/null_blk/main.c:8:
   include/linux/find-atomic.h: In function '__find_and_set_bit':
   include/linux/find-atomic.h:306:35: warning: passing argument 1 of 'find_first_zero_bit' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
     306 |         bit = find_first_zero_bit(addr, nbits);
         |                                   ^~~~
   In file included from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:13,
                    from arch/x86/include/asm/cpumask.h:5,
                    from arch/x86/include/asm/msr.h:11,
                    from arch/x86/include/asm/tsc.h:10,
                    from arch/x86/include/asm/timex.h:6,
                    from include/linux/timex.h:67,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from drivers/block/null_blk/main.c:6:
   include/linux/find.h:358:56: note: expected 'const long unsigned int *' but argument is of type 'volatile long unsigned int *'
     358 | unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size)
         |                                   ~~~~~~~~~~~~~~~~~~~~~^~~~
   drivers/block/null_blk/main.c: In function 'free_cmd':
>> drivers/block/null_blk/main.c:774:9: error: implicit declaration of function 'put_tag'; did you mean 'put_page'? [-Werror=implicit-function-declaration]
     774 |         put_tag(cmd->nq, cmd->tag);
         |         ^~~~~~~
         |         put_page
>> drivers/block/null_blk/main.c:774:29: error: 'struct nullb_cmd' has no member named 'tag'
     774 |         put_tag(cmd->nq, cmd->tag);
         |                             ^~
   drivers/block/null_blk/main.c: In function '__alloc_cmd':
>> drivers/block/null_blk/main.c:781:52: error: 'struct nullb_queue' has no member named 'tag_map'
     781 |         unsigned int tag = find_and_set_bit_lock(nq->tag_map, nq->queue_depth);
         |                                                    ^~
>> drivers/block/null_blk/main.c:781:65: error: 'struct nullb_queue' has no member named 'queue_depth'
     781 |         unsigned int tag = find_and_set_bit_lock(nq->tag_map, nq->queue_depth);
         |                                                                 ^~
   drivers/block/null_blk/main.c:784:22: error: 'struct nullb_queue' has no member named 'queue_depth'
     784 |         if (tag >= nq->queue_depth)
         |                      ^~
>> drivers/block/null_blk/main.c:787:18: error: 'struct nullb_queue' has no member named 'cmds'
     787 |         cmd = &nq->cmds[tag];
         |                  ^~
   drivers/block/null_blk/main.c:788:12: error: 'struct nullb_cmd' has no member named 'tag'
     788 |         cmd->tag = tag;
         |            ^~
   drivers/block/null_blk/main.c: In function 'alloc_cmd':
>> drivers/block/null_blk/main.c:811:28: error: 'struct nullb_cmd' has no member named 'bio'
     811 |                         cmd->bio = bio;
         |                            ^~
>> drivers/block/null_blk/main.c:814:36: error: 'struct nullb_queue' has no member named 'wait'
     814 |                 prepare_to_wait(&nq->wait, &wait, TASK_UNINTERRUPTIBLE);
         |                                    ^~
   drivers/block/null_blk/main.c:816:32: error: 'struct nullb_queue' has no member named 'wait'
     816 |                 finish_wait(&nq->wait, &wait);
         |                                ^~
   drivers/block/null_blk/main.c: In function 'end_cmd':
>> drivers/block/null_blk/main.c:826:41: error: 'struct nullb_cmd' has no member named 'rq'; did you mean 'nq'?
     826 |                 blk_mq_end_request(cmd->rq, cmd->error);
         |                                         ^~
         |                                         nq
   drivers/block/null_blk/main.c:829:20: error: 'struct nullb_cmd' has no member named 'bio'
     829 |                 cmd->bio->bi_status = cmd->error;
         |                    ^~
   drivers/block/null_blk/main.c:830:30: error: 'struct nullb_cmd' has no member named 'bio'
     830 |                 bio_endio(cmd->bio);
         |                              ^~
   drivers/block/null_blk/main.c: At top level:
   drivers/block/null_blk/main.c:820:13: warning: 'end_cmd' defined but not used [-Wunused-function]
     820 | static void end_cmd(struct nullb_cmd *cmd)
         |             ^~~~~~~
   drivers/block/null_blk/main.c:799:26: warning: 'alloc_cmd' defined but not used [-Wunused-function]
     799 | static struct nullb_cmd *alloc_cmd(struct nullb_queue *nq, struct bio *bio)
         |                          ^~~~~~~~~
   cc1: some warnings being treated as errors


vim +774 drivers/block/null_blk/main.c

   771	
   772	static void free_cmd(struct nullb_cmd *cmd)
   773	{
 > 774		put_tag(cmd->nq, cmd->tag);
   775	}
   776	
   777	static enum hrtimer_restart null_cmd_timer_expired(struct hrtimer *timer);
   778	
   779	static struct nullb_cmd *__alloc_cmd(struct nullb_queue *nq)
   780	{
 > 781		unsigned int tag = find_and_set_bit_lock(nq->tag_map, nq->queue_depth);
   782		struct nullb_cmd *cmd;
   783	
   784		if (tag >= nq->queue_depth)
   785			return NULL;
   786	
 > 787		cmd = &nq->cmds[tag];
   788		cmd->tag = tag;
   789		cmd->error = BLK_STS_OK;
   790		cmd->nq = nq;
   791		if (nq->dev->irqmode == NULL_IRQ_TIMER) {
   792			hrtimer_init(&cmd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
   793			cmd->timer.function = null_cmd_timer_expired;
   794		}
   795	
   796		return cmd;
   797	}
   798	
   799	static struct nullb_cmd *alloc_cmd(struct nullb_queue *nq, struct bio *bio)
   800	{
   801		struct nullb_cmd *cmd;
   802		DEFINE_WAIT(wait);
   803	
   804		do {
   805			/*
   806			 * This avoids multiple return statements, multiple calls to
   807			 * __alloc_cmd() and a fast path call to prepare_to_wait().
   808			 */
   809			cmd = __alloc_cmd(nq);
   810			if (cmd) {
 > 811				cmd->bio = bio;
   812				return cmd;
   813			}
 > 814			prepare_to_wait(&nq->wait, &wait, TASK_UNINTERRUPTIBLE);
   815			io_schedule();
   816			finish_wait(&nq->wait, &wait);
   817		} while (1);
   818	}
   819	
   820	static void end_cmd(struct nullb_cmd *cmd)
   821	{
   822		int queue_mode = cmd->nq->dev->queue_mode;
   823	
   824		switch (queue_mode)  {
   825		case NULL_Q_MQ:
 > 826			blk_mq_end_request(cmd->rq, cmd->error);
   827			return;
   828		case NULL_Q_BIO:
   829			cmd->bio->bi_status = cmd->error;
   830			bio_endio(cmd->bio);
   831			break;
   832		}
   833	
   834		free_cmd(cmd);
   835	}
   836	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-13  5:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-13  5:51 [norov:find_and-v4.1 24/42] drivers/block/null_blk/main.c:774:9: error: implicit declaration of function 'put_tag'; did you mean 'put_page'? kernel test robot

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.