Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4010748ybg; Tue, 29 Oct 2019 00:23:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqywK7jQnHlyb/TX5IQKUcF5ylVI9x3yPUa8ofSHywxzV6K/+V/h32s0uvc+G0fh7HhahBkK X-Received: by 2002:a17:906:86c2:: with SMTP id j2mr1774793ejy.198.1572333836391; Tue, 29 Oct 2019 00:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572333836; cv=none; d=google.com; s=arc-20160816; b=NyfK/YOA+ArAAUGF68CkC+M6CdmLM/eoodAMXT9Vj4M6VqGCiBaGC26hurVmO/WkC9 hn+m9kQIKy75Dzsq7nLHI+867v33JIPJZLcVYIE4wlnCFbTLZLSsRtRKsqIDLLfd8HFN vKBd06/haTWJ0qRQgWMHdPQcyPBZXBypZ9oxGfHfTGX43rTacuFEahVkDy7G6DNYRqAD +0heI3Hgvr5EXVpvPUY3Vdc6NnPV0uAMrFmpJRNTF6dzo/FGGGrGOnzRQ5EXliMKD2z2 HhglfDRib68x1TmUExqdkrzFv+V/liOYwB7R9JqKD5SZqidHxhcLWmDnc84mxl4SqKBF yo8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=3Vd0JoyK9vjaMDPiEfIcd0bq4Da/dDRQVJRkigVYHx8=; b=ny54jbiycUUtD4wkkDbDL1TOGKmpUkcojQYYvrWvAZ42afc2V7ZU1WAhFzAV6Cb/AC VGS2q2jgmwC91N0imCzHM9e5tNIkFgTyhzP8+st7nD7+IyhA0Ia+jvfzZUmLfJMOUiPx 15FeecvHsCFI0jiYcOyyXDpbSBjDVbSH8VzaKkhoXt7ex8noKiKWin1bRZ9614uucCCP NXuNepWNguxHdh761Aog8aD4BVsCxWvAcuWq7Bg8KDk16adhL1iAIrtG8j0A5S9Me+Hi gwho5E4BAyzMQ4UUrm8ps+npdUf7utGRaGg2KWMEZ17PMZocdwQmjx8DSOZb5YP8hFrm iauw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@plus.com header.s=042019 header.b=GpkkkMh7; 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 y51si5825652edb.29.2019.10.29.00.23.32; Tue, 29 Oct 2019 00:23:56 -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=@plus.com header.s=042019 header.b=GpkkkMh7; 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 S1728975AbfJ2Cqg (ORCPT + 99 others); Mon, 28 Oct 2019 22:46:36 -0400 Received: from avasout03.plus.net ([84.93.230.244]:52098 "EHLO avasout03.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727987AbfJ2Cqg (ORCPT ); Mon, 28 Oct 2019 22:46:36 -0400 X-Greylist: delayed 451 seconds by postgrey-1.27 at vger.kernel.org; Mon, 28 Oct 2019 22:46:35 EDT Received: from [10.0.2.15] ([146.198.133.39]) by smtp with ESMTPA id PHPLig50ftvkXPHPMiiAfY; Tue, 29 Oct 2019 02:39:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1572316744; bh=3Vd0JoyK9vjaMDPiEfIcd0bq4Da/dDRQVJRkigVYHx8=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=GpkkkMh7LCwSC46u2HgfQp5jLrtQpvnvXOOoPPE85Jgqm00T26JxCjah0K5W5+0rR mJmYjyA4sTgCc4oUlB5Y6OQrl/JTjpeJI7G7LKXlSXy8seGlvmq9c1F8pFEpFb4JON oK1ko7oP1ONYTI7BT0fMScfL9/t7soQGTKDSVZ3lqqaLnLHBUN5Z4pFAYbOivCyF0s 6LQ704/BxQuu/PhnMSOStcStwKiX3nwnJLz8ta2txWo/gCOZV1NxBNQvgFCeSJTuOY qOV+6sR/TTmNGy8kzsJyRwAqLfpLNSpH8jrnw9yzLbZZkWrPp2MSCnqoU6a/KHrshi qWZsebbR10niA== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=ePBtc0h1 c=1 sm=1 tr=0 a=1Jh3712dEPwUcX5EWi7t+w==:117 a=1Jh3712dEPwUcX5EWi7t+w==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=X9G2ohcBEumEKn13xBoA:9 a=DKryddvG6lcVqKu1:21 a=rVP9ElcGolyjnz41:21 a=QEXdDO2ut3YA:10 X-AUTH: ramsayjones@:2500 Subject: Re: [PATCH] compiler*.h: Add '__' prefix and suffix to all __attribute__ #defines To: Luc Van Oostenryck , Joe Perches Cc: Miguel Ojeda , linux-sparse@vger.kernel.org, Andrew Morton , linux-kernel , clang-built-linux References: <7a15bc8ad7437dc3a044a4f9cd283500bd0b5f36.camel@perches.com> <19fd23e98bab65a1ee624445193bd2ed86108881.camel@perches.com> <20191028221523.vlzdk6dkcglxei6v@desk.local> <00c5ef125a4e62f538de7ddddc9d8fe7085794a3.camel@perches.com> <20191028230349.xlhm42ripxktx43y@desk.local> From: Ramsay Jones Message-ID: <61eb73ad-5c30-0005-5031-6584df72ad5f@ramsayjones.plus.com> Date: Tue, 29 Oct 2019 02:38:54 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191028230349.xlhm42ripxktx43y@desk.local> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfEudO0BYFP93zLmnvQvBsw9b3zbvwcui3UWZb2KiDSNITeNhS6viJIKbP91Qo/kw/DOJ7VRNfgQrPIxGeMaQTq4L4vbBys9/54pwW382cEvSzW+QT25o x1FQMt5JjfeNsrPFOLc592T0xL2hh0JH8RC49UNWroumG0PhSTd+x08zwoFlh2nCk9Nmr2HDLTqCcA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/10/2019 23:03, Luc Van Oostenryck wrote: > On Mon, Oct 28, 2019 at 03:28:17PM -0700, Joe Perches wrote: >> On Mon, 2019-10-28 at 23:15 +0100, Luc Van Oostenryck wrote: >>> On Mon, Oct 28, 2019 at 10:59:47AM -0700, Joe Perches wrote: >>>> On Mon, 2019-10-28 at 18:37 +0100, Miguel Ojeda wrote: >>>>> Just in case: for these ones (i.e. __CHECKER__), did you check if >>>>> sparse handles this syntax? (I don't recall myself if it does). >>>>> >>>>> Other than that, thanks for the cleanup too! I can pick it up in the >>>>> the compiler-attributes tree and put it in -next. >>>> >>>> Thanks for asking and no, I did not until just now. >>>> Turns out sparse does _not_ handle these changes and >>>> the checking fails for these ____. >>>> >>>> sparse would have to update parse.c or the __CHECKER__ >>>> changes would need to be reverted. >>>> >>>> Perhaps update parse.c like: >>> >>> ... >>> >>> Yes, this was missing. Thanks. >>> Can I have your SoB for this? >> >> I'm not sure this actually works as there's >> some possible sparse parsing changes in the >> use of __context__. > > Yes, indeed. The following shoud be squashed on top of > your patch (not tested yet on linux side): > > -- Luc > > diff --git a/parse.c b/parse.c > index 4464e2667..4b0a1566c 100644 > --- a/parse.c > +++ b/parse.c > @@ -345,6 +345,7 @@ static struct symbol_op goto_op = { > > static struct symbol_op __context___op = { > .statement = parse_context_statement, > + .attribute = attribute_context, Hmm, so why is do we have a context_op and a __context___op? > }; > > static struct symbol_op range_op = { > @@ -537,6 +538,7 @@ static struct init_keyword { > { "while", NS_KEYWORD, .op = &while_op }, > { "do", NS_KEYWORD, .op = &do_op }, > { "goto", NS_KEYWORD, .op = &goto_op }, > + { "context", NS_KEYWORD, .op = &context_op }, > { "__context__",NS_KEYWORD, .op = &__context___op }, So, can '__context__' be used in a statement, as well as an attribute, while 'context' can only be used in an attribute? Confused. ATB, Ramsay Jones > { "__range__", NS_KEYWORD, .op = &range_op }, > { "asm", NS_KEYWORD, .op = &asm_op }, > @@ -560,8 +562,6 @@ static struct init_keyword { > { "__bitwise__",NS_KEYWORD, MOD_BITWISE, .op = &attr_bitwise_op }, > { "address_space",NS_KEYWORD, .op = &address_space_op }, > { "__address_space__",NS_KEYWORD, .op = &address_space_op }, > - { "context", NS_KEYWORD, .op = &context_op }, > - { "__context__",NS_KEYWORD, .op = &context_op }, > { "designated_init", NS_KEYWORD, .op = &designated_init_op }, > { "__designated_init__", NS_KEYWORD, .op = &designated_init_op }, > { "transparent_union", NS_KEYWORD, .op = &transparent_union_op }, >