* [android-common:android12-trusty-5.10 1980/7871] drivers/md/dm-user.c:525:6: warning: no previous prototype for 'message_kill'
@ 2022-01-26 21:35 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-26 21:35 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4625 bytes --]
tree: https://android.googlesource.com/kernel/common android12-trusty-5.10
head: 52cdd137fae0b001197a51646289e3cbdda921d5
commit: 83bf345abc0bc06b98e906bfbb120a52446e1c43 [1980/7871] ANDROID: dm: dm-user: New target that proxies BIOs to userspace
config: x86_64-randconfig-a002-20220124 (https://download.01.org/0day-ci/archive/20220127/202201270502.2PC4VhNT-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
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 to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/md/
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 >>):
>> 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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-26 21:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-26 21:35 [android-common:android12-trusty-5.10 1980/7871] drivers/md/dm-user.c:525:6: warning: no previous prototype for 'message_kill' 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.