Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2508789lqp; Mon, 25 Mar 2024 00:18:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPO18+X63Zb4UMFVLy4MYT6kaUJ4HWw5Bs4/O8fGeGdB997ays0iAZg+5wJ2Fg6tj/XNHR4uR27uYspAF2T/cOUc5dDQRDjTHdxQt9eA== X-Google-Smtp-Source: AGHT+IE726FEIWa8JcCUuQ7tHfnfU20O69w7kvbGYBE27or6SsQzN5YNCuc1J6g4s3CORW+CmF09 X-Received: by 2002:a05:6830:22f8:b0:6e6:b209:b24c with SMTP id t24-20020a05683022f800b006e6b209b24cmr7111651otc.17.1711351108635; Mon, 25 Mar 2024 00:18:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711351108; cv=pass; d=google.com; s=arc-20160816; b=EH8SAXt9+crvkqgDlVTRRh2kAbZ3oJATzgi6qPPdQMXHn4yPDL/GVnj36q80dJGvkZ 4tmw4Y4vpPB9cp73oTXe4nN9i0KUfxWl1EPMZZTj90Ad1NGpEgPa06FQbWaZ0m36ElUs 3Z/0IOtA10fGN3AnkktUhimEcWKndSt0XHyWK14m1lbzl7XCCjEG/ko9tFRbkAAB/npt RK14IbLWK8nsupLCT8+CqCKGmYO66MItOW/X521rCdvkRzvyJEUwss0UpTsoBnCPAFt5 exAgibvASYQaIpJ/Jll+FYkF4Y8oWslRb49pu21DfKq9mG1lasVSL0Xl0VqepHEoQqtO w14w== 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=PBb3AL9/e31c4RupLQVjJ/HsqzELVJNuf+xvh/1SqQk=; fh=r1SfEZE8h6vUQZuSLf3DIKEcbvZ35738JSNI4BiAB1Q=; b=J71SyG9eo/rFf0vWIddO059p8WtqvA5EzTSL48EZBS6QDfOIQbfVEBtCyscpYoWTsj vqgRl/MJ0ZkjTdYuxAs6gIOmSOV7bPtdBFOYbe+ZlhyfwYsP0LU250CUd+gBEv/Zxb87 K0s5An+awt6RXnt9+VmiMybTqidpyddj2lvcLiWn3ypz8yf4rVAg9Apg2ZUHqbPqt8fL W5USa5foh5b9CVKEkU0gY9huIkcG0WjwvVRP0lgNhJV3kyhPA/0i6sxSr6RS5fjlUY80 58oxp4LxJnvpWJa7wSapFYD061mT0k/afhVsdpp+HIq3642zn0AtE6Vz4nmBU5Y1hGUE FCDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JU1Nz0Z2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114934-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114934-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i4-20020a63cd04000000b005df43caee00si7062174pgg.318.2024.03.25.00.18.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 00:18:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-114934-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JU1Nz0Z2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114934-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114934-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DCEBA29D7DF for ; Mon, 25 Mar 2024 07:10:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFBF12D8E59; Mon, 25 Mar 2024 00:56:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JU1Nz0Z2" 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 12C84178314; Sun, 24 Mar 2024 23:40:40 +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=1711323641; cv=none; b=MCIaELb1CuJJq0L0Xl2oG4mVeU8kC+OWh07jykEjQof91LUHE1/ESa+S2LA4akz1HXvSz9Gfd4g7uX89uxfHsmQda2QgCeEummcKKX8lZbrsgOs3d6V8TbT2ucpw12PUdBW4mp7dUTjppouKoSFYUEd+ktyHcXMkuMlu5WnrgFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323641; c=relaxed/simple; bh=iDEiulklPJxiT0KxN848Zac4TFlvECiWKebGAJuHqZI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DruqDhclsRUsSe0xiLUnR2wW//n5CAi8OQjcGiQyMp6lQ5/Bmu+XJZ5aHTlWzmfOYdqb4mp1b8MtQo29L25iU9p/ycRADC0gZERnVLgX6IkJrGJceuYcNb7TMbJme2wDgrUYcQzciEKX97JCzIlhXgzd8x7aj+gh2yXLP5HCv5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JU1Nz0Z2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3788AC43390; Sun, 24 Mar 2024 23:40:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323639; bh=iDEiulklPJxiT0KxN848Zac4TFlvECiWKebGAJuHqZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JU1Nz0Z2Qgo99S+NqdvIyMOMJ4sBukR4JF/R2n4DyfTmetIQEIvilrKDH8msJJ9pz WNd1kndaGzbd8OsxZUh5pCy4EKv0mmge67N26RC8LrUgyrGQJzQLxvlNx3e2dxKwFN y9SjCT6AmYTsQGTgaXsfEd001c90Vzn4az3uibdgbvuC899iQ60U2IS5gr9pu9E8r6 7nNLq6kYb4IAkUtFR94PGsBAwU/u1+8L4yI+GYdK2ErxYt8MTOqoPJa9doLzj03zY7 WJOTgI6F7fswK+UgTQtWGFhj/0Nr4+y3nrRJ/yyK7GXU9Ay6jLRQlXpaCOXmYjAtL/ fdOfjGfkNSFpA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andrew Ballance , Justin Stitt , Masahiro Yamada , Sasha Levin Subject: [PATCH 5.10 011/238] gen_compile_commands: fix invalid escape sequence warning Date: Sun, 24 Mar 2024 19:36:39 -0400 Message-ID: <20240324234027.1354210-12-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 8bf55bb4f515c..96e4865ee934d 100755 --- a/scripts/clang-tools/gen_compile_commands.py +++ b/scripts/clang-tools/gen_compile_commands.py @@ -176,7 +176,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)', '#') # Use os.path.abspath() to normalize the path resolving '.' and '..' . abs_path = os.path.abspath(os.path.join(root_directory, file_path)) -- 2.43.0