From patchwork Sat Apr 27 03:33:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162984 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1470488jan; Fri, 26 Apr 2019 20:33:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVdCiChTiOUGqk3NfVuAGosHfquHy2hyaSQqUfWkMDRLtjjKsupZvIGAUIBMRJNoz2IRPV X-Received: by 2002:a63:c10e:: with SMTP id w14mr27532663pgf.206.1556336034903; Fri, 26 Apr 2019 20:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556336034; cv=none; d=google.com; s=arc-20160816; b=fnkizQmkynIz64O9dYhA6/WZh7meeAapQv2kO/vWH7jv4ksZt6Op51rGn/ORjbs+Wa MdHP9XgDIDe32Riih6X3K6Teuq5ApQOn8ZEPi2IKqwgG5tqyOltcUPD3LlPD2rc+onpk do8vLqTXvI1K/G9NLyeWDTo7tUW0k2jSQSdXdJd3XTc2fWOOpkSJy6qy/IEGx9R/orGA ITdgd10Gzgg1j7X69WT6FnVHPykfHV6rK3Bh1YQHO+dYoLazaJsRUXkVwZH/WPnjKzdb mMNi8/kOoBzqLkWggbzXvDM41J9EAKeAEE5rEK++b8dTkE9Wq21QCceRNCF5z7Rup0/Z bq9A== 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=MTquuhRSUQKNTK42Xx9Gwp06/bDDMv+mmeZs+svCSU0=; b=KBxo5/rNI+pgjWpwEgGKbpzNTDo+HvE04hqPCKKB1x5HYOpgwxd2MQDGPvknbzoeCF 2GsD0VKaVU0LM2c2IFH7ptPzND+4An+e5QzLp3/0aWOl58V9w01OEqgoPxRM2CJFWR3p G28YS/CCcnQymxQ4ZrqrrhaWGFZl5Qef0O31y0PPBvP/39z4B4vu5IuhSM5LWdXT1WaD xtR3iuMpsIwRdKDSLIQTe3tOZy1ALuWMQ6l2+C1NLL561vocJ869/pZ9WI+kf5fZ2ASM 3Nd0QQ6syT7p7T1iDkq4S0cgm+glnohT1A82tdd5WJTibiLlkeQsuJGyQh8mBME5KHL9 1B1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=rshherKe; 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 e3si25763627pgs.37.2019.04.26.20.33.54; Fri, 26 Apr 2019 20:33:54 -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=rshherKe; 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 S1727421AbfD0Ddw (ORCPT + 30 others); Fri, 26 Apr 2019 23:33:52 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:17157 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbfD0Ddv (ORCPT ); Fri, 26 Apr 2019 23:33:51 -0400 Received: from grover.flets-west.jp (softbank126125154137.bbtec.net [126.125.154.137]) (authenticated) by conuserg-10.nifty.com with ESMTP id x3R3Xie7029345; Sat, 27 Apr 2019 12:33:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x3R3Xie7029345 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1556336024; bh=MTquuhRSUQKNTK42Xx9Gwp06/bDDMv+mmeZs+svCSU0=; h=From:To:Cc:Subject:Date:From; b=rshherKe8BwpbhuKrRWJ7n0lxdM4MPPVJe+ndSFXieNNeh+JQ5cLp6wigzeI5D/qw Crgknety+1vJjoxQQMAQFsXqI2Ng7ZxA/BOaO9/yV4AlidRtYsZdQJk4/xMzbNbF+R zAB3Y2iHeexYWbwAxudzsIo9j9TttFA8cWKvB2Rzi4PvSgDL9t6nW3ISi0ArXYLUZr Cynaz/5nbrnaZAFXEibPz7lV50FUqw9PbRfSRhBNPtXzCbaeSn42kDAqoFm7Nrhdjc 0QMN3co11WT+WDDDuudiA4p16pV/FZ1k4cWI80xD5G+FsI9NlqaNIgVjzePdL/gnwn UJmnl3Q+95k6Q== X-Nifty-SrcIP: [126.125.154.137] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/5] kbuild: move samples/ to KBUILD_VMLINUX_OBJS Date: Sat, 27 Apr 2019 12:33:36 +0900 Message-Id: <1556336020-15634-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Handle samples/ like the other top-level directories to simplify the Makefile. Include include/config/auto.conf earlier to evaluate drivers-$(CONFIG_SAMPLES). Signed-off-by: Masahiro Yamada --- Makefile | 18 ++++++++---------- samples/Makefile | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index 15e17b4..251ded5 100644 --- a/Makefile +++ b/Makefile @@ -598,20 +598,21 @@ endif export KBUILD_MODULES KBUILD_BUILTIN +ifeq ($(dot-config),1) +include include/config/auto.conf +endif + ifeq ($(KBUILD_EXTMOD),) # Objects we will link into vmlinux / subdirs we need to visit init-y := init/ drivers-y := drivers/ sound/ +drivers-$(CONFIG_SAMPLES) += samples/ net-y := net/ libs-y := lib/ core-y := usr/ virt-y := virt/ endif # KBUILD_EXTMOD -ifeq ($(dot-config),1) -include include/config/auto.conf -endif - # The all: target is the default when no target is given on the # command line. # This allow a user to issue only 'make' to build a kernel including modules @@ -1005,7 +1006,7 @@ export KBUILD_VMLINUX_LIBS := $(libs-y1) export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds export LDFLAGS_vmlinux # used by scripts/package/Makefile -export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools) +export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include scripts tools) vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) @@ -1042,11 +1043,8 @@ vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE targets := vmlinux -# Build samples along the rest of the kernel. This needs headers_install. -ifdef CONFIG_SAMPLES -vmlinux-dirs += samples +# Some samples need headers_install. samples: headers_install -endif # The actual objects are generated when descending, # make sure no implicit rule kicks in @@ -1362,7 +1360,7 @@ MRPROPER_FILES += .config .config.old .version \ # clean: rm-dirs := $(CLEAN_DIRS) clean: rm-files := $(CLEAN_FILES) -clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples) +clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation) PHONY += $(clean-dirs) clean archclean vmlinuxclean $(clean-dirs): diff --git a/samples/Makefile b/samples/Makefile index b1142a9..50f8586 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -1,6 +1,6 @@ # Makefile for Linux samples code -obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \ +obj-y += kobject/ kprobes/ trace_events/ livepatch/ \ hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ configfs/ connector/ v4l/ trace_printk/ \ vfio-mdev/ statx/ qmi/ binderfs/ From patchwork Sat Apr 27 03:33:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162987 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1470609jan; Fri, 26 Apr 2019 20:34:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/H5e3sAR+IMe3tYut/KelUzpKo4BNVviKf29r23TXrtJD6TkKRw/Bal8PoJWxQK/SVtSG X-Received: by 2002:a63:e5a:: with SMTP id 26mr15744817pgo.405.1556336045956; Fri, 26 Apr 2019 20:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556336045; cv=none; d=google.com; s=arc-20160816; b=D2hvSFlNQwGb6p9EOv7D2nnACp097OhadzDnpH4BKoiSe+eZr9pl58r+8OiiFSNhiL BFJqK0q91oC6Zccm88q5yej+yJtGnjyHCNswbruQXjcujQNxj+cPBM+Qsrtz4N3aIKjH BtihvAYyrEPE0zwKuNmR1bSYjVOW/1LFORD42X8VWprHVr1fh0gVHZUIR3UnCs3cETEy nQtOBq9hrcOwjTAYnalwedSJsC7hpZANdSv5qFq77lv0W/HTHY6w7NEQ8rn21X/rHeA2 OamGVe8k1bwzQfYCui2cRnwPiO15aI78Mup14G2vIdLT7uUXSUlXTPNxnX74Ka0xaWcI 0FCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=pcu/osjIIRg4wqmdG4C8oYhKJp+1QGehdijvvPa7Egw=; b=dGHAU1v6p8kGqsW1FYAjY+n9vkhZP1+8NgM6Nan900husHzm9I8SGDFPNPoyQGAFb4 zy5Rvw7uZQHFSG8QzzNYUtxA5Hd9IRshHHRXDKNuerqkLh+hLhrh6s8ZiS7jHNiqQREr 0LPdkCslD98OwxNM/Zhr3TpZhR9vqX+rxJ3rry11DeGzPjVWghe7APiupTwWCvqb4/gT Q4XeQE4Q8twZGqtmvHDJyK+15JFchp0aKE30Sx0rJD1BGnNVH5Ju/bLogWK0eJwaEh0j +NnFuDDH/FP9oUJgK8gofgtmrVbYfTdJZThT2pRueCyWzu69+enn2nCQB0nqz5b2rbni Ah9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=bq63Rjrh; 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 w21si26875820pgj.513.2019.04.26.20.34.05; Fri, 26 Apr 2019 20:34:05 -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=bq63Rjrh; 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 S1727471AbfD0DeE (ORCPT + 30 others); Fri, 26 Apr 2019 23:34:04 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:17158 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727327AbfD0Ddv (ORCPT ); Fri, 26 Apr 2019 23:33:51 -0400 Received: from grover.flets-west.jp (softbank126125154137.bbtec.net [126.125.154.137]) (authenticated) by conuserg-10.nifty.com with ESMTP id x3R3Xie8029345; Sat, 27 Apr 2019 12:33:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x3R3Xie8029345 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1556336025; bh=pcu/osjIIRg4wqmdG4C8oYhKJp+1QGehdijvvPa7Egw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bq63RjrhoukXHGubhkNvEfUaft0eyvGmY9rS9Q7HooEhOSBtyEOOTmLZtmNTkPnJW 8TVOwcxc6A7ZhbgM14dsD3LD6Wu8B71jAPB8qQLMVjTwRjmkZ2Tzxwm7BmUu8DL8tT UqADqGKklaSr19xMvzFwiTJKaS2BMghMvGfU4MdG+SDW4f8xt9eE5kMnJToiPvU1lT fUYPhqmIraWSqLxomeKMX+De60HGZrIdbEaKAQEkc7MSEBVeK3O4GymhmCLu8aygSD 4Fw9XKh/HNup0GZOt9Dg8i2aqUhr1O6exPE3mMc0wGDwPzE3p2PiR7AWr0t0qd1fmx 6dfVtbpw+Fh9g== X-Nifty-SrcIP: [126.125.154.137] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/5] kbuild: move Documentation to vmlinux-alldirs Date: Sat, 27 Apr 2019 12:33:37 +0900 Message-Id: <1556336020-15634-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556336020-15634-1-git-send-email-yamada.masahiro@socionext.com> References: <1556336020-15634-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A minor code cleanup. Signed-off-by: Masahiro Yamada --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index 251ded5..334ef8a 100644 --- a/Makefile +++ b/Makefile @@ -988,8 +988,9 @@ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ $(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y))) -vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ - $(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-)))) +vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \ + $(patsubst %/,%,$(filter %/, $(init-) $(core-) \ + $(drivers-) $(net-) $(libs-) $(virt-)))) init-y := $(patsubst %/, %/built-in.a, $(init-y)) core-y := $(patsubst %/, %/built-in.a, $(core-y)) @@ -1006,7 +1007,7 @@ export KBUILD_VMLINUX_LIBS := $(libs-y1) export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds export LDFLAGS_vmlinux # used by scripts/package/Makefile -export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include scripts tools) +export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch include scripts tools) vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) @@ -1360,7 +1361,7 @@ MRPROPER_FILES += .config .config.old .version \ # clean: rm-dirs := $(CLEAN_DIRS) clean: rm-files := $(CLEAN_FILES) -clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation) +clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs)) PHONY += $(clean-dirs) clean archclean vmlinuxclean $(clean-dirs): From patchwork Sat Apr 27 03:33:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162988 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1470675jan; Fri, 26 Apr 2019 20:34:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyg+n9pJrLAaOlHDV3y+FUYO78YigkgFZnH/0yc+OieCzjifSt87NRK+mISLfLMP3Lg9JXQ X-Received: by 2002:a63:c70b:: with SMTP id n11mr23345094pgg.223.1556336051449; Fri, 26 Apr 2019 20:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556336051; cv=none; d=google.com; s=arc-20160816; b=tC1T7iuCkR9a7MTmGQ+XpeFHQtrCwHPxAeSGxNNUa+N87v2fJyiDiKu2V85GKnhnxq PIY/E9xFe+C3ozurZurim4/x0i4cCxnoWCadSV5/uYTpdVRWlwhdJusDt5OxaYfQWG7Y 98H2Mq8uflFbsOZRRnESgjIYV2ruutB6fnwPrjcgizBbQ7VNGQVqDc/sdEGoELJ00ke9 zck96mWOziO4O7p0syW4nfnze0wOv+VDDVyChbZoGOhhZZ5r6lH+ElRxa6V2u4xmc9Eu UdTFPUjvzyGKjGqRzFCsBUWroDv9GLedp93p4/kUQYELHQg74r+QAcaOb46fXYgkM2iD 9pWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=nRN3KbTI71mxDcDVMkE3kPEQDMn9s9dPdxgPtZcV+64=; b=amoJcsWHcvt2OLB18adR+ojLE26/utyTX7/P3sEmyaeNj+wn/l07e/eLC/oa8anAuT 0g62VPHNhjt38zNDoJ0neyAfN6/f/Caj+7kks4PfaL6hu6iiZz0ZFTVxrWCr4A3pk2tu 0Hb5B9SRWdk6G6ZgqxWbh0dW+x+RnLDLJ5GyGHaHy6wfAxYACP981VJJxJzlIbrm6hI4 b19ScoTMAE9Xd1AjLE2vI95TDKf90Dea4QMOBj/E/KzZqnm1pdxFUTIHYEDNLX1TFfX9 5Nn8PYZ7SHCLqD06G32J5DnzgoykRcG90Y5ERcTXFUEwWPJucp2uRCUa5F1G0ADPB7VA eh4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ocsStDNd; 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 l68si28095606pfb.248.2019.04.26.20.34.11; Fri, 26 Apr 2019 20:34:11 -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=ocsStDNd; 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 S1727496AbfD0DeJ (ORCPT + 30 others); Fri, 26 Apr 2019 23:34:09 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:17156 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727353AbfD0Ddv (ORCPT ); Fri, 26 Apr 2019 23:33:51 -0400 Received: from grover.flets-west.jp (softbank126125154137.bbtec.net [126.125.154.137]) (authenticated) by conuserg-10.nifty.com with ESMTP id x3R3Xie9029345; Sat, 27 Apr 2019 12:33:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x3R3Xie9029345 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1556336025; bh=nRN3KbTI71mxDcDVMkE3kPEQDMn9s9dPdxgPtZcV+64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ocsStDNdXFsaveLs0g/okRTy+I6dxFZi6U0XR/yT/7MmsMPQ9ZYdX26iO9TZJYTln e2azvj3zCE7bhuvKus43WB6GD8EnjlhMpdDpHAJlHzHm0XmsO9ul/Pt/VF220e9K3j Oq4q7IuuUeWPPfLUWjagkprmSIR6XyiofHS7vTF9mN3d4Cmgx428HpOkC9015wbP7G pQHccdOnlcTYk5bgomqJiyFQ45Eq3WWflQwTYm0MFSz91vf+31bkkyfwGOnWUUWcQO gsdIdT5Fvt4mC+IngUVipgGspGy+1h0TzVIsZz/cC8w2YZ+3r2O6eEJqkdY2t8Hols NvBoDjbVra56A== X-Nifty-SrcIP: [126.125.154.137] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 3/5] samples: guard sub-directories with CONFIG options Date: Sat, 27 Apr 2019 12:33:38 +0900 Message-Id: <1556336020-15634-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556336020-15634-1-git-send-email-yamada.masahiro@socionext.com> References: <1556336020-15634-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Do not descend to sub-directories when unneeded. I used subdir-$(CONFIG_...) for hidraw, seccomp, and statx because they only contain host programs. While we are here, let's add SPDX License tag, and sort the directories alphabetically. Signed-off-by: Masahiro Yamada --- samples/Makefile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/samples/Makefile b/samples/Makefile index 50f8586..0f2d70d 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -1,6 +1,21 @@ +# SPDX-License-Identifier: GPL-2.0 # Makefile for Linux samples code -obj-y += kobject/ kprobes/ trace_events/ livepatch/ \ - hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ - configfs/ connector/ v4l/ trace_printk/ \ - vfio-mdev/ statx/ qmi/ binderfs/ +obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/ +obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/ +obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/ +subdir-y += hidraw +obj-$(CONFIG_SAMPLE_HW_BREAKPOINT) += hw_breakpoint/ +obj-$(CONFIG_SAMPLE_KDB) += kdb/ +obj-$(CONFIG_SAMPLE_KFIFO) += kfifo/ +obj-$(CONFIG_SAMPLE_KOBJECT) += kobject/ +obj-$(CONFIG_SAMPLE_KPROBES) += kprobes/ +obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch/ +obj-$(CONFIG_SAMPLE_QMI_CLIENT) += qmi/ +obj-$(CONFIG_SAMPLE_RPMSG_CLIENT) += rpmsg/ +subdir-$(CONFIG_SAMPLE_SECCOMP) += seccomp +subdir-$(CONFIG_SAMPLE_STATX) += statx +obj-$(CONFIG_SAMPLE_TRACE_EVENTS) += trace_events/ +obj-$(CONFIG_SAMPLE_TRACE_PRINTK) += trace_printk/ +obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/ +obj-y += vfio-mdev/ From patchwork Sat Apr 27 03:33:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162986 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1470530jan; Fri, 26 Apr 2019 20:33:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqycGJaJ95Z7JSWovwrRus5ajxw7yjcSsEnXQ9qr/wuiDT5c7/pECLefWMFBWTDoaIGCLSid X-Received: by 2002:a17:902:1602:: with SMTP id g2mr49677729plg.325.1556336039548; Fri, 26 Apr 2019 20:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556336039; cv=none; d=google.com; s=arc-20160816; b=uoSWcVShHEQsS99oKlGOl3QaFOZneBMStFRvDxVCPUM6alzM2DJ0hsm3WgdfN1HvE+ ipoawRWpP6iNtkjA4jn9myBE0w4JLNUpq4/5TtRN42VddKF3eQhQlE8bVUJCsMTLQd4v VQf4LcutXY225hB4lrdixQK8p4366lqlQMrUehEz/mOW9PQ3entjWpcdytien+Y1mHe3 qjR8HR8RLMH4fi8D9fSvbEZ6Z2H+19hSmBWdARRNitB4lwRkeA5f0hNUtBC6b5VCfWVI JAPHZ518Bx1h1UL0z5WTs0nJ4eM7KNe0Xj8lX05/HRmSBUN3EiUvlq54T9jakaZ3Wfdg HAkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=ZIKJFBEyh/OSHngEXiMX/2USDQxITyIVb8NQIStI1H4=; b=1CKRJYqQfbSshVSG74nCBVqwllimHTEchXUA0B/MEA1Bwt1ROjlbGOBkt3gBrAJX9x 6d7caHjBPXXFZ0vOdmaMW7SlHVnRdmTckHJ3oUNYu3dy8kQyUw/1b3bHaNP4o5t4IH5x ZkvHb7nVEw/AsHIrb+U+zcLf56fvkwptbDHQBGE/TkOm3rAwC9YVCHVAb0o7pwRI3ZhU xN3euH/o/qIsPq5VLJst9ITiQxgIU3ZAO73YK7QZkb1he8HZFKpZb6NUf/anme1Dpw1N k21koSQiHEQLAssQeQvN6bFX4M4mDBFxOwQV6Q/a4RNMzkAsZn23ylYVzMaTJqrKBiKa gBQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=lJXYtboy; 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 v9si25306287pgr.167.2019.04.26.20.33.59; Fri, 26 Apr 2019 20:33:59 -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=lJXYtboy; 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 S1727443AbfD0Dd5 (ORCPT + 30 others); Fri, 26 Apr 2019 23:33:57 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:17155 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727341AbfD0Ddv (ORCPT ); Fri, 26 Apr 2019 23:33:51 -0400 Received: from grover.flets-west.jp (softbank126125154137.bbtec.net [126.125.154.137]) (authenticated) by conuserg-10.nifty.com with ESMTP id x3R3XieA029345; Sat, 27 Apr 2019 12:33:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x3R3XieA029345 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1556336026; bh=ZIKJFBEyh/OSHngEXiMX/2USDQxITyIVb8NQIStI1H4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lJXYtboyPRaPsTlVouC3YTCaJW9WIZn/OvfH4o7hFPhCqMfDfA3ZEEXSJX3fnfWKv 8FnM0fKlSfNeGLsZJ64qd9Vq+vqxFCznxvshXEeXN2zBQ2ytw8VC7JNVqh54V37tLm 9CSjd5goq6so+qOS8/Mu+qdMYT1Jmg0lRyanaCMc0qiDvmNSdGZIK6nWM/ORZrwplk gu7mwJTAiKOgVVC+vlxjqI1S0dBy1D1AgbwzmtQ6JsSz7GgjOvWoFs0k3Rqy552PiJ rq9p1RWLcBDrTM5Dn0i6VwUDCfbQDhha2KCmf1Z2bdWMJY92IersWs4mntoHKRDrwM IpYZJWX8DX20Q== X-Nifty-SrcIP: [126.125.154.137] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 4/5] samples: seccomp: turn CONFIG_SAMPLE_SECCOMP into a bool option Date: Sat, 27 Apr 2019 12:33:39 +0900 Message-Id: <1556336020-15634-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556336020-15634-1-git-send-email-yamada.masahiro@socionext.com> References: <1556336020-15634-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The prompt of CONFIG_SAMPLE_SECCOMP claims this is "loadable module only", which is invalid. samples/seccomp/ only contains host programs, so having it tristate is pointless. Signed-off-by: Masahiro Yamada --- samples/Kconfig | 4 ++-- samples/seccomp/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/samples/Kconfig b/samples/Kconfig index d19754c..b98a763 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -103,8 +103,8 @@ config SAMPLE_CONNECTOR See also Documentation/connector/connector.txt config SAMPLE_SECCOMP - tristate "Build seccomp sample code -- loadable modules only" - depends on SECCOMP_FILTER && m + bool "Build seccomp sample code" + depends on SECCOMP_FILTER help Build samples of seccomp filters using various methods of BPF filter construction. diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile index fb43a81..00e0b5e 100644 --- a/samples/seccomp/Makefile +++ b/samples/seccomp/Makefile @@ -40,5 +40,5 @@ HOSTLDLIBS_bpf-fancy += $(MFLAG) HOSTLDLIBS_dropper += $(MFLAG) HOSTLDLIBS_user-trap += $(MFLAG) endif -always := $(hostprogs-m) +always := $(hostprogs-y) endif From patchwork Sat Apr 27 03:33:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162985 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1470527jan; Fri, 26 Apr 2019 20:33:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzENX6KWQ24L7w8PneSJC/Kq87L9dNt5R8L7aSM/icQ4IeiY2E+WMpftFymwqGh9EqlxRw X-Received: by 2002:a65:5049:: with SMTP id k9mr45752420pgo.229.1556336039176; Fri, 26 Apr 2019 20:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556336039; cv=none; d=google.com; s=arc-20160816; b=YXVRujtnep1OtNFE2Ven1BK6J1nbAWn3DRZPVv6pS9SOwF8QkhwsiGxqwtx2ymFkH+ UprhVbZduqIy4PDG1ffib0KBTtbq4dtE3gihjfeT8+L/gfqMw0IT3WI/FS90vSn6UXx/ 51KmcWPaDzKCGtbN7iF1u0JGOBobrP3T5M7CqipTUyVzkGyraQcpQxdxfyjBLp1mgt0e VxJ50OOjC3zF7iHeWbkVzYnYWJ9qqQ7iyVmPCs35+VDY6f8KhjIE4P/cCmXCm9UxWfLZ jSh3CQbFtRdryAe1sNBOMWbGJ2g9LD88it32fGnDaur6qY9INIbWLcS4assF7wp8Y2ny 5V9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=Lp3Gmg6qyYoJ/Ao3+VN9R6sCvvcCE+oPZMkiRMOz9Fg=; b=DK/6rf3b3woDhejMN7TCdWCY0O/OmvwXuTdT3rBNDsEbOpqBH5H6QZoXZVxN7OUPJD J8WUHC1A3R/5h8STOAxAKc/y9HDZjbmHyjbF3CI43cWzH3UvNP8sqP9wlmJJYEzGKtCD /tBUVi8d8KkE0tue9pgk+TObSGc0UYQbpfgoJQjbEEeMUq3XIzEnHlypBerARw3VevMi l2wz4wMkFl6fUsDFgEhtQ3HHRr91nnmzdCyVd/31mxlXYQ1XFJBesCfJ1FqH6flylvni l6LMZIXBNZctzqjG8X02heIxS8OJcR7GaYbs3DqIlGdf+w/k8N8qW2phN1KWWRjG+YpC +IlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zOZSCXYf; 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 v9si25306287pgr.167.2019.04.26.20.33.58; Fri, 26 Apr 2019 20:33:59 -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=zOZSCXYf; 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 S1727403AbfD0Ddv (ORCPT + 30 others); Fri, 26 Apr 2019 23:33:51 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:17159 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727333AbfD0Ddv (ORCPT ); Fri, 26 Apr 2019 23:33:51 -0400 Received: from grover.flets-west.jp (softbank126125154137.bbtec.net [126.125.154.137]) (authenticated) by conuserg-10.nifty.com with ESMTP id x3R3XieB029345; Sat, 27 Apr 2019 12:33:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x3R3XieB029345 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1556336026; bh=Lp3Gmg6qyYoJ/Ao3+VN9R6sCvvcCE+oPZMkiRMOz9Fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zOZSCXYfGx6pHD3NFafX2uMdIOT7CxsicDg/SHVioY/XHQ6+kk+yAl1aQIyTthnO+ 2EwvYORXo1SQ/LcgVoh73PokeUES7b9iLEKxk8IBqtFMuYbOMAB1wBeaOqpWF8FO16 CabY9I82dOr/EsH1pxxL8fT6cZKfDTCeCrwZaeLRJkyLwtIQMbJlPecjcLAQ+t4Z8D fvEYQAPWb+AYTfcgiAiCQphmO7QOr+RkABNlQCg2XAcnjU/IrcGmUrPrF1dhMH9GHi 5hmgh+WKQ/sP0+Lb5x4CCwC8ts+BxaeOrMO6w0sgTPtUCiCGhmMC5jFgRQ6b1VDd0C 6fH9vC7xcDbog== X-Nifty-SrcIP: [126.125.154.137] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 5/5] samples: kobject: allow CONFIG_SAMPLE_KOBJECT to become y Date: Sat, 27 Apr 2019 12:33:40 +0900 Message-Id: <1556336020-15634-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556336020-15634-1-git-send-email-yamada.masahiro@socionext.com> References: <1556336020-15634-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This sample works well as builtin. Signed-off-by: Masahiro Yamada --- samples/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.7.4 diff --git a/samples/Kconfig b/samples/Kconfig index b98a763..399ae53 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -20,8 +20,7 @@ config SAMPLE_TRACE_PRINTK test various trace_printk() calls from a module. config SAMPLE_KOBJECT - tristate "Build kobject examples -- loadable modules only" - depends on m + tristate "Build kobject examples" help This config option will allow you to build a number of different kobject sample modules showing how to use kobjects,