Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2024479rwe; Fri, 2 Sep 2022 07:30:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR6HKMHWcRQUz/NeFwc2yuCTHhmYYA9ksENmjzv5eZO4JWHM/q5B+xMjw0HKw3et0KeTHsAz X-Received: by 2002:a05:6402:190d:b0:447:ed22:84eb with SMTP id e13-20020a056402190d00b00447ed2284ebmr29407609edz.379.1662129018826; Fri, 02 Sep 2022 07:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662129018; cv=none; d=google.com; s=arc-20160816; b=IgbHIpyhHSrruElUDlofAbMCj6RVsztFdOiOfE00syTVH26WKwq+PXW0XC86h25nQ9 YLzJprbFO8JsfcMzkGywRbNr/91e1aWZDgSpFWozD+bBLmo2aX9CKJGrBjChJzn0Gn9+ 9Te/F6R7O5oyGMrE/jzYE7D6saEO3faa4oz5Tur9mkUAzVwkK7+wosIWzpY5VSQVUAcW TcyxPiuMfQazc1bi1PDFLZB4PdhgcinxDZeRV3E6/Ip8VHkV44Q3PUbKM17gM2JxLPOT bjGmQME3DtQsKvzpY/DNf/wQKUQvTHR/Zmdrt2m7DEklu++RSGT0Vi1SQy/A/19IXG5O gTrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hl8MuZM85FEMIjKsUtdSwqAsWffS1QXr/qbXadIrU+k=; b=RbWGh1Qc1zebEm7Nzz0aCjA9xoaQaPgFvV9TvwRuE3o8JIcSCGK42S8RVA9Imtda7W 4Kf/IzS0W/6tU8eQE6n1hApMzaCSqHaYEdZIFhZnqSu41XLEeHCa877AvF49rUz9h5Rs 8VziNTFJLqsyDjfaN1+Lm9YaBHT1zW1AXowyWl6cK0Su/umAcWi40DsaCtqCHEvPp2hN Jr5YkCtCJ9qEtsbkLeN92QkifsbgMawCM6N/TB7RTWC9FbrvlvYABItUiuFCeWrZQJGv xtJENwBbx19nz6+rQ90OTutVfxJwJYySXuEjERdzD3mpUsaMxL3l1W3IVztKHZUdb6Z2 9Vxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EIqPI+8+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp19-20020a1709073e1300b0073bc83b838bsi2015197ejc.281.2022.09.02.07.29.52; Fri, 02 Sep 2022 07:30:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EIqPI+8+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238363AbiIBNxG (ORCPT + 99 others); Fri, 2 Sep 2022 09:53:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236422AbiIBNwg (ORCPT ); Fri, 2 Sep 2022 09:52:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BDB82B250; Fri, 2 Sep 2022 06:27:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B865F6219D; Fri, 2 Sep 2022 12:31:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90FA5C433D6; Fri, 2 Sep 2022 12:31:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662121906; bh=BCPPt0LOctTxI2SeC9BJPqci9jzrGee47gQKv2P6LsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EIqPI+8+ASgUKw7HehNMaFIt3eXGODUekkoeRzzxD3/VFBhIZ26Skx3gTETqCVAJq BQRrMjA7qG0qqaall+QfgskKLh+KSnKqMYgm5Bb8Or4NKn6K5mgTv0MmhswJTadQh+ iMn9ZLbi1BxC9iqGaL4kguCBHTly6SkzdCM79Ywo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jing Leng , Masahiro Yamada , Nicolas Schier Subject: [PATCH 5.15 24/73] kbuild: Fix include path in scripts/Makefile.modpost Date: Fri, 2 Sep 2022 14:18:48 +0200 Message-Id: <20220902121405.252442864@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220902121404.435662285@linuxfoundation.org> References: <20220902121404.435662285@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jing Leng commit 23a0cb8e3225122496bfa79172005c587c2d64bf upstream. When building an external module, if users don't need to separate the compilation output and source code, they run the following command: "make -C $(LINUX_SRC_DIR) M=$(PWD)". At this point, "$(KBUILD_EXTMOD)" and "$(src)" are the same. If they need to separate them, they run "make -C $(KERNEL_SRC_DIR) O=$(KERNEL_OUT_DIR) M=$(OUT_DIR) src=$(PWD)". Before running the command, they need to copy "Kbuild" or "Makefile" to "$(OUT_DIR)" to prevent compilation failure. So the kernel should change the included path to avoid the copy operation. Signed-off-by: Jing Leng [masahiro: I do not think "M=$(OUT_DIR) src=$(PWD)" is the official way, but this patch is a nice clean up anyway.] Signed-off-by: Masahiro Yamada Signed-off-by: Nicolas Schier Signed-off-by: Greg Kroah-Hartman --- scripts/Makefile.modpost | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -87,8 +87,7 @@ obj := $(KBUILD_EXTMOD) src := $(obj) # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS -include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ - $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) +include $(if $(wildcard $(src)/Kbuild), $(src)/Kbuild, $(src)/Makefile) # modpost option for external modules MODPOST += -e