* [linux-stable-rc:linux-5.4.y 1315/3868] drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: sparse: incorrect type in assignment (different base types)
@ 2020-11-13 8:12 kernel test robot
2020-11-13 8:46 ` Masashi Honma
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-11-13 8:12 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6032 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head: e72abf1f11a982a2a3fb555b5a9bd2eb2011dee8
commit: e307bfda74a9c66426313eca25ccfea877a50036 [1315/3868] ath9k_htc: Discard undersized packets
config: sh-randconfig-s032-20201103 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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.3-107-gaf3512a6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=e307bfda74a9c66426313eca25ccfea877a50036
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.4.y
git checkout e307bfda74a9c66426313eca25ccfea877a50036
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh
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/ath9k/htc_drv_txrx.c: note: in included file (through arch/sh/include/asm/unistd.h, include/uapi/linux/unistd.h, include/linux/compat.h, ...):
./arch/sh/include/generated/uapi/asm/unistd_32.h:409:37: sparse: sparse: no newline at end of file
>> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] rs_datalen @@ got unsigned short [usertype] @@
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: expected restricted __be16 [usertype] rs_datalen
>> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: got unsigned short [usertype]
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:988:13: sparse: sparse: restricted __be16 degrades to integer
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1001:13: sparse: sparse: restricted __be16 degrades to integer
vim +987 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
962
963 static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
964 struct ath9k_htc_rxbuf *rxbuf,
965 struct ieee80211_rx_status *rx_status)
966
967 {
968 struct ieee80211_hdr *hdr;
969 struct ieee80211_hw *hw = priv->hw;
970 struct sk_buff *skb = rxbuf->skb;
971 struct ath_common *common = ath9k_hw_common(priv->ah);
972 struct ath_hw *ah = common->ah;
973 struct ath_htc_rx_status *rxstatus;
974 struct ath_rx_status rx_stats;
975 bool decrypt_error = false;
976 __be16 rs_datalen;
977 bool is_phyerr;
978
979 if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
980 ath_err(common, "Corrupted RX frame, dropping (len: %d)\n",
981 skb->len);
982 goto rx_next;
983 }
984
985 rxstatus = (struct ath_htc_rx_status *)skb->data;
986
> 987 rs_datalen = be16_to_cpu(rxstatus->rs_datalen);
988 if (unlikely(rs_datalen -
989 (skb->len - HTC_RX_FRAME_HEADER_SIZE) != 0)) {
990 ath_err(common,
991 "Corrupted RX data len, dropping (dlen: %d, skblen: %d)\n",
992 rs_datalen, skb->len);
993 goto rx_next;
994 }
995
996 is_phyerr = rxstatus->rs_status & ATH9K_RXERR_PHY;
997 /*
998 * Discard zero-length packets and packets smaller than an ACK
999 * which are not PHY_ERROR (short radar pulses have a length of 3)
1000 */
1001 if (unlikely(!rs_datalen || (rs_datalen < 10 && !is_phyerr))) {
1002 ath_warn(common,
1003 "Short RX data len, dropping (dlen: %d)\n",
1004 rs_datalen);
1005 goto rx_next;
1006 }
1007
1008 /* Get the RX status information */
1009
1010 memset(rx_status, 0, sizeof(struct ieee80211_rx_status));
1011
1012 /* Copy everything from ath_htc_rx_status (HTC_RX_FRAME_HEADER).
1013 * After this, we can drop this part of skb. */
1014 rx_status_htc_to_ath(&rx_stats, rxstatus);
1015 ath9k_htc_err_stat_rx(priv, &rx_stats);
1016 rx_status->mactime = be64_to_cpu(rxstatus->rs_tstamp);
1017 skb_pull(skb, HTC_RX_FRAME_HEADER_SIZE);
1018
1019 /*
1020 * everything but the rate is checked here, the rate check is done
1021 * separately to avoid doing two lookups for a rate for each frame.
1022 */
1023 hdr = (struct ieee80211_hdr *)skb->data;
1024
1025 /*
1026 * Process PHY errors and return so that the packet
1027 * can be dropped.
1028 */
1029 if (unlikely(is_phyerr)) {
1030 /* TODO: Not using DFS processing now. */
1031 if (ath_cmn_process_fft(&priv->spec_priv, hdr,
1032 &rx_stats, rx_status->mactime)) {
1033 /* TODO: Code to collect spectral scan statistics */
1034 }
1035 goto rx_next;
1036 }
1037
1038 if (!ath9k_cmn_rx_accept(common, hdr, rx_status, &rx_stats,
1039 &decrypt_error, priv->rxfilter))
1040 goto rx_next;
1041
1042 ath9k_cmn_rx_skb_postprocess(common, skb, &rx_stats,
1043 rx_status, decrypt_error);
1044
1045 if (ath9k_cmn_process_rate(common, hw, &rx_stats, rx_status))
1046 goto rx_next;
1047
1048 rx_stats.is_mybeacon = ath_is_mybeacon(common, hdr);
1049 ath9k_cmn_process_rssi(common, hw, &rx_stats, rx_status);
1050
1051 rx_status->band = ah->curchan->chan->band;
1052 rx_status->freq = ah->curchan->chan->center_freq;
1053 rx_status->antenna = rx_stats.rs_antenna;
1054 rx_status->flag |= RX_FLAG_MACTIME_END;
1055
1056 return true;
1057 rx_next:
1058 return false;
1059 }
1060
---
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: 26007 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-stable-rc:linux-5.4.y 1315/3868] drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: sparse: incorrect type in assignment (different base types)
2020-11-13 8:12 [linux-stable-rc:linux-5.4.y 1315/3868] drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: sparse: incorrect type in assignment (different base types) kernel test robot
@ 2020-11-13 8:46 ` Masashi Honma
2020-11-13 12:45 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Masashi Honma @ 2020-11-13 8:46 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2645 bytes --]
On 2020/11/13 17:12, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> head: e72abf1f11a982a2a3fb555b5a9bd2eb2011dee8
> commit: e307bfda74a9c66426313eca25ccfea877a50036 [1315/3868] ath9k_htc: Discard undersized packets
> config: sh-randconfig-s032-20201103 (attached as .config)
> compiler: sh4-linux-gcc (GCC) 9.3.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.3-107-gaf3512a6-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=e307bfda74a9c66426313eca25ccfea877a50036
> git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> git fetch --no-tags linux-stable-rc linux-5.4.y
> git checkout e307bfda74a9c66426313eca25ccfea877a50036
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh
>
> 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/ath9k/htc_drv_txrx.c: note: in included file (through arch/sh/include/asm/unistd.h, include/uapi/linux/unistd.h, include/linux/compat.h, ...):
> ./arch/sh/include/generated/uapi/asm/unistd_32.h:409:37: sparse: sparse: no newline at end of file
>>> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] rs_datalen @@ got unsigned short [usertype] @@
> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: expected restricted __be16 [usertype] rs_datalen
>>> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: got unsigned short [usertype]
> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:988:13: sparse: sparse: restricted __be16 degrades to integer
> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1001:13: sparse: sparse: restricted __be16 degrades to integer
>
I already fixed this issue by
commit 5024f21c159f8c1668f581fff37140741c0b1ba9 "ath9k_htc: Use
appropriate rs_datalen type".
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5024f21c159f8c1668f581fff37140741c0b1ba9
Regards,
Masashi Honma
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-stable-rc:linux-5.4.y 1315/3868] drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: sparse: incorrect type in assignment (different base types)
2020-11-13 8:46 ` Masashi Honma
@ 2020-11-13 12:45 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2020-11-13 12:45 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2797 bytes --]
On Fri, Nov 13, 2020 at 05:46:30PM +0900, Masashi Honma wrote:
> On 2020/11/13 17:12, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> > head: e72abf1f11a982a2a3fb555b5a9bd2eb2011dee8
> > commit: e307bfda74a9c66426313eca25ccfea877a50036 [1315/3868] ath9k_htc: Discard undersized packets
> > config: sh-randconfig-s032-20201103 (attached as .config)
> > compiler: sh4-linux-gcc (GCC) 9.3.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.3-107-gaf3512a6-dirty
> > # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=e307bfda74a9c66426313eca25ccfea877a50036
> > git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> > git fetch --no-tags linux-stable-rc linux-5.4.y
> > git checkout e307bfda74a9c66426313eca25ccfea877a50036
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh
> >
> > 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/ath9k/htc_drv_txrx.c: note: in included file (through arch/sh/include/asm/unistd.h, include/uapi/linux/unistd.h, include/linux/compat.h, ...):
> > ./arch/sh/include/generated/uapi/asm/unistd_32.h:409:37: sparse: sparse: no newline at end of file
> > > > drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] rs_datalen @@ got unsigned short [usertype] @@
> > drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: expected restricted __be16 [usertype] rs_datalen
> > > > drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: got unsigned short [usertype]
> > drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:988:13: sparse: sparse: restricted __be16 degrades to integer
> > drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1001:13: sparse: sparse: restricted __be16 degrades to integer
> >
>
> I already fixed this issue by
> commit 5024f21c159f8c1668f581fff37140741c0b1ba9 "ath9k_htc: Use appropriate
> rs_datalen type".
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5024f21c159f8c1668f581fff37140741c0b1ba9
Thanks, now queued up.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-13 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 8:12 [linux-stable-rc:linux-5.4.y 1315/3868] drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: sparse: incorrect type in assignment (different base types) kernel test robot
2020-11-13 8:46 ` Masashi Honma
2020-11-13 12:45 ` Greg Kroah-Hartman
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.