* [chrome-os:chromeos-5.4 9642/9999] drivers/net/wireless/ath/ath10k/htc.c:635:25: sparse: sparse: cast to restricted __le16
@ 2022-01-31 23:31 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-31 23:31 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4728 bytes --]
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: cf079f9c976566e670c2d6d173481f75edfda8b7
commit: 60fdebd0f6870ae5ba17d15b7ea3610de330a4e0 [9642/9999] FROMLIST: ath10k: Set tx credit to one for wcn3990 snoc based devices
config: alpha-randconfig-s032-20220130 (https://download.01.org/0day-ci/archive/20220201/202202010441.k1jjydBz-lkp(a)intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 60fdebd0f6870ae5ba17d15b7ea3610de330a4e0
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/net/wireless/ath/ath10k/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/wireless/ath/ath10k/htc.c:635:25: sparse: sparse: cast to restricted __le16
vim +635 drivers/net/wireless/ath/ath10k/htc.c
583
584 int ath10k_htc_wait_target(struct ath10k_htc *htc)
585 {
586 struct ath10k *ar = htc->ar;
587 int i, status = 0;
588 unsigned long time_left;
589 struct ath10k_htc_msg *msg;
590 u16 message_id;
591
592 time_left = wait_for_completion_timeout(&htc->ctl_resp,
593 ATH10K_HTC_WAIT_TIMEOUT_HZ);
594 if (!time_left) {
595 /* Workaround: In some cases the PCI HIF doesn't
596 * receive interrupt for the control response message
597 * even if the buffer was completed. It is suspected
598 * iomap writes unmasking PCI CE irqs aren't propagated
599 * properly in KVM PCI-passthrough sometimes.
600 */
601 ath10k_warn(ar, "failed to receive control response completion, polling..\n");
602
603 for (i = 0; i < CE_COUNT; i++)
604 ath10k_hif_send_complete_check(htc->ar, i, 1);
605
606 time_left =
607 wait_for_completion_timeout(&htc->ctl_resp,
608 ATH10K_HTC_WAIT_TIMEOUT_HZ);
609
610 if (!time_left)
611 status = -ETIMEDOUT;
612 }
613
614 if (status < 0) {
615 ath10k_err(ar, "ctl_resp never came in (%d)\n", status);
616 return status;
617 }
618
619 if (htc->control_resp_len < sizeof(msg->hdr) + sizeof(msg->ready)) {
620 ath10k_err(ar, "Invalid HTC ready msg len:%d\n",
621 htc->control_resp_len);
622 return -ECOMM;
623 }
624
625 msg = (struct ath10k_htc_msg *)htc->control_resp_buffer;
626 message_id = __le16_to_cpu(msg->hdr.message_id);
627
628 if (message_id != ATH10K_HTC_MSG_READY_ID) {
629 ath10k_err(ar, "Invalid HTC ready msg: 0x%x\n", message_id);
630 return -ECOMM;
631 }
632
633 if (ar->hw_params.tx_credit_limit)
634 htc->total_transmit_credits =
> 635 __le16_to_cpu(HTC_HOST_MAX_CREDIT_COUNT);
636 else
637 htc->total_transmit_credits =
638 __le16_to_cpu(msg->ready.credit_count);
639
640 htc->target_credit_size = __le16_to_cpu(msg->ready.credit_size);
641
642 ath10k_dbg(ar, ATH10K_DBG_HTC,
643 "Target ready! transmit resources: %d size:%d actual credits:%d\n",
644 htc->total_transmit_credits,
645 htc->target_credit_size,
646 msg->ready.credit_count);
647
648 if ((htc->total_transmit_credits == 0) ||
649 (htc->target_credit_size == 0)) {
650 ath10k_err(ar, "Invalid credit size received\n");
651 return -ECOMM;
652 }
653
654 /* The only way to determine if the ready message is an extended
655 * message is from the size.
656 */
657 if (htc->control_resp_len >=
658 sizeof(msg->hdr) + sizeof(msg->ready_ext)) {
659 htc->max_msgs_per_htc_bundle =
660 min_t(u8, msg->ready_ext.max_msgs_per_htc_bundle,
661 HTC_HOST_MAX_MSG_PER_RX_BUNDLE);
662 ath10k_dbg(ar, ATH10K_DBG_HTC,
663 "Extended ready message. RX bundle size: %d\n",
664 htc->max_msgs_per_htc_bundle);
665 }
666
667 return 0;
668 }
669
---
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-31 23:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 23:31 [chrome-os:chromeos-5.4 9642/9999] drivers/net/wireless/ath/ath10k/htc.c:635:25: sparse: sparse: cast to restricted __le16 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.