* [lee-linaro:tb-fix-w1-warnings 86/106] drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:648:12: warning: variable 'plcp3' set but not used
@ 2020-08-19 22:59 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-19 22:59 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9895 bytes --]
tree: https://git.linaro.org/people/lee.jones/linux.git tb-fix-w1-warnings
head: 31f8a18cb18ed697485d9feb2715719b80a367bc
commit: e4f3b9c321d490413fde83389c8815709eead5ea [86/106] wireless: broadcom: brcm80211: brcmsmac: ampdu: Remove a bunch of unused variables
config: sh-randconfig-r031-20200818 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout e4f3b9c321d490413fde83389c8815709eead5ea
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
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 >>):
In file included from drivers/net/wireless/broadcom/brcm80211/brcmsmac/rate.h:21,
from drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:18:
drivers/net/wireless/broadcom/brcm80211/brcmsmac/d11.h:786:1: warning: alignment 1 of 'struct d11txh' is less than 2 [-Wpacked-not-aligned]
786 | } __packed;
| ^
drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c: In function 'brcms_c_ampdu_finalize':
>> drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:648:12: warning: variable 'plcp3' set but not used [-Wunused-but-set-variable]
648 | u8 plcp0, plcp3, is40, mcs;
| ^~~~~
drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c: In function 'brcms_c_ampdu_dotxstatus_complete':
drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:852:7: warning: variable 'update_rate' set but not used [-Wunused-but-set-variable]
852 | bool update_rate = true, retry = true;
| ^~~~~~~~~~~
drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c: In function 'brcms_c_ampdu_dotxstatus':
>> drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:1029:20: warning: variable 'scb_ampdu' set but not used [-Wunused-but-set-variable]
1029 | struct scb_ampdu *scb_ampdu;
| ^~~~~~~~~
git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
git fetch --no-tags lee-linaro tb-fix-w1-warnings
git checkout e4f3b9c321d490413fde83389c8815709eead5ea
vim +/plcp3 +648 drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c
625
626 void brcms_c_ampdu_finalize(struct brcms_ampdu_session *session)
627 {
628 struct brcms_c_info *wlc = session->wlc;
629 struct ampdu_info *ampdu = wlc->ampdu;
630 struct sk_buff *first, *last;
631 struct d11txh *txh;
632 struct ieee80211_tx_info *tx_info;
633 struct ieee80211_tx_rate *txrate;
634 u8 ndelim;
635 u8 *plcp;
636 uint len;
637 uint fifo;
638 struct brcms_fifo_info *f;
639 u16 mcl;
640 bool fbr;
641 bool fbr_iscck;
642 struct ieee80211_rts *rts;
643 bool use_rts = false, use_cts = false;
644 u16 dma_len = session->dma_len;
645 u16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ;
646 u32 rspec = 0, rspec_fallback = 0;
647 u32 rts_rspec = 0, rts_rspec_fallback = 0;
> 648 u8 plcp0, plcp3, is40, mcs;
649 u16 mch;
650 u8 preamble_type = BRCMS_GF_PREAMBLE;
651 u8 fbr_preamble_type = BRCMS_GF_PREAMBLE;
652 u8 rts_preamble_type = BRCMS_LONG_PREAMBLE;
653 u8 rts_fbr_preamble_type = BRCMS_LONG_PREAMBLE;
654
655 if (skb_queue_empty(&session->skb_list))
656 return;
657
658 first = skb_peek(&session->skb_list);
659 last = skb_peek_tail(&session->skb_list);
660
661 /* Need to fix up last MPDU first to adjust AMPDU length */
662 txh = (struct d11txh *)last->data;
663 fifo = le16_to_cpu(txh->TxFrameID) & TXFID_QUEUE_MASK;
664 f = &du->fifo_tb[fifo];
665
666 mcl = le16_to_cpu(txh->MacTxControlLow);
667 mcl &= ~TXC_AMPDU_MASK;
668 mcl |= (TXC_AMPDU_LAST << TXC_AMPDU_SHIFT);
669 txh->MacTxControlLow = cpu_to_le16(mcl);
670
671 /* remove the null delimiter after last mpdu */
672 ndelim = txh->RTSPLCPFallback[AMPDU_FBR_NULL_DELIM];
673 txh->RTSPLCPFallback[AMPDU_FBR_NULL_DELIM] = 0;
674 session->ampdu_len -= ndelim * AMPDU_DELIMITER_LEN;
675
676 /* remove the pad len from last mpdu */
677 fbr_iscck = ((le16_to_cpu(txh->XtraFrameTypes) & 0x3) == 0);
678 len = fbr_iscck ? BRCMS_GET_CCK_PLCP_LEN(txh->FragPLCPFallback) :
679 BRCMS_GET_MIMO_PLCP_LEN(txh->FragPLCPFallback);
680 session->ampdu_len -= roundup(len, 4) - len;
681
682 /* Now fix up the first MPDU */
683 tx_info = IEEE80211_SKB_CB(first);
684 txrate = tx_info->status.rates;
685 txh = (struct d11txh *)first->data;
686 plcp = (u8 *)(txh + 1);
687 rts = (struct ieee80211_rts *)&txh->rts_frame;
688
689 mcl = le16_to_cpu(txh->MacTxControlLow);
690 /* If only one MPDU leave it marked as last */
691 if (first != last) {
692 mcl &= ~TXC_AMPDU_MASK;
693 mcl |= (TXC_AMPDU_FIRST << TXC_AMPDU_SHIFT);
694 }
695 mcl |= TXC_STARTMSDU;
696 if (ieee80211_is_rts(rts->frame_control)) {
697 mcl |= TXC_SENDRTS;
698 use_rts = true;
699 }
700 if (ieee80211_is_cts(rts->frame_control)) {
701 mcl |= TXC_SENDCTS;
702 use_cts = true;
703 }
704 txh->MacTxControlLow = cpu_to_le16(mcl);
705
706 fbr = txrate[1].count > 0;
707 if (!fbr) {
708 plcp0 = plcp[0];
709 plcp3 = plcp[3];
710 } else {
711 plcp0 = txh->FragPLCPFallback[0];
712 plcp3 = txh->FragPLCPFallback[3];
713 }
714 is40 = (plcp0 & MIMO_PLCP_40MHZ) ? 1 : 0;
715 mcs = plcp0 & ~MIMO_PLCP_40MHZ;
716
717 if (is40) {
718 if (CHSPEC_SB_UPPER(wlc_phy_chanspec_get(wlc->band->pi)))
719 mimo_ctlchbw = PHY_TXC1_BW_20MHZ_UP;
720 else
721 mimo_ctlchbw = PHY_TXC1_BW_20MHZ;
722 }
723
724 /* rebuild the rspec and rspec_fallback */
725 rspec = RSPEC_MIMORATE;
726 rspec |= plcp[0] & ~MIMO_PLCP_40MHZ;
727 if (plcp[0] & MIMO_PLCP_40MHZ)
728 rspec |= (PHY_TXC1_BW_40MHZ << RSPEC_BW_SHIFT);
729
730 fbr_iscck = !(le16_to_cpu(txh->XtraFrameTypes) & 0x03);
731 if (fbr_iscck) {
732 rspec_fallback =
733 cck_rspec(cck_phy2mac_rate(txh->FragPLCPFallback[0]));
734 } else {
735 rspec_fallback = RSPEC_MIMORATE;
736 rspec_fallback |= txh->FragPLCPFallback[0] & ~MIMO_PLCP_40MHZ;
737 if (txh->FragPLCPFallback[0] & MIMO_PLCP_40MHZ)
738 rspec_fallback |= PHY_TXC1_BW_40MHZ << RSPEC_BW_SHIFT;
739 }
740
741 if (use_rts || use_cts) {
742 rts_rspec =
743 brcms_c_rspec_to_rts_rspec(wlc, rspec,
744 false, mimo_ctlchbw);
745 rts_rspec_fallback =
746 brcms_c_rspec_to_rts_rspec(wlc, rspec_fallback,
747 false, mimo_ctlchbw);
748 }
749
750 BRCMS_SET_MIMO_PLCP_LEN(plcp, session->ampdu_len);
751 /* mark plcp to indicate ampdu */
752 BRCMS_SET_MIMO_PLCP_AMPDU(plcp);
753
754 /* reset the mixed mode header durations */
755 if (txh->MModeLen) {
756 u16 mmodelen = brcms_c_calc_lsig_len(wlc, rspec,
757 session->ampdu_len);
758 txh->MModeLen = cpu_to_le16(mmodelen);
759 preamble_type = BRCMS_MM_PREAMBLE;
760 }
761 if (txh->MModeFbrLen) {
762 u16 mmfbrlen = brcms_c_calc_lsig_len(wlc, rspec_fallback,
763 session->ampdu_len);
764 txh->MModeFbrLen = cpu_to_le16(mmfbrlen);
765 fbr_preamble_type = BRCMS_MM_PREAMBLE;
766 }
767
768 /* set the preload length */
769 if (mcs_2_rate(mcs, true, false) >= f->dmaxferrate) {
770 dma_len = min(dma_len, f->ampdu_pld_size);
771 txh->PreloadSize = cpu_to_le16(dma_len);
772 } else {
773 txh->PreloadSize = 0;
774 }
775
776 mch = le16_to_cpu(txh->MacTxControlHigh);
777
778 /* update RTS dur fields */
779 if (use_rts || use_cts) {
780 u16 durid;
781 if ((mch & TXC_PREAMBLE_RTS_MAIN_SHORT) ==
782 TXC_PREAMBLE_RTS_MAIN_SHORT)
783 rts_preamble_type = BRCMS_SHORT_PREAMBLE;
784
785 if ((mch & TXC_PREAMBLE_RTS_FB_SHORT) ==
786 TXC_PREAMBLE_RTS_FB_SHORT)
787 rts_fbr_preamble_type = BRCMS_SHORT_PREAMBLE;
788
789 durid = brcms_c_compute_rtscts_dur(wlc, use_cts, rts_rspec,
790 rspec, rts_preamble_type,
791 preamble_type,
792 session->ampdu_len, true);
793 rts->duration = cpu_to_le16(durid);
794 durid = brcms_c_compute_rtscts_dur(wlc, use_cts,
795 rts_rspec_fallback,
796 rspec_fallback,
797 rts_fbr_preamble_type,
798 fbr_preamble_type,
799 session->ampdu_len, true);
800 txh->RTSDurFallback = cpu_to_le16(durid);
801 /* set TxFesTimeNormal */
802 txh->TxFesTimeNormal = rts->duration;
803 /* set fallback rate version of TxFesTimeNormal */
804 txh->TxFesTimeFallback = txh->RTSDurFallback;
805 }
806
807 /* set flag and plcp for fallback rate */
808 if (fbr) {
809 mch |= TXC_AMPDU_FBR;
810 txh->MacTxControlHigh = cpu_to_le16(mch);
811 BRCMS_SET_MIMO_PLCP_AMPDU(plcp);
812 BRCMS_SET_MIMO_PLCP_AMPDU(txh->FragPLCPFallback);
813 }
814
815 brcms_dbg_ht(wlc->hw->d11core, "wl%d: count %d ampdu_len %d\n",
816 wlc->pub->unit, skb_queue_len(&session->skb_list),
817 session->ampdu_len);
818 }
819
---
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: 30261 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-19 22:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 22:59 [lee-linaro:tb-fix-w1-warnings 86/106] drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:648:12: warning: variable 'plcp3' set but not used 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.