From patchwork Mon Jul 1 16:38:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 11026453 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C77951398 for ; Mon, 1 Jul 2019 16:38:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B87992874E for ; Mon, 1 Jul 2019 16:38:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACA9228755; Mon, 1 Jul 2019 16:38:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E88942874F for ; Mon, 1 Jul 2019 16:38:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729301AbfGAQiR (ORCPT ); Mon, 1 Jul 2019 12:38:17 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:42267 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729264AbfGAQiR (ORCPT ); Mon, 1 Jul 2019 12:38:17 -0400 X-Originating-IP: 83.155.44.161 Received: from classic.redhat.com (mon69-7-83-155-44-161.fbx.proxad.net [83.155.44.161]) (Authenticated sender: hadess@hadess.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id B8A551C0007 for ; Mon, 1 Jul 2019 16:38:15 +0000 (UTC) From: Bastien Nocera To: linux-media@vger.kernel.org Subject: [PATCH 2/2] keytable: Remove comments before processing keymaps Date: Mon, 1 Jul 2019 18:38:13 +0200 Message-Id: <20190701163813.25032-2-hadess@hadess.net> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190701163813.25032-1-hadess@hadess.net> References: <20190701163813.25032-1-hadess@hadess.net> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Do our best to remove comments from each line we process from the keymap sources, so as to avoid commented duplicates and false positives sneaking in to the keymap definitions. Signed-off-by: Bastien Nocera --- utils/keytable/gen_keytables.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/keytable/gen_keytables.pl b/utils/keytable/gen_keytables.pl index 3dc74ba6..d73daf58 100755 --- a/utils/keytable/gen_keytables.pl +++ b/utils/keytable/gen_keytables.pl @@ -138,6 +138,9 @@ sub parse_file($$) } if ($read) { + # Remove comments + ~ s#/\*.*?\*/##sg; + ~ s#.*\*/##sg; if (m/(0x[\dA-Fa-f]+)[\s\,]+(KEY|BTN)(\_[^\s\,\}]+)/) { $out .= "$1 = \"$2$3\"\n"; next;