Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5073904ybv; Tue, 11 Feb 2020 08:42:17 -0800 (PST) X-Google-Smtp-Source: APXvYqz+GQeJO7tRuGFJhXcK6pXtcfxsy5QnsgF8lVGNRw1TpuemhoIPZVQxYlQPrXWPasJyjsbx X-Received: by 2002:aca:be56:: with SMTP id o83mr3495948oif.25.1581439337787; Tue, 11 Feb 2020 08:42:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581439337; cv=none; d=google.com; s=arc-20160816; b=gjtUwuqCNX4TPr8DcbPJlWsLvfNourvh2mkz5fY0net+3fpts7bVU3Zrz52C7yGOD8 YkLF2TQgQnQyOTGMorkO/d6qPoAsiANSLPLxHxB4RbVHswYn+aZ0dp+NpjBrz8V0QQeu IeKOlonwkftx+YV1Q5sjJdZXRX4t4suryjDjiwNFlYcsx/2C+JDLfGU8RX5DRjOfQoru zq25Y5ODrXu4EXv3qRCxMmZ2EnuaOUR29XKBzxojR68ILTurkE/bWMVC5tRR26Capual +AaXvnSNIw9+DW8b3nQVv+GBJasvjF9lfF528hwnYzzw9CaZVo3q4UxdqzEa7w8+jXcQ lIrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=alXXpeg4h5DCs5MS4faLwqKOeDYEwnExF55kCS7NnCY=; b=vvzcsVZsw2pX5San7ax0upc3knZ1gsmmr7zsugw47a4dbCHZUkKyVc8FRzICTtGVq9 QALXvUl2m2UmRpNmNW/6wxHp+S+oVgkIqxY6lAwTBVdliLtnUd7g8m9xpzSktjewmOBW M/PmesrUADtD+i75SgJz0PlMa47L7dWXOlJnSgwjVS5HvzHpxRd5+BVS3QlKmkB7a32t neodHcyiAC9n6zLy/gQyHiaREQ2Lhi7C19sjP/fTV2MjxnELe4kGfrH2BJsJUP23IBR3 pKgzceurpmtA+CpA+1cE+tj4Dlxy5sBrtFPhAHdLJ79hZ8zuYDtq/GJY4svJTxwxfW96 th5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@narfation.org header.s=20121 header.b=u9pCI2r2; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=narfation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l21si2304047otd.1.2020.02.11.08.42.05; Tue, 11 Feb 2020 08:42:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@narfation.org header.s=20121 header.b=u9pCI2r2; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=narfation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728821AbgBKOib (ORCPT + 99 others); Tue, 11 Feb 2020 09:38:31 -0500 Received: from dvalin.narfation.org ([213.160.73.56]:46910 "EHLO dvalin.narfation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728456AbgBKOia (ORCPT ); Tue, 11 Feb 2020 09:38:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1581431909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=alXXpeg4h5DCs5MS4faLwqKOeDYEwnExF55kCS7NnCY=; b=u9pCI2r2fBeEte66ZBga6j6KbJpXU5AO8JnmXEcL72awgFVDH+rx63ZXUrB1jrZN/3hnAw gGD9WO5wSEprT/k4izmp0/U4UAWCYuxhIxBrMi+w1qXsbMDqfBtP+MX49jHUvz/FsVzgIs GsjZzcXz7vMgNnOfW6HL0FAaeTzqVJg= From: Sven Eckelmann To: ath11k@lists.infradead.org Cc: Kalle Valo , John Crispin , 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:38:22 +0100 Message-ID: <4744821.iAptAJfnkX@bentobox> In-Reply-To: <87h7zxxob7.fsf@kamboji.qca.qualcomm.com> References: <20200204151135.25302-1-john@phrozen.org> <20200204151135.25302-3-john@phrozen.org> <87h7zxxob7.fsf@kamboji.qca.qualcomm.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2107701.dEEGrNscTW"; micalg="pgp-sha512"; protocol="application/pgp-signature" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --nextPart2107701.dEEGrNscTW Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 --nextPart2107701.dEEGrNscTW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEF10rh2Elc9zjMuACXYcKB8Eme0YFAl5CvF4ACgkQXYcKB8Em e0ayUBAAjXc/3uYA9x/45bbvY7vVF41gDZSUj8P5uvnLXQJL5gfeAsKuNuPQno03 EdzxluMQWyKXjHo11T1IfwXo6hkHueYFschLpwnnBu2w6Rw6UeOWClpaAA4wWUfu L3yf95F217nKVT05UvAIoyafHNuptIKBv9sDMydIaRfUF5v2Ywcb0RGesp6ICgqo W8tFQzy9aRs9KSnDTlClZ/s+loSegRecUxEPN2/xPeNfKtmuSNngG1x+PDy/MFOX mQWJI2M+GbPPPUEihK/KWsZ8Y4UJgLXsAE9vqZs2Df/WPlTLDN0UmlbOEM749ZVU o+1zz+kkeA3JhSN0CCq941APt7axma2xNsAgfwaG1Vzfw2sVVUPun/QhAecqdcwK 8gbj8ecsyo1WQa4QJTifXetl6Kfl+hbBMQg8gH3vmUVVsG5brvtn4gdKHFNTlkdI VbqWDGnq2FM+k6ydDtPeSGKNUyn0SigDcMJZr+8J4A3PvQVOaGGZ+/Bzwr3K4Ofk plhUudyoCP8XGFiB+ZQuLioph8Fc4nXMRSp5lboi2xyPVlQD1OjlU4a016YreqAo qziI8rFbxt89Xfx6j6zczALo+z+PHd+gjSXKuP/LwJvm9HaRCGd5dFSNrvgtEL7k qRqm9A4zM6Tr5eKuQ6lrbiA8tqWY9KI0ZLNutiWhTEGOMjB/uho= =bRu5 -----END PGP SIGNATURE----- --nextPart2107701.dEEGrNscTW--