From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9CE1C433F5 for ; Wed, 15 Sep 2021 03:00:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 56814610E6 for ; Wed, 15 Sep 2021 03:00:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 56814610E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C8F80900002; Tue, 14 Sep 2021 23:00:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C3D436B0072; Tue, 14 Sep 2021 23:00:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2CFF900002; Tue, 14 Sep 2021 23:00:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0106.hostedemail.com [216.40.44.106]) by kanga.kvack.org (Postfix) with ESMTP id A35086B0071 for ; Tue, 14 Sep 2021 23:00:22 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 34DB43A8C6 for ; Wed, 15 Sep 2021 03:00:22 +0000 (UTC) X-FDA: 78588304284.19.6417688 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf23.hostedemail.com (Postfix) with ESMTP id D2F3190000A9 for ; Wed, 15 Sep 2021 03:00:21 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 5B35E6115B; Wed, 15 Sep 2021 03:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631674820; bh=rF1cgOkMET1rIM6rMMdpESe+7st4aaHFxdm5yWI68Zs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=u4IXpGMxoGm4NvcpUe1lstICSKXxZu8NuQ3f7bj9bJ2SystiOAJuJUAqrAum4kGaR z3WAt9P3IjXg7zqjfn77UAIhaV5hoT6qVWvsXJ0MwJIxGmXIL2RtEyCf8UtkOx4RbL 2Fx2aVB/LdbcVOAat6Pz6e+R8FYD08fqsQuvzpcT7lTAqAhdkO33TIbF0jDvx3gVDS kF1nOGE0TPRjwn4nQgp+lOt1DI+rLZJy8+70TCdmA9ANfKWMY2xvxTI+nosASZutfJ YjetClMOUTQR2/JIwb92YcD/McgSNJulIbOZVPiuXWxw7sMv8nCc47T8Nq7jvHE0Kc bXPggH1RzJagA== Date: Wed, 15 Sep 2021 12:00:17 +0900 From: Masami Hiramatsu To: Linus Torvalds Cc: Steven Rostedt , Mike Rapoport , Andrew Morton , LKML , Ingo Molnar , Linux-MM , Vlastimil Babka Subject: Re: [PATCH v2 5/5] tools/bootconfig: Define memblock_free_ptr() to fix build error Message-Id: <20210915120017.a694a43cf7464b4010b39927@kernel.org> In-Reply-To: References: <163166717752.510331.12843735095061762373.stgit@devnote2> <163166721835.510331.4931010992364519157.stgit@devnote2> <20210915104718.135cb7393fb63bd8140105a2@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=u4IXpGMx; spf=pass (imf23.hostedemail.com: domain of mhiramat@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=mhiramat@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Stat-Signature: a6nr4mnszne8pqb54cgzie5pbnbnq3s8 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: D2F3190000A9 X-HE-Tag: 1631674821-872092 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 14 Sep 2021 18:57:34 -0700 Linus Torvalds wrote: > On Tue, Sep 14, 2021 at 6:47 PM Masami Hiramatsu wrote: > > > > Hmm, OK. Let me copy lib/bootconfig.c itself into tools/bootconfig > > as a user-space code. > > Well, or we need to have some really good way to mark these shared files. > > Normally I don't think we share any *.c files with tooling, and > tooling copies over the *.h files it needs. Is this the only one? What I need to share is lib/bootconfig.c and include/linux/bootconfig.h. Those provides bootconfig APIs and parser. But since bootconfig.c uses some kernel APIs, I made wrapper header files. If I can add #ifdefs to split the parser and APIs from those part (as you can see 90% of code doesn't need kernel APIs), I think I don't need any wrappers to include the file (instead of copying bootconfig.c). > So yes, copying the *.c file in this case would match what we do for > the header files, but particularly if there are others, maybe we could > have something like the "uapi" directory that allows people to > explicialy share files with the tools. OK. > But it would need to be very explicit in the pathname, so that people > would have that big warning sign of "hey, now you're editing a file > that is shared with tooling". > > That has worked at least _somewhat_ with include/uapi/ and arch/*/include/uapi/. Hmm, what about lib/uapi/bootconfig.c ? Thank you, > > Linus -- Masami Hiramatsu