Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp7295002imm; Sun, 20 May 2018 23:43:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoCco9GMY92SM3gxlCdYjPyqehQ9O9PB8kFMtS93EGvyaBClsx6EiXaN6b3y25lrvmA6oKp X-Received: by 2002:a62:404f:: with SMTP id n76-v6mr18879166pfa.185.1526884998943; Sun, 20 May 2018 23:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526884998; cv=none; d=google.com; s=arc-20160816; b=EZmjqkzUteYqezsurJBAoptcEOGaFIGhkNIdiw4Ir4960phHQ1aZg79RbeywI4CE6O snQaW6z/wqfwxfdMzWJq73QtE7/uX6eu3XZdWwIm1v/b23WfVfgXFL5gjIDMCpnueA1Q lvAVJbQXwMO6I1jcRdQTQkS0MOPn0LcZnYQe+8ByjsnKuTqsrMNeRPjPwck1q5jXIGG8 +CQTLwFKQHjXZ9IhznU6FsytZ8LfcyUqTo5ytu79hWm+UoLpLtb2vnw2xauj5oawS0EY brU98Yk/GTK4z5AYxRuDEmSIFPYiNo7frTk0ES8S9f1RoSrff2sn7s2K7g6cgGALSY1n pxDw== 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 :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=UUVif08oRLAHnB44QEVRpoo8xm17FL87c3FSVavMInE=; b=oN0LkZs04fv7akT3iEBacEilTeXbtl1wa8WrlEr2W+tI7U7pWKUEdPgJam3JucDE4q weU6h09RN4IjdLmoYYSvoYfcybQpqNLTPUt1gYLA3mvyNPXniFHECahNTZ6o/kZQjqNv /2oUScfg6ye670gHH0pNwM4tBBjDFLJaaaRCRewGRA1/o3N040c/VwrERq/jeTcbWWWM jxt7VtNctdCCHeJvtTGhpWz+A3NJCWplXPqYSkUnKe5fZQPvLtDRd5p5s1ng/ZiOJmQU DXqFHAUgFbkq5OJTrWEzTsiriPDo9iI1IQFT6W+VSonjSKWKgLIIee7YXs+QokrUdUrL MGiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=PPM2LbnZ; 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 d15-v6si14359105pln.533.2018.05.20.23.42.54; Sun, 20 May 2018 23:43:18 -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=PPM2LbnZ; 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 S1751063AbeEUGmo (ORCPT + 99 others); Mon, 21 May 2018 02:42:44 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:38539 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750773AbeEUGml (ORCPT ); Mon, 21 May 2018 02:42:41 -0400 Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com [209.85.217.169]) (authenticated) by conssluserg-01.nifty.com with ESMTP id w4L6ga8o023636; Mon, 21 May 2018 15:42:36 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com w4L6ga8o023636 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1526884957; bh=UUVif08oRLAHnB44QEVRpoo8xm17FL87c3FSVavMInE=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=PPM2LbnZImQU8CWGMBuR2XR5ZasWp0d468b1AX2Hpl/XYsmg3ZwSOX2uBD7nxTz29 fSj2iI5WE9lKZoYeAfIZPDxa+R1XcHFD1teiGSvIVlpNkFldsMFDmDqLrWpxLmeBIY eAZGjfbHDWNX02WHienpwOEE860zF9gHqROy8b8QuXqGitBx7+2EcGJoKyl40I7Na6 KZlynFindOVn+b0/TQvN6jxd27MWkFLiLUU+62O1nEvFNVPp2uQSMiISovpGKABxpI DHA2VOCQ4erKJjEXF5QrGE/MHSj805MkkFDihSm4cwPVWUacLQl1hDItwjqWO0zNiC dUajgmHAQGTDw== X-Nifty-SrcIP: [209.85.217.169] Received: by mail-ua0-f169.google.com with SMTP id i3-v6so9230672uad.4; Sun, 20 May 2018 23:42:36 -0700 (PDT) X-Gm-Message-State: ALKqPwdanxnOgUHBBR5nzMkuztiPT71uVUWG0k6fJDBAElQVqzw8GIid 65WZSxr8/k+NaBg9oLF90gqU2COGSFvKDJkmkMM= X-Received: by 2002:ab0:24a:: with SMTP id 68-v6mr13999508uas.17.1526884955535; Sun, 20 May 2018 23:42:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.85.216 with HTTP; Sun, 20 May 2018 23:41:55 -0700 (PDT) In-Reply-To: <20180521061613.GA21232@ravnborg.org> References: <1526537830-22606-1-git-send-email-yamada.masahiro@socionext.com> <1526537830-22606-8-git-send-email-yamada.masahiro@socionext.com> <20180520145031.GB9826@ravnborg.org> <20180521061613.GA21232@ravnborg.org> From: Masahiro Yamada Date: Mon, 21 May 2018 15:41:55 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 07/31] kconfig: add built-in function support To: Sam Ravnborg Cc: Linux Kbuild mailing list , Linus Torvalds , Ulf Magnusson , "Luis R . Rodriguez" , Linux Kernel Mailing List , Nicholas Piggin , Kees Cook , Emese Revfy , X86 ML 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 Hi Sam, 2018-05-21 15:16 GMT+09:00 Sam Ravnborg : > Hi Masahiro > >> >> + char *(*func)(int argc, char *argv[], int old_argc, char *old_argv[]); >> >> +}; >> > If a typedef was provided for the function then ... >> >> >> Yes, I can do this, >> but I may rather consider to simplify the code. > > Simplify is better. > >> > Will the following be equal: >> > >> > $(foo,abc,$(x),$(y)) >> > $(foo, abc, $(x), $(y)) >> > >> > make is rather annoying as space is significant, but there seems no good reason >> > for kconfig to inheritate this. >> > So unless there are good arguments consider alloing the spaces. >> > If the current implmentation already supports optional spaces then I just missed >> > it whie reviewing. >> >> >> I have been thinking of trimming the leading whitespaces. >> (https://patchwork.kernel.org/patch/10405549/) >> >> This is trade-off vs "how to pass spaces as arguments?" > > Maybe allow strings to be passed enclosed in ""? > Then it is simple to add whitespace. > > But the use of "" should be optional in all other cases. > And the "" should be stripped. > Hmm, your suggestion is more shell-oriented parsing. In Make, there is no concept of quoting because it does not touch single-quote, double-quote, whitespaces etc. at all. $(info "'@@"'' '" ' "' ) will print the message as they are. This simplifies both the grammar and the parser implementation. If we expand the quoting by Kconfig, we need more careful consideration. [1] In the following, would "hello world" be expanded by Kconfig or by shell? $(shell, echo "hello world") [2] Is a quoted comma delimiter or not? $(if,",",$(A)) If remember I first examined shell-oriented expansion, but I stopped. Probably, I found it was much more complex, then I chose Make-like simpler one. -- Best Regards Masahiro Yamada