linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Crispin <john@phrozen.org>
To: Sven Eckelmann <sven@narfation.org>, ath11k@lists.infradead.org
Cc: Kalle Valo <kvalo@codeaurora.org>, linux-wireless@vger.kernel.org
Subject: Re: [RESEND V2 3/4] ath11k: switch to using ieee80211_tx_status_ext()
Date: Tue, 11 Feb 2020 15:43:46 +0100	[thread overview]
Message-ID: <94d0da89-6b48-0433-7a01-275af1a99ca1@phrozen.org> (raw)
In-Reply-To: <4744821.iAptAJfnkX@bentobox>

On 11/02/2020 15:38, Sven Eckelmann wrote:
> 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
> 

yup, i just need to drop the 0 and use {}. I'll respin/send
	John

  reply	other threads:[~2020-02-11 14:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 15:11 [RESEND V2 1/4] ath11k: drop tx_info from ath11k_sta John Crispin
2020-02-04 15:11 ` [RESEND V2 2/4] ath11k: add HE rate accounting to driver John Crispin
2020-02-04 15:11 ` [RESEND V2 3/4] ath11k: switch to using ieee80211_tx_status_ext() John Crispin
2020-02-11 13:10   ` Kalle Valo
2020-02-11 14:38     ` Sven Eckelmann
2020-02-11 14:43       ` John Crispin [this message]
2020-02-12 15:55       ` Kalle Valo
2020-02-04 15:11 ` [PATCH 4/4] ath11k: add more HE fields into radiotap header John Crispin
2020-02-11 13:27   ` Kalle Valo
2020-02-11 18:30 ` [RESEND V2 1/4] ath11k: drop tx_info from ath11k_sta Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94d0da89-6b48-0433-7a01-275af1a99ca1@phrozen.org \
    --to=john@phrozen.org \
    --cc=ath11k@lists.infradead.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sven@narfation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).