On Tuesday, 11 February 2020 14:10:04 CET Kalle Valo wrote: [...] > > diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c > > index 7b532bf9acd8..66a6cfd54ad9 100644 > > --- a/drivers/net/wireless/ath/ath11k/dp_tx.c > > +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c > > @@ -357,9 +357,12 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar, > > struct sk_buff *msdu, > > struct hal_tx_status *ts) > > { > > + struct ieee80211_tx_status status = { 0 }; > > This adds a sparse warning: > > drivers/net/wireless/ath/ath11k/dp_tx.c:350:47: warning: Using plain integer as NULL pointer > > Seems like a false warning, no? But not sure how to shut up the warning, > using '{ NULL }' would do that but just feels wrong. Any opinions? Why is this a false warning? The structure is following: struct ieee80211_tx_status { struct ieee80211_sta *sta; struct ieee80211_tx_info *info; struct sk_buff *skb; struct rate_info *rate; }; And this is a pre-C99 initializer. The equal C99-Initializer would be struct ieee80211_tx_status status = { .sta = NULL, }; So it is initializing status.sta with 0. But status.sta is a pointer and we should use NULL for pointers instead of plain 0. If you want to initialize the object on stack to zero but not initialize each member then just use {}. Kind regards, Sven