Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp534309lqb; Thu, 29 Feb 2024 07:55:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWBIB5Jn/JdYkfQwR70nLCT26SmoxC95aGLSsXiWTkiuFFf7CdB+nhNZKQJKV5GCgltnv9AMdxsbi9VRixeQnvE2Ju8Pgrgqj+CJUqkHQ== X-Google-Smtp-Source: AGHT+IHQvrTVPZrY+x0ZezJ/2laemL5oHswsL65onJXsksvIiOQDoAFsHh/xRdnblAYHmzyxzaVz X-Received: by 2002:a05:6402:1e86:b0:566:ef9:afd8 with SMTP id f6-20020a0564021e8600b005660ef9afd8mr1768680edf.13.1709222155005; Thu, 29 Feb 2024 07:55:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709222154; cv=pass; d=google.com; s=arc-20160816; b=l39iKuYSCUocmvJ2UhMIRd26FBg7GCJW4Zl2SgkBBh9+3iTVg3HFm6ltdQJmW5gfCa saMHFLRRXnZuOCJl6yK+f6zvPZ0E1HlWOlR3V1ZaNL/cpN7ScectT+G6evrjccH3ZayJ jrRtkY8IDYfwuDR/zT9E0ruCGvLWlxkfZr/4bqIs51GrOeuwZrpsdDuy4/VoyLlS7Oi8 f63jc2IMXln/ADhQ5B+xi3vh+kq+DcZc//9EKX+Q9a1XluFXCmOrsWf7SGnsthE2H5A0 p/d62GsrYYSo/se7MyUWep/t+0j1g9D7PIIH4v5T4zyoCodX09qN23IeS3Yo24NMOwqD uAUQ== 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=Gls6dO61Pj4BUtXvrrgvulexYzgXpslZUawQVFFoRr0=; b=JvP8O8X3H6NFmh6HMgZ9/IGedo5eSViC6l4HKNL6UT1zS6WMvH61dvwINnSQsj7fpU 6oKBc8CKgAciAj9Qa7ZEQg8AaVIG2HRTpfcYNznndUQTKmL6iyrXzCJOlQ7jp6AOFTvX Udq9gjyOgCdzo2gz4KV/glmiCXV7s50gZYqSMNg0qfjMX1YVOLQ+S69Sm4prTB+f/Jf5 pE5rcC1gqyMNbAAsy7kxXAWXxz0ITVXV8yfr8Pgbk1dTa5L8CBUciUPIgY0GhLIbEuTk Q6Z2kanTL5FxFfEFZyfEYyl5GLBG9jkV8Ug6lrEElIrxzA+2CfqddnHgOCjwBSXMnVO8 AXbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m8jXWu1U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-86974-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86974-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 n14-20020a05640205ce00b00565d1757e22si678281edx.267.2024.02.29.07.55.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 07:55:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86974-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=m8jXWu1U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-86974-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86974-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 B8D131F24535 for ; Thu, 29 Feb 2024 15:55:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31BC46CC19; Thu, 29 Feb 2024 15:49:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m8jXWu1U" 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 5596F6CC0E; Thu, 29 Feb 2024 15:49:37 +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=1709221777; cv=none; b=AceajJha5FKX8H3tPYVdDuko5w6VyTcWJrzKz6E8eOcjEyMATr/uh6JiYZMqE2Vl9UVzbnH/grWft0ElgqoVnNY6q2Jr19wxZmnTf4POc76s2v9NC3pY1gfYz8REEjMSsfeVIgSDbYBqeLtyDHryrTEcAFrPpjEJFtu7QlwtGKo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709221777; c=relaxed/simple; bh=3wlScet/gGLXlUYxf1X1RksuP6JQN/1vtVXO9KjdtqM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F5XbO1ZjVZL4jCjX9+CT8hm1Sx5S3AmMJNbgedpaGZgG5bOP1EHumMQxArqXw3KFO8w08zLrWCKCBL5Cft4csfxS7gNr2Mh+fsqMlie6Rjb6PNPzz5SN+e5Z7d6odvouJX2gl5u+CVAHaKstO7Xpb40IxkhDXO4ZphODl+F9TwQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m8jXWu1U; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E2ABC43399; Thu, 29 Feb 2024 15:49:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709221777; bh=3wlScet/gGLXlUYxf1X1RksuP6JQN/1vtVXO9KjdtqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m8jXWu1UQ0XiYy7VfaEyYNgCM5+zhUEm4UmiNMRt2VgZLNnjQlIlctvXIh4iBJ0/3 Q/K4+jvUQ0sMVFJSUMt4n+uOvCJL4PhqS5UhFksDAL1M969aosOr2E0pyLTDWpLYQV lBD0CW6DVqfnBPmqKEV4ogVsBNsT9/zg+1tb22Dqcl6DKepaLkWS5kYm4Cn15K4AA9 +thidoI6rC1HeI3dPJbWMUd4A4799iUCSAhKNRk4dOhO1gj69Voourn1D1aEz2Syzh XFcc1tfMpisKGe9PjsR7O6OHUU5xuySrbuqYsxl79TvyV0BYuYxKE969y7Nh0wHgmk 3/HBf9baB+X6g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andrew Ballance , Justin Stitt , Masahiro Yamada , Sasha Levin , nathan@kernel.org, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH AUTOSEL 6.7 25/26] gen_compile_commands: fix invalid escape sequence warning Date: Thu, 29 Feb 2024 10:48:44 -0500 Message-ID: <20240229154851.2849367-25-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229154851.2849367-1-sashal@kernel.org> References: <20240229154851.2849367-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 X-stable-base: Linux 6.7.6 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