Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2586375lqp; Mon, 25 Mar 2024 03:38:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWt6+S4cotkK5QlJbBAx0kwqMcm5EG7/vbuObOnBQAfdAeCFBUiNELOMTp0lIwtK3HeUOcGWX5rfERnaJcH/U1eS3HLifyuWOiNQ0BlPg== X-Google-Smtp-Source: AGHT+IHwUTCG7Mg0m135ntqPGZMjTfYNVAlXJ/HqtXzih5Uq3vXNrfuKVnjLG8qwqDev5+rr/X7Q X-Received: by 2002:a17:907:7247:b0:a4a:348c:de85 with SMTP id ds7-20020a170907724700b00a4a348cde85mr1802313ejc.37.1711363080701; Mon, 25 Mar 2024 03:38:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711363080; cv=pass; d=google.com; s=arc-20160816; b=XMg2D6goUXkT12FuCbqxuDPqbRU8aAf5v9X4aO6iDJLodjYIkxwgVjzohVMvuNOcyl ETAMjgQTr+fGFWlmiKfw/LmvhZr4oq7nr3q/XeVPQYg8DYi+wxw/MdVktPAgiHKgkNm/ 39aTkNdv3W9Buvap8hoJjdVMNZFiXjeGPXuGW971UyL9a7MsaPUnz+qQH0y1CjOqkTSm MKOsyx3rban14HwsLq2LAAbTaNkpf3L93YIzwzkKCzg7ujNnenlhnO8zv+wQEcVwtZZ8 46Ipw4rPyqEx+eS4+QQG1W2wjS12xiL6896502bDD0n35ieG3Ugso9Hzqk4fQQR9TvIN ivqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Ry0ALijKcCCdezDIF1OD7ySvFyMzOdSbF5kQHLh3VTM=; fh=r1SfEZE8h6vUQZuSLf3DIKEcbvZ35738JSNI4BiAB1Q=; b=ZzKBXW/KxV0ZQorwCi0ZyBumWyxoa8KNfXP6wZzFMuhbqMxI58AHndx+X7V8UcFuR1 2tL+eLjOqs1qa6EmjEGRQxpgwk7E4+56WI/bvOf/HWjwlClO4eRmuIvwhuyCweqIIGs6 D5hYnI8Nd9WutakJ0/uXyeCKHjnAk0Zhk7pat5Riyv4ylq0VpyF/864nHflC/IeOrDDz T5FLhPjXZUEsKTavnM7v0JAZYSB9qe9hjFOieyLIis0V+l2iihU8T42qTyiCWyPnARgO VHCWsQE6Q+VKAZDrxiecYq560ePxxt4smqxDTWI89nu/xMNILnnVV8/W1MrcVbFcC/sr XkDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f0K3gwX9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115335-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h8-20020a170906110800b00a46be1b511csi2304256eja.397.2024.03.25.03.38.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f0K3gwX9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115335-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DE7A81F2E471 for ; Mon, 25 Mar 2024 10:37:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1EF71E5F6C; Mon, 25 Mar 2024 02:33:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="f0K3gwX9" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8385079DB9; Sun, 24 Mar 2024 22:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320464; cv=none; b=tg2fx0JjdUWcTbsNzKRT/IaFQ4U5/XBQAPe4CoRo700P3ZnihDeJIIPt1Z3v/PvCK4QHENrLJmyBfW6TTjLikI5GVORu62yzGyh+ludvvyq1YbOBQTAehTCFswsXzg1S81yZ7t0FsZymKdTf3gliPypmdrLhRRoi3E70kWqpXXs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320464; c=relaxed/simple; bh=3wlScet/gGLXlUYxf1X1RksuP6JQN/1vtVXO9KjdtqM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Mpqwht+wOhrIFDRKVMiS1ayVikmBC12dNG3JDCQvMkTPYkA4cQjC/I4yKrgo3eg+KmB+7NPoSTMVV+HG8tWXLbj/G/vSVldGK6hbIlSzoHkLbqzQXjMEWWTAxCLYocJoXn9Wxge6uxF0bS3+ic7WnNPwOGNncLtlWaaOkMNAGlg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=f0K3gwX9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD3F5C43390; Sun, 24 Mar 2024 22:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320464; bh=3wlScet/gGLXlUYxf1X1RksuP6JQN/1vtVXO9KjdtqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f0K3gwX9Gc+CVYZgdPMWXV7nRonHFm00YElGH/2CzRLXIEKylihy95vOQDEh8FXor 9mdqzr76wp5BCJpvWkbfbb2GcivuEppRZ7Yr4PF5YBhUnwN/6LyZUEY+gp99tRPqiC HpJdcIoCD0VeT5Fly50erw1TOonDxgMcncjhPcXyxvVVgxJjmVh8KdcKob2NAlyelZ ZZ0Fcut4ZStOTlcQNBF27sWHKMCoTg6q9YaUZkPD78gLL5jYcs5PKvqezeIGp3PZXn EOud5CKnJ1eRAAVFYZuOhCN3C8yAxIG+c3mYRzHPK649cpSL4jjkqgjr7AefknXiw+ wfPZnP7giha+A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andrew Ballance , Justin Stitt , Masahiro Yamada , Sasha Levin Subject: [PATCH 6.7 023/713] gen_compile_commands: fix invalid escape sequence warning Date: Sun, 24 Mar 2024 18:35:49 -0400 Message-ID: <20240324224720.1345309-24-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324224720.1345309-1-sashal@kernel.org> References: <20240324224720.1345309-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Andrew Ballance [ Upstream commit dae4a0171e25884787da32823b3081b4c2acebb2 ] With python 3.12, '\#' results in this warning SyntaxWarning: invalid escape sequence '\#' Signed-off-by: Andrew Ballance Reviewed-by: Justin Stitt Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/clang-tools/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py index 5dea4479240bc..e4fb686dfaa9f 100755 --- a/scripts/clang-tools/gen_compile_commands.py +++ b/scripts/clang-tools/gen_compile_commands.py @@ -170,7 +170,7 @@ def process_line(root_directory, command_prefix, file_path): # escape the pound sign '#', either as '\#' or '$(pound)' (depending on the # kernel version). The compile_commands.json file is not interepreted # by Make, so this code replaces the escaped version with '#'. - prefix = command_prefix.replace('\#', '#').replace('$(pound)', '#') + prefix = command_prefix.replace(r'\#', '#').replace('$(pound)', '#') # Return the canonical path, eliminating any symbolic links encountered in the path. abs_path = os.path.realpath(os.path.join(root_directory, file_path)) -- 2.43.0