From nobody Tue Apr 7 19:49:27 2026 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 6BDE53A3814 for ; Wed, 11 Mar 2026 23:15:19 +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=1773270921; cv=none; b=Qwkwfz+HvUtWzhlefhR4K+OA/6lm/n1DN94YirZ4jTbc6g4So6kvH6vCPvw9kn/DrkjjPYW2u/RYi7CIw+oBACw/SahQZQ9IBk5VTwF1OgBuFQ5evWYVnj3f1NfHP0vFZ96Xs68Iwuau6ISBRZiJcsBI8c9sgHa37HrIBUPxytY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773270921; c=relaxed/simple; bh=Xou51vPSVFdd2SEfOlOwOKsfIkLn38PjHzttoN5zT78=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=A2SqODXKDJFSgmd2PM8nnTifs+QYY8kCad9171ubAPsUbpHhUpNRqQUyyLCmgg9K+Rll6yqGoQdZUjLwPyDoUKhdKlY7NgFHeQZmSpKdp3yoWoZ2TfntBJr5F56MqkVyjIHziFVjFlAJT4/0qdnNwYqLxBiPOv35neVqXu+kQJw= 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=PnwtUlBP; 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="PnwtUlBP" Received: from localhost (localhost [127.0.0.1]) by 011.lax.mailroute.net (Postfix) with ESMTP id 4fWRRp5mjmz1XMFjr; Wed, 11 Mar 2026 23:15:18 +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= 1773270913; x=1775862914; bh=b0yYm6AH19k0Zf1nPurxGOTS5Tl2WUn5O4N odC6EaYo=; b=PnwtUlBPJq02FlpRBu7IjH5Hv4PJIjCLxTYKIGgWz4AM5OkvOL7 YTvjEkrWWrIFIB1qJuQs+pw9Aj1aYYFbDxjhpWlYC338KaSNf/Qjl4jQCQOfuMYW yg1R0PMAf8lK+kEDMsTEqxbA3rWwRxvrtJN8VwkZ2HnnCdPyO9vVmt+tIPRjL/9W gmwKMA7Ccd45mPb6Rp8EJFEIp4BkY0HsFrUf9qk0HNxECtJT667wzKOMMwgbAqe0 hoD4n5JDrYpIJcQn4lLt3BF0EAb9tUG8ylAGhVN/l5j2J9wg791iC2cYp/sNzKG7 KSPZ16YV21oEkgxg0js2yQXY/K/Z4/+UT0A== 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 1zB3F1LsoRuO; Wed, 11 Mar 2026 23:15:13 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.180.219]) (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 4fWRRg3K2rz1XM0ny; Wed, 11 Mar 2026 23:15:10 +0000 (UTC) From: Bart Van Assche To: Peter Zijlstra Cc: Ingo Molnar , Will Deacon , Boqun Feng , Waiman Long , linux-kernel@vger.kernel.org, Marco Elver , Bart Van Assche , kernel test robot Subject: [PATCH] include/linux/local_lock_internal.h: Make this header file again compatible with sparse Date: Wed, 11 Mar 2026 16:14:55 -0700 Message-ID: <20260311231455.1961413-1-bvanassche@acm.org> X-Mailer: git-send-email 2.53.0.473.g4a7958ca14-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 Content-Type: text/plain; charset="utf-8" There are two versions of the __this_cpu_local_lock() definitions in include/linux/local_lock_internal.h: one version that relies on the Clang overloading functionality and another version that does not. Select the latter version when using sparse. This patch fixes the following errors reported by sparse: include/linux/local_lock_internal.h:331:40: sparse: sparse: multiple def= initions for function '__this_cpu_local_lock' include/linux/local_lock_internal.h:325:37: sparse: the previous one is= here Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202603062334.wgI5htP0-lkp@int= el.com/ Fixes: d3febf16dee2 ("locking/local_lock: Support Clang's context analysis") Signed-off-by: Bart Van Assche Reviewed-by: Marco Elver --- include/linux/local_lock_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/local_lock_internal.h b/include/linux/local_lock= _internal.h index eff711bf973f..234be7f12c15 100644 --- a/include/linux/local_lock_internal.h +++ b/include/linux/local_lock_internal.h @@ -315,7 +315,7 @@ do { \ =20 #endif /* CONFIG_PREEMPT_RT */ =20 -#if defined(WARN_CONTEXT_ANALYSIS) +#if defined(WARN_CONTEXT_ANALYSIS) && !defined(__CHECKER__) /* * Because the compiler only knows about the base per-CPU variable, use th= is * helper function to make the compiler think we lock/unlock the @base var= iable,