From nobody Thu Dec 18 08:12:09 2025 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 5DFC021D3DD; Thu, 13 Feb 2025 12:06:28 +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=1739448388; cv=none; b=WqWawHf4K7dBEzJhCcOm47fyIlPaKmge2rAoPUXdSkKHla4Xuglfdcn5aIG0MhektathkOpU3WhwhTsZXHUqZHp2qaALWs/0U2nqZMzwmJu6zwGlGs66h3HVlK9JgaKDRODUKkmQmngCxH7+VcWZv4CaP2eUt6WeJQpv1G/DAgE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739448388; c=relaxed/simple; bh=AbtiWm7KrQwGR0dmAQH/R+3c6zbpBrPp9XhZWqZGL9c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ONqnop8c8osSGNXg5Xpiw1kFe1Mbh0kMaE6CUaJCSjpcdUcDczSJeAsliCWvi/wsoUBIA9ZZ1u3z/nQLN8kRoGCoqoHF23/Bd2jr4K4Rk0i+CblVd/PDzWgzfJI0ftMUdMGVMjp2v0e+mnHLZhcvV2cdi2w6aTRsZoV3pR0i1nM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fc+AlMlx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fc+AlMlx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF777C4CEE7; Thu, 13 Feb 2025 12:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739448388; bh=AbtiWm7KrQwGR0dmAQH/R+3c6zbpBrPp9XhZWqZGL9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fc+AlMlx23kPbg+1fjwaxv8a3tTB2B+A8MgSZtThj2W60xr/Vu9rtG7voWbJl1aa1 sBYc424nnK+QXpT38doNydnbI8K87mW2PC432N0ltUgxXUyq8ytUd3HXY+qKxywoQC 8n4UbdtCDm26LBV+4nt92QgO0lr5yLOhdlb92vfTiJ4KAsqERBIy4Uk7LSdmczVvz7 KbjHHyT+lkDUxRy5JK03k2sdy+dcHgazq14SHgz6ZlkezBRWTgJsDz/KiQcftVBAfX 8atGqglZZRw1CwHwYLwC6WnkdeQLBmUOw5orUwuC/yxDDvPb74mGkCtY76DMCg+TK8 YbCiNmOsHIrrg== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tiXz7-0000000BIV8-1VDd; Thu, 13 Feb 2025 13:06:25 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH RFCv2 2/5] scripts/kernel-doc: remove an obscure logic from kernel-doc Date: Thu, 13 Feb 2025 13:06:15 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: 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 Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Kernel-doc has an obscure logic that uses an external file to map files via a .tmp_filelist.txt file stored at the current directory. The rationale for such code predates git time, as it was added on Kernel v2.4.5.5, with the following description: # 26/05/2001 - Support for separate source and object trees. # Return error code. # Keith Owens from commit 396a6123577d ("v2.4.5.4 -> v2.4.5.5") at the historic tree: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/ Support for separate source and object trees is now done on a different way via make O=3D. There's no logic to create such file, so it sounds to me that this is just dead code. So, drop it. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Mauro Carvalho Chehab --- scripts/kernel-doc | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index e57c5e989a0a..70da9a3369c6 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -179,7 +179,7 @@ my ($function, %function_table, %parametertypes, $decla= ration_purpose); my %nosymbol_table =3D (); my $declaration_start_line; my ($type, $declaration_name, $return_type); -my ($newsection, $newcontents, $prototype, $brcount, %source_map); +my ($newsection, $newcontents, $prototype, $brcount); =20 if (defined($ENV{'KBUILD_VERBOSE'}) && $ENV{'KBUILD_VERBOSE'} =3D~ '1') { $verbose =3D 1; @@ -2005,10 +2005,6 @@ sub map_filename($) { $file =3D $orig_file; } =20 - if (defined($source_map{$file})) { - $file =3D $source_map{$file}; - } - return $file; } =20 @@ -2403,19 +2399,6 @@ for (my $k =3D 0; $k < @highlights; $k++) { $dohighlight .=3D "\$contents =3D~ s:$pattern:$result:gs;\n"; } =20 -# Read the file that maps relative names to absolute names for -# separate source and object directories and for shadow trees. -if (open(SOURCE_MAP, "<.tmp_filelist.txt")) { - my ($relname, $absname); - while() { - chop(); - ($relname, $absname) =3D (split())[0..1]; - $relname =3D~ s:^/+::; - $source_map{$relname} =3D $absname; - } - close(SOURCE_MAP); -} - if ($output_selection =3D=3D OUTPUT_EXPORTED || $output_selection =3D=3D OUTPUT_INTERNAL) { =20 --=20 2.48.1