Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3226383rwb; Fri, 9 Dec 2022 11:33:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf4E08vxS+/+rKtnqm8Pj7Rv3py6Q4WwVBxoeWL/AXXz9xEyt6/H9P78LwimlOR+xRCJss/i X-Received: by 2002:a17:906:a08c:b0:7ad:fe21:7a15 with SMTP id q12-20020a170906a08c00b007adfe217a15mr5595685ejy.22.1670614396418; Fri, 09 Dec 2022 11:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670614396; cv=none; d=google.com; s=arc-20160816; b=dSk24dAJMbXpC9RgOl9jSrAt8Vj2142ok4qyNAtbUh970DG4YiWiwRe2oEN5S6Whjk jQO2U5qEii9he/drUD95q5EGni1I3OFOVXfz/tvf/NrUJM9cHXU5gn6oR5IyYYoxdhZ8 QxgLl0lwsNiORQ4mXuGZzkncvGNns+GRPNNOtT2ScTfAJyngdzqPlj6j2ZVxwXUUUMXX h2TOqgMxRNkEBV12Q48B7tDcWV5R17jY8XAvyD+JmDLM5bTGcMiZNkZR6AhYyDX8NR+6 ArNJ85fveeXX7N/e0K0y/PntKMYTP8/cJJoDRRy0wus/BrzNPDhYL26vVo3kk4xxRNHT Opkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=XfOr98Gg1w98gjZZv7cU/ZVXNVv/sf1pm17+6ERdbfI=; b=pjjsCL9p2TfrOJuLTzVfGU0SlpbDv3hLhEQmME539t58B66occobNQ+A617JUkJmBA /oHwMDdTMJCpmRuHqO/knuMycn9f/BQNY6W7vZgnAK45uRHLP5UnFDEqScZ9Z/q4MCDn 1t//0JESypfAXyiiSV6q+uEo8WB2/BhO1sBGg9BWhcmTZQfupa7eTx0wMM31A/zl839F y9R9UPPE6e7ufoEvgm1/yShiU+bPyxo3s1MkwqLrQjGTbDabRv+yrYr/xbUD17JpggM8 7gJtq0SEpIaLrF4qdcEsTcm7KI51v268run0QNZVyO8KAUMtgaNBLYSjqqH92U9uxGun BEdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SE7XAp8c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd33-20020a17090762a100b007c0d5b8443dsi498645ejc.776.2022.12.09.11.32.55; Fri, 09 Dec 2022 11:33:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SE7XAp8c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbiLITSw (ORCPT + 76 others); Fri, 9 Dec 2022 14:18:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiLITSu (ORCPT ); Fri, 9 Dec 2022 14:18:50 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6861C13FBE for ; Fri, 9 Dec 2022 11:18:45 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id gt4so4109833pjb.1 for ; Fri, 09 Dec 2022 11:18:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=XfOr98Gg1w98gjZZv7cU/ZVXNVv/sf1pm17+6ERdbfI=; b=SE7XAp8c6oDiwmvA7y/76JgCoO3m7hFicezI9MsUfyTS1hKXDNxs3msUsuBraXBIUX k+KQlnGOUoRa/5iGFv9I9m3LUPmPJEDbL3W3B7rDiuZdVCv23JLsLTG94ZHkzIQxwDYA WzXvzZ85cOtw0kmXSWzXrlPv5CD1E7sn+VAVxH0e5P/uB4NYJEAA0RauegPu3wcINuSo Vm+AAs0pU1hu76asMdtn1kXCukr8TUnbQsUSHrs07aLSqi3PUBqN7YPsBvdzJfT41p2d Lag0w06+ga97PYsMeFGBK9axzDhKms73qmbUYyjWPvD2aiO+7d4bEL6IQhocozKVRaen NWpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XfOr98Gg1w98gjZZv7cU/ZVXNVv/sf1pm17+6ERdbfI=; b=v271hTpao5MxrhM1U+4gUepRMza5gx81/eSTWKi4ShJFy/Auz5aQx06dBX16ri9eSZ ue2lpmjWzvPtGZ8NKDMNrHwM4e+r9VPMrsYcfMvyGjQsGEuosVNRTeKc0IguKx00AXnS n3T4bTVdihiAfsb2tdgLQr1FI4v/RWZcstIMFK7nUto1eeyxXlSe0RYePc3iaR3X1ZmT 9Xq0unrcVkQDB5LtJsoweprCCO/t66PL44fegz+xl384yeAv9bst36n4G6FLE/fVNg1N rGjPSnjIL2hhG4QECQQWZTauB59HHSmP6MF7JUbg3+PH+32GbwHvWqRNAWmKUjaI/Fv8 6Zkg== X-Gm-Message-State: ANoB5pkHcqnoYJ/4RPfcl9YqXKiv+vHHjr/zfEs7926PGhv9JRWDM+5D 1cXziXOC/OfG30iJZgXvD1Q= X-Received: by 2002:a17:903:31d6:b0:189:b170:233c with SMTP id v22-20020a17090331d600b00189b170233cmr1625359ple.3.1670613524931; Fri, 09 Dec 2022 11:18:44 -0800 (PST) Received: from mail.google.com (125-237-37-88-fibre.sparkbb.co.nz. [125.237.37.88]) by smtp.gmail.com with ESMTPSA id jb1-20020a170903258100b00180033438a0sm1663934plb.106.2022.12.09.11.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 11:18:44 -0800 (PST) Date: Sat, 10 Dec 2022 08:18:38 +1300 From: Paulo Miguel Almeida To: Greg Kroah-Hartman , Cristian Ciocaltea , Vipin Sharma Cc: linux-kernel@vger.kernel.org, paulo.miguel.almeida.rodenas@gmail.com Subject: [PATCH] scripts/tags.sh: allow only selected directories to be indexed Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 It's common for drivers that share same physical components to also duplicate source code (or at least portions of it). A good example is both drivers/gpu/drm/amdgpu/* and drivers/gpu/drm/radeon/* have a header file called atombios.h. While their contents aren't the same, a lot of their structs have the exact same names which makes navigating through the code base a bit messy as cscope will show up 'references' across drivers which aren't exactly correct. This patch makes it possible for the devs to specify which folders they want to include as part of the find_other_sources function if a makefile variable OTHERSRCDIRS is present, otherwise the original behaviour is kept. Example: make ARCH=x86 OTHERSRCDIRS=drivers/gpu/drm/radeon,tools cscope Signed-off-by: Paulo Miguel Almeida --- scripts/tags.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/tags.sh b/scripts/tags.sh index e137cf15aae9..958c07c4ac4a 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -59,12 +59,17 @@ find_include_sources() } # find sources in rest of tree -# we could benefit from a list of dirs to search in here find_other_sources() { - find ${tree}* $ignore \ - \( -path ${tree}include -o -path ${tree}arch -o -name '.tmp_*' \) -prune -o \ - -name "$1" -not -type l -print; + find_def_params="-name $1 -not -type l -print" + if [ -n "${OTHERSRCDIRS}" ]; then + exp_src_dirs=$(sed 's/,/ /g' <<< ${OTHERSRCDIRS}) + find ${exp_src_dirs} ${ignore} ${find_def_params}; + else + find ${tree}* ${ignore} \ + \( -path ${tree}include -o -path ${tree}arch -o -name '.tmp_*' \) \ + -prune -o ${find_def_params}; + fi } find_sources() -- 2.38.1