* [ath6kl:ath11k-bringup 3/42] drivers/net/wireless/ath/ath11k/debug_htt_stats.c:850:59: sparse: warning: Using plain integer as NULL pointer
@ 2019-03-07 21:03 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-03-07 21:03 UTC (permalink / raw)
To: Kalle Valo; +Cc: kbuild-all, ath10k
[-- Attachment #1: Type: text/plain, Size: 17013 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath11k-bringup
head: e7daa3ec639f390e383dae0db9e6b143bcc7b5bc
commit: 258bbf525e652e244aa8b2331f55fda573fbe926 [3/42] ath11k: add driver
reproduce:
# apt-get install sparse
git checkout 258bbf525e652e244aa8b2331f55fda573fbe926
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
In file included from include/linux/spinlock_types.h:18,
from include/linux/spinlock.h:82,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/skbuff.h:19,
from include/linux/if_ether.h:23,
from include/net/mac80211.h:21,
from drivers/net//wireless/ath/ath11k/mac.c:6:
drivers/net//wireless/ath/ath11k/mac.c: In function 'ath11k_mac_set_peer_vht_fixed_rate.isra.22':
>> include/linux/lockdep.h:340:45: warning: 'ar' may be used uninitialized in this function [-Wmaybe-uninitialized]
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
drivers/net//wireless/ath/ath11k/mac.c:2299:17: note: 'ar' was declared here
struct ath11k *ar;
^~
--
drivers/net//wireless/ath/ath11k/debug_htt_stats.c: In function 'ath11k_dbg_htt_ext_stats_handler':
>> drivers/net//wireless/ath/ath11k/debug_htt_stats.c:4619:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
stats_req = (struct debug_htt_stats_req *)cookie_lsb;
^
drivers/net//wireless/ath/ath11k/debug_htt_stats.c: In function 'ath11k_read_htt_stats':
>> drivers/net//wireless/ath/ath11k/debug_htt_stats.c:4706:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
cookie |= (u32)stats_req;
^
--
>> drivers/net/wireless/ath/ath11k/hal_rx.c:118:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:120:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:122:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:124:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:126:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:128:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:130:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:132:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:134:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:136:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:138:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:140:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:142:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:144:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:146:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:148:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:150:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:152:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:154:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:156:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:158:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:160:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:166:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:170:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:172:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:176:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:178:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:180:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:182:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:184:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:186:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:188:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:190:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:192:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:213:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:217:17: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/hal_rx.c:219:17: sparse: warning: dubious: x & !y
--
>> drivers/net/wireless/ath/ath11k/mac.c:287:5: sparse: warning: symbol 'ath11k_mac_vif_chan' was not declared. Should it be static?
drivers/net/wireless/ath/ath11k/mac.c:414:5: sparse: warning: symbol 'ath11k_pdev_caps_update' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/mac.c:614:5: sparse: warning: symbol 'ath11k_wait_for_peer_created' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/mac.c:619:5: sparse: warning: symbol 'ath11k_wait_for_peer_deleted' was not declared. Should it be static?
--
In file included from include/linux/spinlock_types.h:18,
from include/linux/spinlock.h:82,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/skbuff.h:19,
from include/linux/if_ether.h:23,
from include/net/mac80211.h:21,
from drivers/net/wireless/ath/ath11k/mac.c:6:
drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_mac_set_peer_vht_fixed_rate.isra.22':
>> include/linux/lockdep.h:340:45: warning: 'ar' may be used uninitialized in this function [-Wmaybe-uninitialized]
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^
drivers/net/wireless/ath/ath11k/mac.c:2299:17: note: 'ar' was declared here
struct ath11k *ar;
^~
--
>> drivers/net/wireless/ath/ath11k/wmi.c:166:12: sparse: warning: symbol 'ath11k_wmi_tlv_parse_alloc' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:186:5: sparse: warning: symbol 'ath11k_wmi_cmd_send_nowait' was not declared. Should it be static?
drivers/net/wireless/ath/ath11k/wmi.c:216:5: sparse: warning: symbol 'ath11k_wmi_cmd_send' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:441:5: sparse: warning: symbol 'ath11k_service_ready_event' was not declared. Should it be static?
drivers/net/wireless/ath/ath11k/wmi.c:457:16: sparse: warning: symbol 'ath11k_wmi_alloc_skb' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:687:6: sparse: warning: symbol 'ath11k_wmi_put_wmi_channel' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:910:6: sparse: warning: symbol 'ath11k_send_green_ap_ps_enable_cmd' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:940:6: sparse: warning: symbol 'ath11k_send_gpio_config_cmd' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:977:5: sparse: warning: symbol 'ath11k_send_gpio_output_cmd' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:1006:5: sparse: warning: symbol 'ath11k_send_vdev_set_fwtest_param_cmd' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:2325:5: sparse: warning: symbol 'ath11k_send_set_sta_ps_mode_cmd' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:2358:5: sparse: warning: symbol 'ath11k_send_set_mimops_cmd' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:2412:5: sparse: warning: symbol 'ath11k_send_set_smps_params_cmd' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:2516:5: sparse: warning: symbol 'ath11k_send_bcn_buf_ll_cmd' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:3168:5: sparse: warning: symbol 'ath11k_service_ready_ext_event' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:3185:5: sparse: warning: symbol 'ath11k_pull_vdev_start_resp_tlv' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:3259:5: sparse: warning: symbol 'ath11k_pull_reg_chan_list_update_ev' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:3373:5: sparse: warning: symbol 'ath11k_pull_peer_del_resp_ev' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:3404:5: sparse: warning: symbol 'ath11k_pull_bcn_tx_status_ev' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:3433:5: sparse: warning: symbol 'ath11k_pull_vdev_stopped_param_tlv' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:3505:5: sparse: warning: symbol 'ath11k_pull_mgmt_rx_params_tlv' was not declared. Should it be static?
>> drivers/net/wireless/ath/ath11k/wmi.c:3596:5: sparse: warning: symbol 'ath11k_pull_mgmt_tx_compl_param_tlv' was not declared. Should it be static?
--
>> drivers/net/wireless/ath/ath11k/reg.c:27:39: sparse: warning: incorrect type in argument 1 (different address spaces)
drivers/net/wireless/ath/ath11k/reg.c:27:39: sparse: expected void const *
drivers/net/wireless/ath/ath11k/reg.c:27:39: sparse: got char const [noderef] <asn:4> *
--
>> drivers/net/wireless/ath/ath11k/qmi.c:1864:41: sparse: warning: Using plain integer as NULL pointer
>> drivers/net/wireless/ath/ath11k/qmi.c:1964:70: sparse: warning: incorrect type in argument 4 (different address spaces)
drivers/net/wireless/ath/ath11k/qmi.c:1964:70: sparse: expected void *bdf_addr
drivers/net/wireless/ath/ath11k/qmi.c:1964:70: sparse: got void [noderef] <asn:2> *[assigned] bdf_addr
--
>> drivers/net/wireless/ath/ath11k/dp_tx.c:649:23: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/dp_tx.c:651:23: sparse: warning: dubious: x & !y
drivers/net/wireless/ath/ath11k/dp_tx.c:654:23: sparse: warning: dubious: x & !y
--
>> drivers/net/wireless/ath/ath11k/debug_htt_stats.c:850:59: sparse: warning: Using plain integer as NULL pointer
>> drivers/net/wireless/ath/ath11k/debug_htt_stats.c:4619:51: sparse: warning: non size-preserving integer to pointer cast
>> drivers/net/wireless/ath/ath11k/debug_htt_stats.c:4706:24: sparse: warning: non size-preserving pointer to integer cast
sparse warnings: (new ones prefixed by >>)
drivers/net/wireless/ath/ath11k/reg.c:27:39: sparse: warning: incorrect type in argument 1 (different address spaces)
>> drivers/net/wireless/ath/ath11k/reg.c:27:39: sparse: expected void const *
>> drivers/net/wireless/ath/ath11k/reg.c:27:39: sparse: got char const [noderef] <asn:4> *
--
drivers/net/wireless/ath/ath11k/qmi.c:1864:41: sparse: warning: Using plain integer as NULL pointer
drivers/net/wireless/ath/ath11k/qmi.c:1964:70: sparse: warning: incorrect type in argument 4 (different address spaces)
>> drivers/net/wireless/ath/ath11k/qmi.c:1964:70: sparse: expected void *bdf_addr
>> drivers/net/wireless/ath/ath11k/qmi.c:1964:70: sparse: got void [noderef] <asn:2> *[assigned] bdf_addr
vim +850 drivers/net/wireless/ath/ath11k/debug_htt_stats.c
837
838 static inline void htt_print_tx_peer_rate_stats_tlv(const u32 *tag_buf, u8 *data)
839 {
840 struct htt_tx_peer_rate_stats_tlv *htt_stats_buf =
841 (struct htt_tx_peer_rate_stats_tlv *)tag_buf;
842 struct debug_htt_stats_req *stats_req =
843 (struct debug_htt_stats_req *)data;
844 u8 *buf = stats_req->buf;
845 u32 len = stats_req->buf_len;
846 u32 buf_len = ATH11K_HTT_STATS_BUF_SIZE;
847 u8 i, j;
848 u16 index = 0;
849 char str_buf[HTT_MAX_STRING_LEN] = {0};
> 850 char *tx_gi[HTT_TX_PEER_STATS_NUM_GI_COUNTERS] = {0};
851
852 for (i = 0; i < HTT_TX_PEER_STATS_NUM_GI_COUNTERS; i++)
853 tx_gi[i] = kmalloc(HTT_MAX_STRING_LEN, GFP_ATOMIC);
854
855 len += HTT_DBG_OUT(buf + len, buf_len - len, "HTT_TX_PEER_RATE_STATS_TLV:");
856 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_ldpc = %u",
857 htt_stats_buf->tx_ldpc);
858 len += HTT_DBG_OUT(buf + len, buf_len - len, "rts_cnt = %u",
859 htt_stats_buf->rts_cnt);
860 len += HTT_DBG_OUT(buf + len, buf_len - len, "ack_rssi = %u",
861 htt_stats_buf->ack_rssi);
862
863 index = 0;
864 memset(str_buf, 0x0, HTT_MAX_STRING_LEN);
865
866 for (i = 0; i < HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS; i++) {
867 index += snprintf(&str_buf[index],
868 HTT_MAX_STRING_LEN - index,
869 " %u:%u,", i, htt_stats_buf->tx_mcs[i]);
870 }
871
872 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_mcs = %s ", str_buf);
873
874 index = 0;
875 memset(str_buf, 0x0, HTT_MAX_STRING_LEN);
876
877 for (i = 0; i < HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS; i++)
878 index += snprintf(&str_buf[index],
879 HTT_MAX_STRING_LEN - index,
880 " %u:%u,", i, htt_stats_buf->tx_su_mcs[i]);
881
882 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_su_mcs = %s ", str_buf);
883 index = 0;
884 memset(str_buf, 0x0, HTT_MAX_STRING_LEN);
885
886 for (i = 0; i < HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS; i++)
887 index += snprintf(&str_buf[index],
888 HTT_MAX_STRING_LEN - index,
889 " %u:%u,", i, htt_stats_buf->tx_mu_mcs[i]);
890
891 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_mu_mcs = %s ", str_buf);
892 index = 0;
893 memset(str_buf, 0x0, HTT_MAX_STRING_LEN);
894
895 for (i = 0; i < HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS; i++)
896 index += snprintf(&str_buf[index],
897 HTT_MAX_STRING_LEN - index,
898 " %u:%u,", i, htt_stats_buf->tx_nss[i]);
899
900 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_nss = %s ", str_buf);
901 index = 0;
902 memset(str_buf, 0x0, HTT_MAX_STRING_LEN);
903
904 for (i = 0; i < HTT_TX_PDEV_STATS_NUM_BW_COUNTERS; i++)
905 index += snprintf(&str_buf[index],
906 HTT_MAX_STRING_LEN - index,
907 " %u:%u,", i, htt_stats_buf->tx_bw[i]);
908
909 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_bw = %s ", str_buf);
910 memset(str_buf, 0x0, HTT_MAX_STRING_LEN);
911
912 for (i = 0; i < HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS; i++)
913 index += snprintf(&str_buf[index],
914 HTT_MAX_STRING_LEN - index,
915 " %u:%u,", i, htt_stats_buf->tx_stbc[i]);
916
917 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_stbc = %s ", str_buf);
918 index = 0;
919 memset(str_buf, 0x0, HTT_MAX_STRING_LEN);
920
921 for (i = 0; i < HTT_TX_PDEV_STATS_NUM_PREAMBLE_TYPES; i++)
922 index += snprintf(&str_buf[index],
923 HTT_MAX_STRING_LEN - index,
924 " %u:%u,", i, htt_stats_buf->tx_pream[i]);
925
926 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_pream = %s ", str_buf);
927
928 for (j = 0; j < HTT_TX_PEER_STATS_NUM_GI_COUNTERS; j++) {
929 index = 0;
930
931 for (i = 0; i < HTT_TX_PEER_STATS_NUM_MCS_COUNTERS; i++)
932 index += snprintf(&tx_gi[j][index],
933 HTT_MAX_STRING_LEN - index,
934 " %u:%u,", i,
935 htt_stats_buf->tx_gi[j][i]);
936
937 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_gi[%u] = %s ",
938 j, tx_gi[j]);
939 }
940
941 index = 0;
942 memset(str_buf, 0x0, HTT_MAX_STRING_LEN);
943
944 for (i = 0; i < HTT_TX_PDEV_STATS_NUM_DCM_COUNTERS; i++)
945 index += snprintf(&str_buf[index],
946 HTT_MAX_STRING_LEN - index,
947 " %u:%u,", i, htt_stats_buf->tx_dcm[i]);
948
949 len += HTT_DBG_OUT(buf + len, buf_len - len, "tx_dcm = %s\n", str_buf);
950
951 for (i = 0; i < HTT_TX_PEER_STATS_NUM_GI_COUNTERS; i++)
952 kfree(tx_gi[i]);
953
954 if (len >= buf_len)
955 buf[buf_len - 1] = 0;
956 else
957 buf[len] = 0;
958
959 stats_req->buf_len = len;
960 }
961
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 67201 bytes --]
[-- Attachment #3: Type: text/plain, Size: 146 bytes --]
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-07 21:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 21:03 [ath6kl:ath11k-bringup 3/42] drivers/net/wireless/ath/ath11k/debug_htt_stats.c:850:59: sparse: warning: Using plain integer as NULL pointer kbuild 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.