From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 011.lax.mailroute.net (011.lax.mailroute.net [199.89.1.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35ED11DFF0 for ; Sat, 2 May 2026 01:55:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777686946; cv=none; b=ju0HtUo93PuqJLo4eHshFWQmgw5xfSzwzbU8wadOdBYYN+N5u0Hr63arS/KsSE7ZHTq0ArCjGgIPNa9hrw2Znz0AWLR2Ba5xMdRVqdCOMUYgQ8o0RYThsaCfSpmR/bDShWd/S8b11eUeViUa2222peTK8WnuzM0Kle2MfpeqeTs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777686946; c=relaxed/simple; bh=IP/AC7FhJrv6aOE14KeGwSTKrfwRVS79zvcKrikC/xg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jvFxqkmhnJJDDihdRZNOjS3mTo1Ywfxw3jIPeD3JhTdUu2GG9ZLHQVl8Zk/8IYxSl87FTlPT6pTvR4ZWCzuwuwgHh/McTUbCi/SsIcaIPI8bAAekeNPppvhfqCJDX5G39yb7pLd4xOHHdTJ7m6gvKwey4eBkK96pWCifF+tZjgM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=cn2vE6La; arc=none smtp.client-ip=199.89.1.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="cn2vE6La" Received: from localhost (localhost [127.0.0.1]) by 011.lax.mailroute.net (Postfix) with ESMTP id 4g6rbN5mfPz1XM6Jf; Sat, 2 May 2026 01:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=mr01; t= 1777686942; x=1780278943; bh=ALaPli9Hokq9szJlSTsWkLRwdGGhLLChcv4 /EjYAhiM=; b=cn2vE6LagZNKNkqn33CxdjLoDKfu9GqwtNF/SoeXC3T+zdL9/CH FGBPFvp1qzIzgxhu7ox1yaYiKrubXjyMESfvsaBxI0x5HuoFa4mkY+y4ZZ0jhetS bDn0TOGOfYSN4eE/uNbDmqyVZRl/5qOlJkBWwaVdLc1NrluyL/I8DHvnsC18vhgA atylMbNpSJ20zRfRf9Xfuiu8Wv8ImuFmm7f7iASv2JhK+1TxlmEsdUJZfXjbIE/g FVlGWMfJtsFFK1JeMNuL5HZk5GUTFTWBqH8/FwJLKPNs6cb+UPmnbgn4gbLGSfhz pCVxm8BDbgwBkfhI7EWaMfu4Ls8OSxUyLcw== X-Virus-Scanned: by MailRoute Received: from 011.lax.mailroute.net ([127.0.0.1]) by localhost (011.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id MjIqyvozBucb; Sat, 2 May 2026 01:55:42 +0000 (UTC) Received: from bvanassche-glaptop2.roam.corp.google.com (unknown [216.9.110.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 011.lax.mailroute.net (Postfix) with ESMTPSA id 4g6rbH6Sdmz1XM6Jc; Sat, 2 May 2026 01:55:39 +0000 (UTC) From: Bart Van Assche To: Peter Zijlstra Cc: Marco Elver , linux-kernel@vger.kernel.org, Bart Van Assche Subject: [PATCH] bit_spinlock: Fix the __bitlock() definition Date: Fri, 1 May 2026 18:55:26 -0700 Message-ID: <20260502015530.430765-1-bvanassche@acm.org> X-Mailer: git-send-email 2.54.0.545.g6539524ca2-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Surround the bitnum argument with parentheses because it could be an expression that includes an operator with a lower priority than the addition operator, e.g. the exclusive or operator. Fixes: eb7d96a13bf4 ("bit_spinlock: Support Clang's context analysis") Signed-off-by: Bart Van Assche --- include/linux/bit_spinlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index 7869a6e59b6a..bcae36b9a739 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h @@ -17,7 +17,7 @@ * static analysis can use. */ context_lock_struct(__context_bitlock) { }; -#define __bitlock(bitnum, addr) (struct __context_bitlock *)(bitnum + (a= ddr)) +#define __bitlock(bitnum, addr) (struct __context_bitlock *)((bitnum) + = (addr)) =20 /* * bit-based spin_lock()