From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4122836150307270785==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [android-common:android12-trusty-5.10 1980/7871] drivers/md/dm-user.c:525:6: warning: no previous prototype for 'message_kill' Date: Thu, 27 Jan 2022 05:35:42 +0800 Message-ID: <202201270502.2PC4VhNT-lkp@intel.com> List-Id: --===============4122836150307270785== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://android.googlesource.com/kernel/common android12-trusty-5.10 head: 52cdd137fae0b001197a51646289e3cbdda921d5 commit: 83bf345abc0bc06b98e906bfbb120a52446e1c43 [1980/7871] ANDROID: dm: d= m-user: New target that proxies BIOs to userspace config: x86_64-randconfig-a002-20220124 (https://download.01.org/0day-ci/ar= chive/20220127/202201270502.2PC4VhNT-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=3D1 build): git remote add android-common https://android.googlesource.com/kern= el/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=3D1 O=3Dbuild_dir ARCH=3Dx86_64 SHELL=3D/bin/bash drivers/md/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot 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_p= oll' [-Wmissing-prototypes] 539 | int target_poll(struct target *t) | ^~~~~~~~~~~ drivers/md/dm-user.c:544:6: warning: no previous prototype for 'target_r= elease' [-Wmissing-prototypes] 544 | void target_release(struct kref *ref) | ^~~~~~~~~~~~~~ drivers/md/dm-user.c:565:6: warning: no previous prototype for 'target_p= ut' [-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 =3D 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 callabl= e without 535 * holding the target lock, as it is part of the waitqueue's check e= xpression. 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 =3D 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 l= eave 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 =3D kzalloc(sizeof(*c), GFP_KERNEL); 585 if (c =3D=3D NULL) 586 return NULL; 587 = 588 kref_get(&t->references); 589 c->target =3D t; 590 c->cur_from_user =3D &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 --===============4122836150307270785==--