Received: by 2002:a17:90a:2044:0:0:0:0 with SMTP id n62csp523145pjc; Mon, 20 May 2019 11:12:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzI6qjnAJOfDEF3jtQcJtGaNGeZXtgD38JPp4hVSgEvo5NYLUzK+uSl9Asv8Jg8yvc8kO9P X-Received: by 2002:a17:902:1021:: with SMTP id b30mr38634902pla.324.1558375976583; Mon, 20 May 2019 11:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558375976; cv=none; d=google.com; s=arc-20160816; b=R+MAsI2QrVhC1ndPL8WWk8ZkjbgjsjS9aS0aPdJMc3CZK+rrU4C95HkvP7EU0BG2zC NzgbCdvzoNkO4Hdy/tqsDFQ9EF7rniW8yU/tF+B2M7/y+fvdPTDrlYgeIImj4XXR02Kj H/e2lH45BMUjoiv36mFW5BICPNGYhrLLxawmZ70n3sDuHtZ+PrWGGFW52jd6HJGdEBnq xEdLHFFPz1olOd/l4p7c2iCoee7JJSOj167diFRccLNgfRZ/N5IO6g/xmJy9frFooLqa tCam4gPzTazfYz+9w633NNrEiNdTNc/7SYsYWD+bj9m9976GWadw+xInsH7tsPKSgvH7 82LQ== 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=b5h6DUqag7EF9w0QrPjBJKcE9IBRRdUkob8nuxOQVRdXy7mLO1ii9cVrPLVLy6FkE9 aE99q2q4BQ4Vr6O/F/EAEa0jgEZ1S2iO4zF5Lpyxsti6twwf6iFNW5MhodBvBqbPDjti CiJQtd+xYMVFrYAcKp+wqwkIWApUIpO9b0dtikqgsJFbFAK7sbPtRv3eSVna+2DDOeDp F5osOuegU6egk0uOWC7RszaM323B98u+6+XjIVrEg3vPP3T0jax2IyjoogYZbgcSVT11 cNaUOnjwm3X9uGUpsqGurXcUAkxOYRYbjfYVgSPk064wopJS7KjRfORZxmF8IsVw/w05 dZ3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=opGgamru; 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 a17si18170213pgb.25.2019.05.20.11.12.40; Mon, 20 May 2019 11:12:56 -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=opGgamru; 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 S2391776AbfETOsC (ORCPT + 99 others); Mon, 20 May 2019 10:48:02 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34508 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731837AbfETOsB (ORCPT ); Mon, 20 May 2019 10:48:01 -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=opGgamrus8/MlNcjK7Utg0Jb2d v5+OiZpAbqArtyZuw3nL37J17iwVLYbHlwPSk1rdMi8+P9KvECgzceshxYCwnuf1ywAInuP4VeaXM cd+/0eihRLYwuutLWVxPvCMjOUY6Nls5Pf2hYnrcP1+2ztECoxsURhXC5GBfrYQtHQGHeal320tGM qF7AL9qAznzKtt5NhTYIuQCTVGEni36xWwZd6PEy/f1rIkUWLCooi+RQuPBonL2SivqcgoEipw0O/ cftVM4DHbilj/R42KXMqF6NVKuCpdabb9OmXst2nbUvZ+zF+Fwz8Qe2tLoBvpEIihqHU1YT0UMjHF EHbI3qrA==; Received: from [179.176.119.151] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSja3-0000E5-Ou; Mon, 20 May 2019 14:47:59 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hSjZq-00010r-O7; Mon, 20 May 2019 11:47:46 -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 04/10] scripts/documentation-file-ref-check: teach about .txt -> .yaml renames Date: Mon, 20 May 2019 11:47:33 -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