Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2378825pxb; Fri, 25 Mar 2022 16:48:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBQ5TYcKi3r+MiAxaNW4bSJ5AJ/7GiAEwmIuZOjnlQ+WY8dhGJ2AQMq+yQGOvE8enRBP8i X-Received: by 2002:a63:7d49:0:b0:378:907d:1fc7 with SMTP id m9-20020a637d49000000b00378907d1fc7mr1543847pgn.252.1648252127266; Fri, 25 Mar 2022 16:48:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648252127; cv=none; d=google.com; s=arc-20160816; b=B8dpvSM7bCNRtw3poZQkFCXEV8y566BdZ99JjdE2wPVfvJNBPV2AdQR2JUNouvnDvX cEqXyulV+9MOmnrLXhpqPeSU8ssLW4OUldZzL5vCoeiqnP9Dq2+rshRMeTTfwBrk7QRM IO5aR3ZHDFDExaF2fzJUWfxsK0rK/5opdB2Seyute9M8SuPQYHTqAiJoahGU8Yoc7W3G 7ZEdEbdXIdsKCJTNXP4BK+NLIJNer8PSJTC4Y1FxSS7TjfpoA+W6znXlXA3fjBIdpL/S M4xlqv8sB9Mm1hXLUG75Ti1VxWLJcvOXyX0P6w8YS6DnNo5nUZ4rozrayx0AdisWJOt0 Aa6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=YFt6vZY98smj4oGQagtWWCjnMpDNRhyPUDU9FDFTWRo=; b=G/c3IJKyHpHupip8vRY5HEPFluECODY/aoAiuHWsYlt340GkVJs64xslEuSXxcWN3f aHbbudIHreELfkrt97M3sqQzAK/lNBymOAIaBtSboCI75qjm7Swl7zToxXuq7rkkRwwG uiHvOxydjmw3X0M5IIlmGU3L/8u+o8A6HPHbUVjbsRD3xrux7q9wbEZznBVgPZQK8ayF Va5CvqMd8ieCV0CEFM3DNB+9JJKfjhM/7MRU/7z8dG2BAh0ih0//YGuwJMI+b6X3TZEZ mgwSO38BH7mUmHFWilgUJQrrzQc8zg14hOOi1fCQ5EuWDD7w4RPIsXNSe7EdrRE/+pzU RfCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="iM/jTENA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j11-20020a170903024b00b00153b2d1649fsi3414405plh.167.2022.03.25.16.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 16:48:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="iM/jTENA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A6D7225A4B5; Fri, 25 Mar 2022 16:21:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234164AbiCYXW4 (ORCPT + 99 others); Fri, 25 Mar 2022 19:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234158AbiCYXWx (ORCPT ); Fri, 25 Mar 2022 19:22:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE256255142; Fri, 25 Mar 2022 16:21:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 80989B82A30; Fri, 25 Mar 2022 23:21:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4193C2BBE4; Fri, 25 Mar 2022 23:21:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648250476; bh=T97WJXCnYEDDn5hncIAUzSD8BkDfJNMw5R6hXkYf4i4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iM/jTENA/Y751A9VQQDdN7tRMZZ4y2TUpPeNnt3cFNjysTJv+9DB4hh8UJ2bhjTOM 2gkn6uTTMv4hfNjGcGR8+uGORXQv72gYMxqIzl1iMgh3NchDCp7aWOxhM2YJZ/SiN9 LxAr04nH9S9PWBZc6ygXelsDxnZ31sb37epXjH9rah+gui0Nhb1NWTMJmcDCZowYpI 02+V1dTk7tmi5cUOLfyfPnDMovhIwZupltRFTXqv7CEWw22mGlxDsHZgHqTzzD8N2z lVSCWBODHFzgqmSdGCHtc9wGnA25/5NdNCxW0NOVn0blGbPC8LtYuyubWSN7HKq+bV YtcmNzLmZ4j0A== Date: Sat, 26 Mar 2022 00:21:09 +0100 From: Mauro Carvalho Chehab To: Jonathan Corbet Cc: Linux Doc Mailing List , Hans de Goede , Stephen Rothwell , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] scripts/get_feat.pl: allow output the parsed file names Message-ID: <20220326002109.2cda0402@coco.lan> In-Reply-To: <874k3lg7r3.fsf@meer.lwn.net> References: <874k3lg7r3.fsf@meer.lwn.net> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, 25 Mar 2022 13:19:28 -0600 Jonathan Corbet escreveu: > Mauro Carvalho Chehab writes: > > > Such output could be helpful while debugging it, but its main > > goal is to tell kernel_feat.py about what files were used > > by the script. Thie way, kernel_feat.py can add those as > > documentation dependencies. > > > > Signed-off-by: Mauro Carvalho Chehab > > So I think these are worth getting into 5.18, Yeah, agreed. > but I do have one question: > > > @@ -95,6 +97,10 @@ sub parse_feat { > > return if ($file =~ m,($prefix)/arch-support.txt,); > > return if (!($file =~ m,arch-support.txt$,)); > > > > + if ($enable_fname) { > > + printf "#define FILE %s\n", abs_path($file); > > + } > > + > > Why do you output the file names in this format? This isn't input to > the C preprocessor, so the #define just seems strange. What am I > missing here? Well, I didn't think much about that... I just ended using a way that is already used on get_abi.pl, and was originally imported from kernel-doc :-) It could be using whatever other tag, but I would keep those three scripts using a similar markup string for file names and line numbers: scripts/get_abi.pl: printf "#define LINENO %s%s#%s\n\n", $prefix, $file[0], $data{$what}->{line_no}; scripts/kernel-doc: print "#define LINENO " . $lineno . "\n"; Thanks, Mauro