Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10050245ybi; Wed, 10 Jul 2019 22:33:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuOBJQbeVhT0uNr2+4TDTezDgYjShHQW/3VIs0N4U+shuGiHcmBaSUowIFsAAnCgLcxwnX X-Received: by 2002:a17:902:694a:: with SMTP id k10mr2469603plt.255.1562823214319; Wed, 10 Jul 2019 22:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562823214; cv=none; d=google.com; s=arc-20160816; b=Vc2MkyVMKXw0Meepq3vzzJm3Yu6qJiD9F+x9DjXTAZOcNGpGKkqlivQzX4iTAVEEqA DmNQPzznp3avotLuGfHSZhlUXUclWI7mXmxv507CnbM6EBTnf/fU6fuhyaw+UxG5Wycn PFQ61xdxbArozNsJMtbey9i4RFwIY0HM6NQ6cBYGYpTSeIP+C/rsbHI0aL9eOTROPQ2V A+qfmHYU9gzQbjP+X8qzidM8h23eTnv+3CykrMcNLatrfyJEfsv46b2eansHZsFmJHo2 mhTO1JJTHJU63NjUUxIJExdLce5FvFJ5ZGKG5h5Hc1pcqlJoBryzhn/j9BxXc84mdyPR Pwow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=1kECWKsjHiZrBfDgKoCp1WwU4/ibrj+5CihzDbiNBoo=; b=ygV86jCW+2zE/RnM+XgJRajO4zKNSCNEKHbXwdXZlF06sePCEUuMEf7aq9tJdkepQR vibav6DRausORd6PWjXETb/Wif5EdEAwvKj1iXax7bf5RFSLp7iD7ZGrIgHIC1QOILD4 11yqPe9eljpipHDE+KMCRlKE3M1fp1x4zojNuQ3HVZEk/3oM347HksUsSU01h0zFsf0E y+dnD527HE/mzuyIuDKnudP18HrBGx/Nwrjpwa+ce5T3z6U43ywqHux3jlFy1Nw/XpgH MjFUsnoJshNgvGoiCBVDJb2TIt8ARmLrQFPw9qEQdCW+r7St6j0lwQNQ0G+t5WNrpvli qXIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=x8Pf2DcB; 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 f5si4192370pgq.137.2019.07.10.22.33.18; Wed, 10 Jul 2019 22:33:34 -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=x8Pf2DcB; 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 S1728100AbfGKFbI (ORCPT + 99 others); Thu, 11 Jul 2019 01:31:08 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:63639 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727595AbfGKFbH (ORCPT ); Thu, 11 Jul 2019 01:31:07 -0400 Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com [209.85.222.43]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x6B5Uplf029974; Thu, 11 Jul 2019 14:30:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x6B5Uplf029974 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1562823052; bh=1kECWKsjHiZrBfDgKoCp1WwU4/ibrj+5CihzDbiNBoo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=x8Pf2DcB1FH8Okvld1Qhzl3GrZGCGnenamoyOf/zMrlYKt51Le6uG5rW62SXJIgCa pFa7e7jUibhYgIFAF7Bh7oAde52RBnqnZkiFaS/AtEhntpvbuOva9LcvOI726OpsO5 xRKuF/WApT9uWGxcB4faTO+kepFuq0ok3Qh8IQqtzC6qnf29ZOV+kAbGLYHcU7jBd2 zX9oalsdCMZYG4ZQzB/1n58YVZuJnrAxiHeBxnInziM0xVtlA3p9ALmgjggEHiEc8N XKv71DXdWWuXQhFmslI7JuhL9AZs9N6Bw3ttL9/7xclYgn7T1J0sWE8yi/WXAthLXZ WVKNShOUIQUZg== X-Nifty-SrcIP: [209.85.222.43] Received: by mail-ua1-f43.google.com with SMTP id z13so1855694uaa.4; Wed, 10 Jul 2019 22:30:52 -0700 (PDT) X-Gm-Message-State: APjAAAWOB6xam4kDQw/eMoCZilcs0ACQ97r0j1sM1frwweRmVIhWLqam rz3QPAKkh8OMR8ujTM6c+TM6Edzk33fV9M/qiTg= X-Received: by 2002:a9f:25e9:: with SMTP id 96mr1296970uaf.95.1562823051136; Wed, 10 Jul 2019 22:30:51 -0700 (PDT) MIME-Version: 1.0 References: <20190709042416.27554-1-yamada.masahiro@socionext.com> <20190709042416.27554-9-yamada.masahiro@socionext.com> In-Reply-To: From: Masahiro Yamada Date: Thu, 11 Jul 2019 14:30:15 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 08/11] kbuild: create *.mod with full directory path and remove MODVERDIR To: Nicolas Pitre Cc: Linux Kbuild mailing list , Sam Ravnborg , "open list:DOCUMENTATION" , Jonathan Corbet , Linux Kernel Mailing List , Michal Marek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 10, 2019 at 2:37 AM Nicolas Pitre wrote: > > On Tue, 9 Jul 2019, Masahiro Yamada wrote: > > > --- a/scripts/adjust_autoksyms.sh > > +++ b/scripts/adjust_autoksyms.sh > > @@ -47,13 +47,10 @@ cat > "$new_ksyms_file" << EOT > > */ > > > > EOT > > -[ "$(ls -A "$MODVERDIR")" ] && > > -for mod in "$MODVERDIR"/*.mod; do > > - sed -n -e '3{s/ /\n/g;/^$/!p;}' "$mod" > > -done | sort -u | > > -while read sym; do > > - echo "#define __KSYM_${sym} 1" > > -done >> "$new_ksyms_file" > > +sed 's/ko$/mod/' modules.order | > > +xargs -r -n1 sed -n -e '3{s/ /\n/g;/^$/!p;}' | > > +sort -u | > > +sed -e 's/\(.*\)/#define __KSYM_\1 1/' >> "$new_ksyms_file" > > Did you consider the case when CONFIG_MODULES=y but no modules are > selected? I tested it, and worked. Also -r to xargs is a GNU extension and there were some > efforts to remove theur use in the past (no idea if this is still a > concern). It worked even without '-r', so I remove it in v2 Thanks. -- Best Regards Masahiro Yamada