[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210928144239.8FE35C4361A@smtp.codeaurora.org>
Date: Tue, 28 Sep 2021 14:42:39 +0000 (UTC)
From: Kalle Valo <kvalo@...eaurora.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Amitkumar Karwar <amitkarwar@...il.com>,
Ganapathi Bhat <ganapathi017@...il.com>,
Sharvari Harisangam <sharvari.harisangam@....com>,
Xinming Hu <huxinming820@...il.com>,
Arnd Bergmann <arnd@...db.de>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] mwifiex: avoid null-pointer-subtraction warning
Arnd Bergmann <arnd@...nel.org> wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> clang complains about some NULL pointer arithmetic in this driver:
>
> drivers/net/wireless/marvell/mwifiex/sta_tx.c:65:59: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
> pad = ((void *)skb->data - (sizeof(*local_tx_pd) + hroom)-
> ^
> drivers/net/wireless/marvell/mwifiex/uap_txrx.c:478:53: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
> pad = ((void *)skb->data - (sizeof(*txpd) + hroom) - NULL) &
>
> Rework that expression to do the same thing using a uintptr_t.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Patch applied to wireless-drivers.git, thanks.
603a1621caa0 mwifiex: avoid null-pointer-subtraction warning
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210927121656.940304-1-arnd@kernel.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists