From patchwork Mon Nov 11 02:19:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1192703 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=konsulko.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47BF2q1qqQz9sPK for ; Mon, 11 Nov 2019 13:20:19 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id D0972C21DAF; Mon, 11 Nov 2019 02:20:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9C587C21D56; Mon, 11 Nov 2019 02:20:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DF650C21D74; Mon, 11 Nov 2019 02:19:43 +0000 (UTC) Received: from mail-yb1-f194.google.com (mail-yb1-f194.google.com [209.85.219.194]) by lists.denx.de (Postfix) with ESMTPS id 9A336C21E13 for ; Mon, 11 Nov 2019 02:19:42 +0000 (UTC) Received: by mail-yb1-f194.google.com with SMTP id i15so5691724ybq.0 for ; Sun, 10 Nov 2019 18:19:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=k/FZDrezt+tn/ETtf6dRjQ/vwhqnp+v7RaCuhQZ+DMM=; b=AOueNg7Dxcyt+vZfFhUqsWqJHovicrWtCPb1P7mfnY28VONndx/1EqkC5IoEwLSdZA a2N5qKiMWsMIzwiYRUQHFOh4IBGcZcjie83tuhHK/zdNOCpIojPrU3o+N6St4NpaRVzr C1hGrYem1uw9r9ZZe2+JVlvqyvp4oAhowqBlP0zSTbOilsGVXhaRqnUo3k1iRK3/MOji BHraPHERhZTXcEPeo8gYXH8y1sVV5vLLk9Z9f9/7ED5tks9o/3XcFX6BmPdCLmp/UFmZ mtGCtQNpude06ww0QbNX5nnn5iGAci9aJnkVynXgtTw1pVQ4TMByKXTlSrTk5pqF7gEf JEFw== X-Gm-Message-State: APjAAAXwvLmxetk/7UW2TPIccWLLS48EolzYRzqPiFz0HN929Lyw3QXj E4zwV3HQIym47EJ3tULsCjpPYOI= X-Google-Smtp-Source: APXvYqwzL5fcVHwPP3VQYJ+cowk6VDXOGunvbpHg2hROe5Yn09mrJN7NdKKCHcGI+xSdKrHcntcApA== X-Received: by 2002:a25:3701:: with SMTP id e1mr17640473yba.432.1573438781254; Sun, 10 Nov 2019 18:19:41 -0800 (PST) Received: from bill-the-cat.local (2606-a000-1401-86dd-818f-1a44-c767-0032.inf6.spectrum.com. [2606:a000:1401:86dd:818f:1a44:c767:32]) by smtp.gmail.com with ESMTPSA id b196sm12424945ywh.8.2019.11.10.18.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Nov 2019 18:19:40 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Date: Sun, 10 Nov 2019 21:19:37 -0500 Message-Id: <20191111021937.20036-1-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 Subject: [U-Boot] [PATCH] moveconfig.py: Fix more Python3 UTF issues X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" With the move to using Python 3 for real, we encounter two different issues. First, the file include/video_font_data.h includes at least one UTF-16 character. Given that it does not include any CONFIG symbols it is easiest to just ignore this file. Next, we encounter similar problems with some dts/dtsi files that come from Linux. In this case it's easiest to simply ignore all dts/dtsi files as there will not be CONFIG symbols for us to migrate in them. Cc: Masahiro Yamada Signed-off-by: Tom Rini --- tools/moveconfig.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index e2ff4cfc88b2..36160a397726 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -667,8 +667,11 @@ def cleanup_headers(configs, options): if dirpath == os.path.join('include', 'generated'): continue for filename in filenames: - if not fnmatch.fnmatch(filename, '*~'): + if not filename.endswith(('~', '.dts', '.dtsi')): header_path = os.path.join(dirpath, filename) + # This file contains UTF-16 data and no CONFIG symbols + if header_path == 'include/video_font_data.h': + continue cleanup_one_header(header_path, patterns, options) cleanup_empty_blocks(header_path, options)