From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383922; b=yFjmGf5/TxyVh1G3hBcPbXD+bJGO4E6kAzNsooC7iST45ou6v5SiNaM7mShKPS2daIZJ p/X5M4FMS//fOG28wlwsTlfdl1qrGic7RVVgRQbQocblrSbvqn/orqSB3Lb4nyWsY5Ky2 UG39m4v12uxmuHTrYn10MJgy5i0lZSNoMCKPJGMdLCRo3HYQoGisAoR8pMZ8/CCO2D1eq 7aN99VGY/2C31P5YOBQPLvbF5R9xUlht5fh1Xm7Va+hWVDv4vwP/m99FLd/CUEPwpRkoK lDN55UzC0gJbJIUMcf08bCaUjaoH9WNLF/oL68lVf+3X1Qp4mob7+Rl9umCafXprm7A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383922; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=NPSXJBtm15ocv++PaAmtfOE6x1Q02PHBK92iD6Yefq8=; b=qatZC5MZuOCJhm8YSieKxRuNLSrQjUE0JdGjMiH5JpTCiDgEPR44+MPhJiPCRTK/bFD2 h/4cr+gpWzid084C34uPNqBchSH72jErMeMBMvttm6rBDgURMpQ99srBqb9aMKr5zMf23 kjR831guEteHoh7E2/kFJIa+DN8ffjU4CVla1fKt/Na48CzfQgeUZ/ByWENiYFbryx5h5 NA4lcPD+CeL5/jJe9+kLYgGt4hUbQWmslM8RlLYnSk1ly1QlQaoFmi+5EPt9eEM+P6JDe f0HWZRBkG5sVOtZLRMqjjKOQhbdpezDaTIt1lk+XwTWqOceeHj4yV7pRm1Uo8lQ0GUA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=bdFSFUaF; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04EA860A2638; Fri, 4 Dec 2026 11:32:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=bdFSFUaF Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28B0B1F01D68; Fri, 4 Dec 2026 11:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383921; bh=NPSXJBtm15ocv++PaAmtfOE6x1Q02PHBK92iD6Yefq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bdFSFUaFivrxckkfy8XikwEuQ+mqeZBxBYQyesJNSiJUQk3OtrWI8Zw6QaB/SzxQ/ maxWD2Dy1M66N12BnyBbrUFzq5s4DXKOSNScW/EN13qUz5UBivjAa7F+IkOkiLA3jL V4KYaeagYKNahMn9Px6GZZ/52/Im8Ojr1imEVnLw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nathan Chancellor , Stefan Wahren , Nick Desaulniers , Jakub Kicinski Subject: [PATCH 6.12 425/555] qca_spi: Avoid unsequenced accesses to jiffies in qcaspi_netdev_tx_timeout() Date: Fri, 4 Dec 2026 19:07:48 +0900 Message-ID: <20261204100625.885151940@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nathan Chancellor commit 695d0824cb6b27ff1a1cdeabb2d5138f00b15251 upstream. After a recent improvement in clang to warn on unsequenced accesses to volatile variables [1], an instance appears in qcaspi_netdev_tx_timeout(), which can break the build with CONFIG_WERROR=y / W=e: drivers/net/ethernet/qualcomm/qca_spi.c:805:16: error: unsequenced accesses to volatile qualified 'jiffies' [-Werror,-Wunsequenced] 805 | jiffies, jiffies - dev_trans_start(dev)); | ~~~~~~~ ^ Per C11 5.1.2.3.2, accessing a volatile object is a side effect. Per C11 6.5.2, unsequenced side effects on the same scalar object are undefined behavior. Per C11 6.5.2.2.10/12, the evaluation of arguments in a function call is indeterminately sequenced, meaning any side effects in the arguments are unsequenced. Printing jiffies on its own is not that useful for debugging transmit timeouts, so get rid of it to clear up the warning. Cc: stable@vger.kernel.org Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000") Closes: https://github.com/ClangBuiltLinux/linux/issues/2197 Link: https://github.com/llvm/llvm-project/commit/955715460eaf9188c241c74750637fc82dfcc423 [1] Signed-off-by: Nathan Chancellor Acked-by: Stefan Wahren Reviewed-by: Nick Desaulniers Link: https://patch.msgid.link/20261115-qca_spi-wunsequenced-v2-1-8cf32f12d546@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/qualcomm/qca_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/qualcomm/qca_spi.c +++ b/drivers/net/ethernet/qualcomm/qca_spi.c @@ -795,8 +795,8 @@ qcaspi_netdev_tx_timeout(struct net_devi { struct qcaspi *qca = netdev_priv(dev); - netdev_info(qca->net_dev, "Transmit timeout at %ld, latency %ld\n", - jiffies, jiffies - dev_trans_start(dev)); + netdev_info(qca->net_dev, "Transmit timeout, latency %ld\n", + jiffies - dev_trans_start(dev)); qca->net_dev->stats.tx_errors++; /* Trigger tx queue flush and QCA7000 reset */ qca->sync = QCASPI_SYNC_UNKNOWN;