Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5241481ybe; Tue, 10 Sep 2019 00:12:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVe5PbuAbhVtaLhwqSE0SZseEAa+LCXM+o3MvuwYjbGt0RNuj0KXCOrHo91LYXt9272WO3 X-Received: by 2002:a50:a5f8:: with SMTP id b53mr28721798edc.39.1568099549001; Tue, 10 Sep 2019 00:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568099548; cv=none; d=google.com; s=arc-20160816; b=E/zIjXAovNK8fznCk1uKAfMkbUQng54PLSqUaZDjO2hFsdWIaBpAPAlVw+kLtdrtmY CBElswgZ90WQrpGlAF3uRTQ+r1/NDOzR+c5NjOHBULDSZTAoThEO1TOKyX5lhU7faR8i uMszLvmEPQyofUguUDAYaum3BpPXZE3EjWNrV/dL+MP0DlJlH2ZSzEhZmGKPh0Q59VzZ pIldrmQZrH65OfqYU3Vh6JNIyJgZGjsU9AlZEHW375ghFRQun10RWATbc5p1R4cvY/iS saaBJu9G8OmOBFDbxPk32mKWZALQkg+hk/Sz05Jh81TCXcTMTDy4g+70cYn3y7e+BFf8 mSPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=MSarGlnW9YOaZQr8nLXdZ/RHsS9R64+NgW7cxT9Bbn8=; b=gNyATEHpLzwZayNC7V7ha2D2irQ8EY5ohWuv9RERlVl1B6BACitmKXgEz5ASD0Lk/C iVophHKW1OsPYf1OdZGbMrNTpTQHrSm4uWhMzQgY/blCUlAwHDsm7ufMiXRolKGPGatr D5+nnVf71EAraGijeJX4YOQXoqSwSrkbRYZQLGDjCXaPX+/Qk4qBZ8FQ96guUyskfCNn 1zMRP9HjGqtbB+pMl13e8Pd7WSNHA2+RrEITnfoGoOVUAHD0tPjoNI6mJKG0NysaFgEL xNSxppKdC7yVqG4UuqSYzvDKTKp7G7AHq5UaRFvjxwK6QzQBJiUnqTidWUWQVlAELAWO MOGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Q3fs9o3m; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l25si8778108ejr.311.2019.09.10.00.12.04; Tue, 10 Sep 2019 00:12:28 -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=pass header.i=@nifty.com header.s=dec2015msa header.b=Q3fs9o3m; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404130AbfIILei (ORCPT + 99 others); Mon, 9 Sep 2019 07:34:38 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:60097 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403880AbfIILeh (ORCPT ); Mon, 9 Sep 2019 07:34:37 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id x89BYPw6012688; Mon, 9 Sep 2019 20:34:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x89BYPw6012688 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1568028866; bh=MSarGlnW9YOaZQr8nLXdZ/RHsS9R64+NgW7cxT9Bbn8=; h=From:To:Cc:Subject:Date:From; b=Q3fs9o3m9BOg5J/DkalhKGRPjLgAx3UPUN9aKw0GqKRlVIKbiSp7e7d3zhEFeRFDq PYL4zEMjhaovA7gYIYzpHk7DikEznHO6NusBsPzPkp0fVFIWIPZYgh1SmgBCOJ0IQ9 heD93HRUsOT23pmAaSlEHkVLjeWMNF4aWce9g6UWaYTuzcxY4VWkwPHX9ymmIMcfQU ObWXb9arotJ1nJSH2MYM2schM0p+qyoyRQdUoFzSR4FmZVPNvDzDiJzj362QZ0RaWb e8CqamjHtTQptro5TSaYEBs5UVr/7w7Zt0Xu5NBAMP+88E5UuUQ/KSI59WaojHNKAK 6b83kbWQDUCug== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Lucas De Marchi , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] modpost: use MODULE_INFO() for __module_depends Date: Mon, 9 Sep 2019 20:34:22 +0900 Message-Id: <20190909113423.2289-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This makes *.mod.c much more readable. I confirmed depmod still produced the same modules.dep file. Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f277e116e0eb..480c7b60153b 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2250,10 +2250,7 @@ static void add_depends(struct buffer *b, struct module *mod) s->module->seen = is_vmlinux(s->module->name); buf_printf(b, "\n"); - buf_printf(b, "static const char __module_depends[]\n"); - buf_printf(b, "__used\n"); - buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n"); - buf_printf(b, "\"depends="); + buf_printf(b, "MODULE_INFO(depends, \""); for (s = mod->unres; s; s = s->next) { const char *p; if (!s->module) @@ -2271,7 +2268,7 @@ static void add_depends(struct buffer *b, struct module *mod) buf_printf(b, "%s%s", first ? "" : ",", p); first = 0; } - buf_printf(b, "\";\n"); + buf_printf(b, "\");\n"); } static void add_srcversion(struct buffer *b, struct module *mod) -- 2.17.1