Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp37952ybi; Wed, 29 May 2019 16:12:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5dIdmZhlSfFyDuLEyg51K/jLEsBTCdw1Tt/Eyni7zczKwvILgtlgEF5l9LuXP5E9EtvnF X-Received: by 2002:aa7:9217:: with SMTP id 23mr270043pfo.80.1559171574081; Wed, 29 May 2019 16:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559171574; cv=none; d=google.com; s=arc-20160816; b=MqtIwfu+T2i/oHOMkZimxb4jcg/2CI0upWSd1jdyAP9E0RaIDFxs/PH65a5J+dTXiY 0CuLLP9FcWWoM2CD3wI8Gb4/iED58bxeTHB2H8gWEH8cFTcEKO6TEWWv0Au0T7jsVzph d5kBHx5Roc+hF8qAoyaXBJMM5lpZGIpnHO7fvAdgM/kKgFgYrQWgpt4+JsxHjqrfXjqE AFPju27sUcID7Lx7b+NewGw7sZhnF+15VwWdnmw6Md2/DWyI8DtDgp4nB9R/rMLswe5m vlUOh+3b7oS0a879gDJ9+1Tvtx2ZIsz6sFungtJORSDydstkn7B6A1yopnnwClhFvcCC eynw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Pzy7R7NMtIp0soxdacOvAtehGecGOy+zjqDf/NYYYuQ=; b=TDox7NFG/flEdPu7vqbkPKsVJPiIPj0pAQ/HIy0gxQmnk2Bh1cbqeMirkobNYhC89G BmiFZd8TNLbODyVcOiuNw65tDgLPjIcRARd5C+cZUG6HCPVnkQomZeRsvur+Ge8s9123 R0DT49g1pSv0WkzDpFl9Vl1yBVeHYUxrCZnGJuL1LgbF+j3CgZcp+8v5UAADpGYQBP9K fOmJltSNHSod9dizXQMEkwAdtS6IXA4a6QE0kcMAW4tXwgRHidpJ2CZ7woSkSsHtxn5z sQMWIdz8Mm07JXn8gXffkR91zPCOWYoPL2Fzb7gw222+uWL+0EpvW+MtY9bxvsmG9C+J wQvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ox5BvDxZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si1207341pgv.401.2019.05.29.16.12.37; Wed, 29 May 2019 16:12:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ox5BvDxZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726604AbfE2XJh (ORCPT + 99 others); Wed, 29 May 2019 19:09:37 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47586 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726408AbfE2XJh (ORCPT ); Wed, 29 May 2019 19:09:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Pzy7R7NMtIp0soxdacOvAtehGecGOy+zjqDf/NYYYuQ=; b=ox5BvDxZ/jy4+sN4uLv8yqRD44 XESlSqsqcaZEBuY3CmAeXrFTq7oW+fwCkUQdNtbYKmx/y3rv7ROk/C6P/0D8sKTLp6+qElFtOS/j1 x8+xS12gxsGFcWXNWtmHr4nOomFrnXUS4LVv3Nv0w/cY/2Gx7JPe0sUmXnS9+KhpslITowcGW2l22 gC3R3/j5njBxKCZeBnPSYIz0uQAYS4aKUp34Yosr1udeR7gsFr5MoN0NPwlp1ZFyLKtzcLwZX1Vyf ylb2X4m8uCwpZpurJDSAnh5++ME70oF5oG/EzVmWV6mMR1/5aPtu1kNGXqgh3s6ehf9JXfxZzE9sa 2GqMI9Rw==; Received: from 177.132.232.81.dynamic.adsl.gvt.net.br ([177.132.232.81] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hW7hQ-0000lB-Fv; Wed, 29 May 2019 23:09:36 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hW7hN-0007Tl-NR; Wed, 29 May 2019 20:09:33 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Subject: [PATCH 08/10] scripts/documentation-file-ref-check: teach about .txt -> .yaml renames Date: Wed, 29 May 2019 20:09:30 -0300 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At DT, files are being renamed to jason. Teach the script how to handle such renames when used in fix mode. Signed-off-by: Mauro Carvalho Chehab --- scripts/documentation-file-ref-check | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check index 5d775ca7469b..ff16db269079 100755 --- a/scripts/documentation-file-ref-check +++ b/scripts/documentation-file-ref-check @@ -165,13 +165,22 @@ foreach my $ref (keys %broken_ref) { # usual reason for breakage: DT file moved around if ($ref =~ /devicetree/) { - my $search = $new; - $search =~ s,^.*/,,; - $f = qx(find Documentation/devicetree/ -iname "*$search*") if ($search); + # usual reason for breakage: DT file renamed to .yaml if (!$f) { - # Manufacturer name may have changed - $search =~ s/^.*,//; + my $new_ref = $ref; + $new_ref =~ s/\.txt$/.yaml/; + $f=$new_ref if (-f $new_ref); + } + + if (!$f) { + my $search = $new; + $search =~ s,^.*/,,; $f = qx(find Documentation/devicetree/ -iname "*$search*") if ($search); + if (!$f) { + # Manufacturer name may have changed + $search =~ s/^.*,//; + $f = qx(find Documentation/devicetree/ -iname "*$search*") if ($search); + } } } -- 2.21.0