* [android-common:android12-trusty-5.10 1980/7892] drivers/md/dm-user.c:525:6: warning: no previous prototype for 'message_kill'
@ 2023-02-14 21:00 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-14 21:00 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
Hi Palmer,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android12-trusty-5.10
head: e88b0fcae6db893ef5f2a45ad70499e02ee01a4e
commit: 83bf345abc0bc06b98e906bfbb120a52446e1c43 [1980/7892] ANDROID: dm: dm-user: New target that proxies BIOs to userspace
config: arm-randconfig-r046-20230212 (https://download.01.org/0day-ci/archive/20230215/202302150431.9f6vGiqf-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-trusty-5.10
git checkout 83bf345abc0bc06b98e906bfbb120a52446e1c43
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/md/ drivers/vfio/ kernel/sched/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302150431.9f6vGiqf-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/md/dm-user.c:525:6: warning: no previous prototype for 'message_kill' [-Wmissing-prototypes]
525 | void message_kill(struct message *m, mempool_t *pool)
| ^~~~~~~~~~~~
drivers/md/dm-user.c:539:5: warning: no previous prototype for 'target_poll' [-Wmissing-prototypes]
539 | int target_poll(struct target *t)
| ^~~~~~~~~~~
drivers/md/dm-user.c:544:6: warning: no previous prototype for 'target_release' [-Wmissing-prototypes]
544 | void target_release(struct kref *ref)
| ^~~~~~~~~~~~~~
drivers/md/dm-user.c:565:6: warning: no previous prototype for 'target_put' [-Wmissing-prototypes]
565 | void target_put(struct target *t)
| ^~~~~~~~~~
>> drivers/md/dm-user.c:578:17: warning: no previous prototype for 'channel_alloc' [-Wmissing-prototypes]
578 | struct channel *channel_alloc(struct target *t)
| ^~~~~~~~~~~~~
drivers/md/dm-user.c:596:6: warning: no previous prototype for 'channel_free' [-Wmissing-prototypes]
596 | void channel_free(struct channel *c)
| ^~~~~~~~~~~~
vim +/message_kill +525 drivers/md/dm-user.c
524
> 525 void message_kill(struct message *m, mempool_t *pool)
526 {
527 m->bio->bi_status = BLK_STS_IOERR;
528 bio_endio(m->bio);
529 bio_put(m->bio);
530 mempool_free(m, pool);
531 }
532
533 /*
534 * Returns 0 when there is no work left to do. This must be callable without
535 * holding the target lock, as it is part of the waitqueue's check expression.
536 * When called without the lock it may spuriously indicate there is remaining
537 * work, but when called with the lock it must be accurate.
538 */
> 539 int target_poll(struct target *t)
540 {
541 return !list_empty(&t->to_user) || t->dm_destroyed;
542 }
543
544 void target_release(struct kref *ref)
545 {
546 struct target *t = container_of(ref, struct target, references);
547 struct list_head *cur;
548
549 /*
550 * There may be outstanding BIOs that have not yet been given to
551 * userspace. At this point there's nothing we can do about them, as
552 * there are and will never be any channels.
553 */
554 list_for_each (cur, &t->to_user) {
555 message_kill(list_entry(cur, struct message, to_user),
556 &t->message_pool);
557 }
558
559 mempool_exit(&t->message_pool);
560 mutex_unlock(&t->lock);
561 mutex_destroy(&t->lock);
562 kfree(t);
563 }
564
565 void target_put(struct target *t)
566 {
567 /*
568 * This both releases a reference to the target and the lock. We leave
569 * it up to the caller to hold the lock, as they probably needed it for
570 * something else.
571 */
572 lockdep_assert_held(&t->lock);
573
574 if (!kref_put(&t->references, target_release))
575 mutex_unlock(&t->lock);
576 }
577
> 578 struct channel *channel_alloc(struct target *t)
579 {
580 struct channel *c;
581
582 lockdep_assert_held(&t->lock);
583
584 c = kzalloc(sizeof(*c), GFP_KERNEL);
585 if (c == NULL)
586 return NULL;
587
588 kref_get(&t->references);
589 c->target = t;
590 c->cur_from_user = &c->scratch_message_from_user;
591 mutex_init(&c->lock);
592 INIT_LIST_HEAD(&c->from_user);
593 return c;
594 }
595
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-14 21:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 21:00 [android-common:android12-trusty-5.10 1980/7892] drivers/md/dm-user.c:525:6: warning: no previous prototype for 'message_kill' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).