From patchwork Thu Apr 28 21:29:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 8975091 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4D762BF29F for ; Thu, 28 Apr 2016 21:29:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 746F420274 for ; Thu, 28 Apr 2016 21:29:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A18A020212 for ; Thu, 28 Apr 2016 21:29:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752796AbcD1V3r (ORCPT ); Thu, 28 Apr 2016 17:29:47 -0400 Received: from mail-qk0-f175.google.com ([209.85.220.175]:35538 "EHLO mail-qk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752631AbcD1V3q (ORCPT ); Thu, 28 Apr 2016 17:29:46 -0400 Received: by mail-qk0-f175.google.com with SMTP id q76so33679378qke.2 for ; Thu, 28 Apr 2016 14:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=yUw86cGWg6HBQ0hEIAdfbfKqaJTpCxLEfnt8QoIvNNY=; b=F1RIM6WplO056nuuhzQRSVW931NHvu9uAPBALb5DRLgp2EYNc/cBYxlWypiIh8+qQB 2w3PCO6FqIkMqF8HWmm70o+Uulq+gJUp0HxbERSKhKBZwXLSleWq+QSCrCYcAR3RBpgY cJa3dW7++4xnI83J3YThst9MkPFVU6veUWLbM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version; bh=yUw86cGWg6HBQ0hEIAdfbfKqaJTpCxLEfnt8QoIvNNY=; b=bgXq0cA1bUYll412HQKmMDsVfYCyBnvoDYqTf8ymyEKIjxkkqCeAI4NOGj97GKJqCG w++rYBL8VVzf49x/jpioJBd3oqkAe0WslUc3rx2BYtfLxcC+32OCpxEEvYeUaY2bZtQD 08UfggPfDxgAsDTSzcaKmpvjiyy6UX1Ybi03TYBFL53IKnTqSfk54cfbj9uV0vcv0HPS 77nHiZnOL9pjuTizbgzBsAZnbe630oPFKXy5Ud0QQnqX9rNk4zk2jQWMWRpvNrEP5mWh zO4JDwqiK0GpgO8W8QR/tZzB2EiEzH2QFFZJA/jKHb0LWAt4+uG0QUOyqCUNpqnoIIDT tkFA== X-Gm-Message-State: AOPr4FXVX+fiIcMGXTKxDzGWqjM6GzDMFwvbkpTF/xjDwcxvgjVxOeRQE36OWWgbC7iK8JZr X-Received: by 10.55.133.193 with SMTP id h184mr16780138qkd.202.1461878985114; Thu, 28 Apr 2016 14:29:45 -0700 (PDT) Received: from xanadu.home ([2607:fa48:6e39:d410:feaa:14ff:fea7:ed77]) by smtp.gmail.com with ESMTPSA id h34sm3406004qgh.38.2016.04.28.14.29.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Apr 2016 14:29:43 -0700 (PDT) Date: Thu, 28 Apr 2016 17:29:42 -0400 (EDT) From: Nicolas Pitre To: Michal Marek cc: Arnd Bergmann , linux-kbuild@vger.kernel.org Subject: [PATCH] kbuild: fix ksym_dep_filter when multiple EXPORT_SYMBOL() on the same line Message-ID: User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In kernel/cgroup.c there is: #define SUBSYS(_x) \ DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_enabled_key); \ DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_on_dfl_key); \ EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_enabled_key); \ EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_on_dfl_key); The expansion of this macro causes multiple EXPORT_SYMBOL_GPL() instances to appear on the same preprocessor line output, confusing the sed script expecting only one of them per line. Unfortunately this can't be fixed nicely in the sed script as sed's regexp can't do non greedy matching. Fix this by turning any semicolon into a line break before filtering. Reported-by: Arnd Bergmann Signed-off-by: Nicolas Pitre Tested-by: Arnd Bergmann --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 36e9475395..1f0d41cc73 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -281,7 +281,7 @@ ksym_dep_filter = \ $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \ boot*|build*|*cpp_lds_S|dtc|host*|vdso*) : ;; \ *) echo "Don't know how to preprocess $(1)" >&2; false ;; \ - esac | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' + esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \