From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/3] scsi: storvsc: Use vmbus_requestor to generate transaction IDs for VMBus hardening
Date: Fri, 26 Jun 2020 06:20:14 +0800 [thread overview]
Message-ID: <202006260616.3GnLcsO7%lkp@intel.com> (raw)
In-Reply-To: <20200625153723.8428-3-lkmlabelt@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5878 bytes --]
Hi Andres,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20200625]
[also build test WARNING on v5.8-rc2]
[cannot apply to mkp-scsi/for-next scsi/for-next linux/master linus/master v5.8-rc2 v5.8-rc1 v5.7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andres-Beltran/Drivers-hv-vmbus-vmbus_requestor-data-structure/20200625-234113
base: 3f9437c6234d95d96967f1b438a4fb71b6be254d
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/scsi/storvsc_drv.c: In function 'handle_multichannel_storage':
>> drivers/scsi/storvsc_drv.c:771:63: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
771 | rqst_id = vmbus_next_request_id(&device->channel->requestor, (u64)request);
| ^
drivers/scsi/storvsc_drv.c: In function 'storvsc_execute_vstor_op':
drivers/scsi/storvsc_drv.c:844:63: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
844 | rqst_id = vmbus_next_request_id(&device->channel->requestor, (u64)request);
| ^
drivers/scsi/storvsc_drv.c: In function 'storvsc_on_channel_callback':
>> drivers/scsi/storvsc_drv.c:1272:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1272 | request = (struct storvsc_cmd_request *)cmd_rqst;
| ^
drivers/scsi/storvsc_drv.c: In function 'storvsc_do_io':
drivers/scsi/storvsc_drv.c:1507:64: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1507 | rqst_id = vmbus_next_request_id(&outgoing_channel->requestor, (u64)request);
| ^
drivers/scsi/storvsc_drv.c: In function 'storvsc_host_reset_handler':
drivers/scsi/storvsc_drv.c:1631:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1631 | (u64)&stor_device->reset_request);
| ^
vim +771 drivers/scsi/storvsc_drv.c
727
728 static void handle_multichannel_storage(struct hv_device *device, int max_chns)
729 {
730 struct device *dev = &device->device;
731 struct storvsc_device *stor_device;
732 int num_sc;
733 struct storvsc_cmd_request *request;
734 struct vstor_packet *vstor_packet;
735 int ret, t;
736 u64 rqst_id;
737
738 /*
739 * If the number of CPUs is artificially restricted, such as
740 * with maxcpus=1 on the kernel boot line, Hyper-V could offer
741 * sub-channels >= the number of CPUs. These sub-channels
742 * should not be created. The primary channel is already created
743 * and assigned to one CPU, so check against # CPUs - 1.
744 */
745 num_sc = min((int)(num_online_cpus() - 1), max_chns);
746 if (!num_sc)
747 return;
748
749 stor_device = get_out_stor_device(device);
750 if (!stor_device)
751 return;
752
753 stor_device->num_sc = num_sc;
754 request = &stor_device->init_request;
755 vstor_packet = &request->vstor_packet;
756
757 /*
758 * Establish a handler for dealing with subchannels.
759 */
760 vmbus_set_sc_create_callback(device->channel, handle_sc_creation);
761
762 /*
763 * Request the host to create sub-channels.
764 */
765 memset(request, 0, sizeof(struct storvsc_cmd_request));
766 init_completion(&request->wait_event);
767 vstor_packet->operation = VSTOR_OPERATION_CREATE_SUB_CHANNELS;
768 vstor_packet->flags = REQUEST_COMPLETION_FLAG;
769 vstor_packet->sub_channel_count = num_sc;
770
> 771 rqst_id = vmbus_next_request_id(&device->channel->requestor, (u64)request);
772 if (rqst_id == VMBUS_RQST_ERROR) {
773 dev_err(dev, "No request id available\n");
774 return;
775 }
776
777 ret = vmbus_sendpacket(device->channel, vstor_packet,
778 (sizeof(struct vstor_packet) -
779 vmscsi_size_delta),
780 rqst_id,
781 VM_PKT_DATA_INBAND,
782 VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
783
784 if (ret != 0) {
785 /* Reclaim request ID to avoid leak of IDs */
786 vmbus_request_addr(&device->channel->requestor, rqst_id);
787 dev_err(dev, "Failed to create sub-channel: err=%d\n", ret);
788 return;
789 }
790
791 t = wait_for_completion_timeout(&request->wait_event, 10*HZ);
792 if (t == 0) {
793 dev_err(dev, "Failed to create sub-channel: timed out\n");
794 return;
795 }
796
797 if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
798 vstor_packet->status != 0) {
799 dev_err(dev, "Failed to create sub-channel: op=%d, sts=%d\n",
800 vstor_packet->operation, vstor_packet->status);
801 return;
802 }
803
804 /*
805 * We need to do nothing here, because vmbus_process_offer()
806 * invokes channel->sc_creation_callback, which will open and use
807 * the sub-channel(s).
808 */
809 }
810
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 74226 bytes --]
next prev parent reply other threads:[~2020-06-25 22:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 15:37 [PATCH 0/3] Drivers: hv: vmbus: vmbus_requestor data structure Andres Beltran
2020-06-25 15:37 ` [PATCH 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening Andres Beltran
2020-06-26 13:19 ` Wei Liu
2020-06-25 15:37 ` [PATCH 2/3] scsi: storvsc: Use vmbus_requestor to generate transaction IDs " Andres Beltran
2020-06-25 22:20 ` kernel test robot [this message]
2020-06-26 13:35 ` Wei Liu
2020-06-25 15:37 ` [PATCH 3/3] hv_netvsc: " Andres Beltran
2020-06-25 18:57 ` Haiyang Zhang
2020-06-25 23:37 ` kernel test robot
2020-06-25 23:37 ` kernel test robot
2020-06-25 18:22 ` [PATCH 0/3] Drivers: hv: vmbus: vmbus_requestor data structure Andrea Parri
2020-06-26 13:42 ` Wei Liu
2020-06-26 14:48 ` Andrea Parri
2020-06-26 20:57 ` Wei Liu
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=202006260616.3GnLcsO7%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.