From: kernel test robot <lkp@intel.com>
To: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>,
Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: oe-kbuild-all@lists.linux.dev, greybus-dev@lists.linaro.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
syzbot+a2e50fb40695811c2dab@syzkaller.appspotmail.com,
Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
Subject: Re: [PATCH] greybus: operation: arm the timeout timer before sending the request
Date: Sun, 18 Oct 2026 14:52:29 +0800 [thread overview]
Message-ID: <202610181452.8uUjB47B-lkp@intel.com> (raw)
In-Reply-To: <20261017171743.24612-1-ngocthang2710.1999@gmail.com>
Hi Nguyen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v7.3-rc7 next-20261016]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Nguyen-Ngoc-Thang/greybus-operation-arm-the-timeout-timer-before-sending-the-request/20261018-001743
base: linus/master
patch link: https://lore.kernel.org/r/20261017171743.24612-1-ngocthang2710.1999%40gmail.com
patch subject: [PATCH] greybus: operation: arm the timeout timer before sending the request
config: arc-randconfig-1000-20261018 (https://download.01.org/0day-ci/archive/20261018/202610181452.8uUjB47B-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261018/202610181452.8uUjB47B-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/202610181452.8uUjB47B-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/greybus/operation.c: In function 'gb_operation_request_send':
>> drivers/greybus/operation.c:785:1: warning: label 'err_put_active' defined but not used [-Wunused-label]
785 | err_put_active:
| ^~~~~~~~~~~~~~
vim +/err_put_active +785 drivers/greybus/operation.c
10c69399043351 drivers/staging/greybus/operation.c Alex Elder 2014-11-21 703
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 704 /**
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 705 * gb_operation_request_send() - send an operation request message
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 706 * @operation: the operation to initiate
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 707 * @callback: the operation completion callback
dbec27298b0df8 drivers/staging/greybus/operation.c Johan Hovold 2017-01-23 708 * @timeout: operation timeout in milliseconds, or zero for no timeout
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 709 * @gfp: the memory flags to use for any allocations
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 710 *
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 711 * The caller has filled in any payload so the request message is ready to go.
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 712 * The callback function supplied will be called when the response message has
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 713 * arrived, a unidirectional request has been sent, or the operation is
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 714 * cancelled, indicating that the operation is complete. The callback function
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 715 * can fetch the result of the operation using gb_operation_result() if
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 716 * desired.
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 717 *
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 718 * Return: 0 if the request was successfully queued in the host-driver queues,
613c15e86b7ac3 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 719 * or a negative errno.
d90c25b0a279b0 drivers/staging/greybus/operation.c Alex Elder 2014-10-16 720 */
d90c25b0a279b0 drivers/staging/greybus/operation.c Alex Elder 2014-10-16 721 int gb_operation_request_send(struct gb_operation *operation,
a52c4352aef855 drivers/staging/greybus/operation.c Johan Hovold 2015-07-01 722 gb_operation_callback callback,
dbec27298b0df8 drivers/staging/greybus/operation.c Johan Hovold 2017-01-23 723 unsigned int timeout,
a52c4352aef855 drivers/staging/greybus/operation.c Johan Hovold 2015-07-01 724 gfp_t gfp)
d90c25b0a279b0 drivers/staging/greybus/operation.c Alex Elder 2014-10-16 725 {
afb2e1342e75b5 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 726 struct gb_connection *connection = operation->connection;
afb2e1342e75b5 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 727 struct gb_operation_msg_hdr *header;
4afb7fd0154753 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 728 unsigned int cycle;
ea2c2ee8057138 drivers/staging/greybus/operation.c Johan Hovold 2015-03-27 729 int ret;
d90c25b0a279b0 drivers/staging/greybus/operation.c Alex Elder 2014-10-16 730
ca1f8f809024db drivers/staging/greybus/operation.c Johan Hovold 2016-05-11 731 if (gb_connection_is_offloaded(connection))
ca1f8f809024db drivers/staging/greybus/operation.c Johan Hovold 2016-05-11 732 return -EBUSY;
ca1f8f809024db drivers/staging/greybus/operation.c Johan Hovold 2016-05-11 733
37754030b0b9f7 drivers/staging/greybus/operation.c Johan Hovold 2015-03-27 734 if (!callback)
37754030b0b9f7 drivers/staging/greybus/operation.c Johan Hovold 2015-03-27 735 return -EINVAL;
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 736
c25572ca943a1f drivers/staging/greybus/operation.c Alex Elder 2014-12-03 737 /*
c25572ca943a1f drivers/staging/greybus/operation.c Alex Elder 2014-12-03 738 * Record the callback function, which is executed in
c25572ca943a1f drivers/staging/greybus/operation.c Alex Elder 2014-12-03 739 * non-atomic (workqueue) context when the final result
c25572ca943a1f drivers/staging/greybus/operation.c Alex Elder 2014-12-03 740 * of an operation has been set.
c25572ca943a1f drivers/staging/greybus/operation.c Alex Elder 2014-12-03 741 */
d90c25b0a279b0 drivers/staging/greybus/operation.c Alex Elder 2014-10-16 742 operation->callback = callback;
afb2e1342e75b5 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 743
afb2e1342e75b5 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 744 /*
afb2e1342e75b5 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 745 * Assign the operation's id, and store it in the request header.
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 746 * Zero is a reserved operation id for unidirectional operations.
afb2e1342e75b5 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 747 */
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 748 if (gb_operation_is_unidirectional(operation)) {
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 749 operation->id = 0;
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 750 } else {
4afb7fd0154753 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 751 cycle = (unsigned int)atomic_inc_return(&connection->op_cycle);
4afb7fd0154753 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 752 operation->id = (u16)(cycle % U16_MAX + 1);
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 753 }
3e2ee2c1e50541 drivers/staging/greybus/operation.c Johan Hovold 2016-04-29 754
afb2e1342e75b5 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 755 header = operation->request->header;
afb2e1342e75b5 drivers/staging/greybus/operation.c Alex Elder 2014-12-03 756 header->operation_id = cpu_to_le16(operation->id);
e8b48d1586abd6 drivers/staging/greybus/operation.c Alex Elder 2014-11-20 757
3deb37d4ad04c6 drivers/staging/greybus/operation.c Alex Elder 2014-11-25 758 gb_operation_result_set(operation, -EINPROGRESS);
c25572ca943a1f drivers/staging/greybus/operation.c Alex Elder 2014-12-03 759
3325a4ad7122ac drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 760 /*
3325a4ad7122ac drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 761 * Get an extra reference on the operation. It'll be dropped when the
3325a4ad7122ac drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 762 * operation completes.
3325a4ad7122ac drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 763 */
3325a4ad7122ac drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 764 gb_operation_get(operation);
3325a4ad7122ac drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 765 ret = gb_operation_get_active(operation);
3325a4ad7122ac drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 766 if (ret)
3325a4ad7122ac drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 767 goto err_put;
3325a4ad7122ac drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 768
7a8e53d4f57e9c drivers/greybus/operation.c Nguyen Ngoc Thang 2026-10-18 769 /* Arm before sending, as the response may complete the operation at once. */
dbec27298b0df8 drivers/staging/greybus/operation.c Johan Hovold 2017-01-23 770 if (timeout) {
dbec27298b0df8 drivers/staging/greybus/operation.c Johan Hovold 2017-01-23 771 operation->timer.expires = jiffies + msecs_to_jiffies(timeout);
dbec27298b0df8 drivers/staging/greybus/operation.c Johan Hovold 2017-01-23 772 add_timer(&operation->timer);
dbec27298b0df8 drivers/staging/greybus/operation.c Johan Hovold 2017-01-23 773 }
dbec27298b0df8 drivers/staging/greybus/operation.c Johan Hovold 2017-01-23 774
7a8e53d4f57e9c drivers/greybus/operation.c Nguyen Ngoc Thang 2026-10-18 775 ret = gb_message_send(operation->request, gfp);
7a8e53d4f57e9c drivers/greybus/operation.c Nguyen Ngoc Thang 2026-10-18 776 if (ret)
7a8e53d4f57e9c drivers/greybus/operation.c Nguyen Ngoc Thang 2026-10-18 777 goto err_del_timer;
7a8e53d4f57e9c drivers/greybus/operation.c Nguyen Ngoc Thang 2026-10-18 778
008974cb528d30 drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 779 return 0;
008974cb528d30 drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 780
7a8e53d4f57e9c drivers/greybus/operation.c Nguyen Ngoc Thang 2026-10-18 781 err_del_timer:
7a8e53d4f57e9c drivers/greybus/operation.c Nguyen Ngoc Thang 2026-10-18 782 /* A timer that already fired has queued work which drops our references. */
7a8e53d4f57e9c drivers/greybus/operation.c Nguyen Ngoc Thang 2026-10-18 783 if (timeout && !timer_delete_sync(&operation->timer))
7a8e53d4f57e9c drivers/greybus/operation.c Nguyen Ngoc Thang 2026-10-18 784 return ret;
008974cb528d30 drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 @785 err_put_active:
3eeac7e37ce985 drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 786 gb_operation_put_active(operation);
008974cb528d30 drivers/staging/greybus/operation.c Johan Hovold 2015-07-14 787 err_put:
ea2c2ee8057138 drivers/staging/greybus/operation.c Johan Hovold 2015-03-27 788 gb_operation_put(operation);
ea2c2ee8057138 drivers/staging/greybus/operation.c Johan Hovold 2015-03-27 789
ea2c2ee8057138 drivers/staging/greybus/operation.c Johan Hovold 2015-03-27 790 return ret;
c25572ca943a1f drivers/staging/greybus/operation.c Alex Elder 2014-12-03 791 }
1dad6b3515b2ca drivers/staging/greybus/operation.c Johan Hovold 2015-03-27 792 EXPORT_SYMBOL_GPL(gb_operation_request_send);
c25572ca943a1f drivers/staging/greybus/operation.c Alex Elder 2014-12-03 793
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2026-10-18 6:53 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20261017171743.24612-1-ngocthang2710.1999@gmail.com>]
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=202610181452.8uUjB47B-lkp@intel.com \
--to=lkp@intel.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ngocthang2710.1999@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=syzbot+a2e50fb40695811c2dab@syzkaller.appspotmail.com \
/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.