Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2384626pxb; Fri, 25 Mar 2022 16:57:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpNJT0nz6f2CofwfHjfOoHDVwCIgxiqurNLUQ8FcqwOuF5Zp+rWtsyLlMJ3Z5oxoDQQmng X-Received: by 2002:a05:6a00:18a4:b0:4fa:ee98:87bb with SMTP id x36-20020a056a0018a400b004faee9887bbmr10442055pfh.2.1648252660649; Fri, 25 Mar 2022 16:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648252660; cv=none; d=google.com; s=arc-20160816; b=zD3Xau5W50ZOiFU1UTBf6myQ3L0Fhe6AnaXDhIqKhiUsx5WTQMBVE1NMtAXOFVly6g 1fwURXGl9kWv8QOwEcmoC3FNm8rrjOerfdfyLe/YrzvouYyKflN3+rRgDS+UG3TkTdaC w1AJDd07+VNzb3AFKDhAeIwGSRfXU4k9TeEFwLbWU0yXgqdF78Xj0FFT0J5bA3rpuaoD uY6uFHAyaxqA2dxLK6WL+eEydsSc704wlbZUC0Wp/bDR7AZYaNlwhZS1uxchL7rq1FUU b/SWRSN3wJSZz8GeyQD+glUp0zGnhmOwXAQaKFMKBuUcup5gvmjxqQApsi91yzt+gyAA OOqA== 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=jjVrz9SlnqojhfduPbiv3dyEjcyya0VTo0k9gWzLDrg=; b=wjK5hk6DWfforTXtb4fqY2ylRhxrKAxV4V6ibNMgwvEKojUWcP2wb5CpLMB3VOqBUP n4SoLSuZ1kiknGjlxvw0o4FOUd4p+uDZi+7EKTJdMBMdh7tcNx6lxih7kt5EYof0TJ2G ey6im95+VHK4kf3DSsP8IamlHHNY/vZheksynW/hqp5eEoZzhuFC4QebOfR6Oe8079Ni FGfROprFj3k+h9800wREtCjHSjOj4GzSlY3RaAzEYdG3XV9kWnylCI6q3REMGC3jnziu Aqx2hqxj8zei9ON+hEgnzihySLJ/vIkJcprIDPyBp47FVHvusG9Fhtod/HBbFGku2a+Q ADzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FB6fxz+2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id u15-20020a63f64f000000b0038201b8ba7esi3842763pgj.35.2022.03.25.16.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 16:57:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FB6fxz+2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 103645B3D0; Fri, 25 Mar 2022 16:31:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234220AbiCYXcd (ORCPT + 99 others); Fri, 25 Mar 2022 19:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234184AbiCYXcc (ORCPT ); Fri, 25 Mar 2022 19:32:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1A41B864; Fri, 25 Mar 2022 16:30:57 -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 5526EB82A33; Fri, 25 Mar 2022 23:30:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3DDEC2BBE4; Fri, 25 Mar 2022 23:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648251055; bh=OH+mVAFkcKa9HVSf2zoUkEM/gONJr7udXBOVy2JElJ8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FB6fxz+2X35s/ByuDfwm+v6X+mHQaWKQultjwxpw9ND0636dzUgPqJS/NOi4qdMf0 JYx+cAhOtn0Wdp+iGMCHsqH0ESw+hzDcRUNDZAJB2Gdfjsw1qPP36XQWkYSya3Qsry MgKe8ePNakUuk3k+R1y2OCqB1oEZnAo+WuDFDaLH1qhZAOz15shLjuh5I66xrQ3Ldr FOgVRxo6llCzAYawiG/L7qzpddh0yQvcvBnoD8o/pbSWieY1Rg0vvVUE/L6QNkzY3X fol2431Whi+BpDrT69UJjoIhJirrX4tKsmiSNC+xd6v4IxjwZhuxuVPsW53vwfzQoN io4hsdmGH2Z/A== Date: Sat, 26 Mar 2022 00:30:50 +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: <20220326003050.50750c75@coco.lan> In-Reply-To: <20220326002109.2cda0402@coco.lan> References: <874k3lg7r3.fsf@meer.lwn.net> <20220326002109.2cda0402@coco.lan> 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 Sat, 26 Mar 2022 00:21:09 +0100 Mauro Carvalho Chehab escreveu: > 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"; Btw, maybe we could replace them tree with a Sphinx comment, like: get_feat.pl: .. FILE kernel-doc: .. LINE get_abi.pl: .. FILE_LINE : (or something similar) Just let me know what you prefer and I can take care of the needed changes on this patch and, if it is the case, writing the extra patches in order to use the same model on kernel-doc and get_abi.pl. Thanks, Mauro