Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3542602ybg; Mon, 28 Oct 2019 14:39:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwO5VXfWZbDzY6RDQYwry1U7pqtR2tfiFCZS7SF3PZtzEEqIuJj8J4XNt4EiRPgp6ftqdQ+ X-Received: by 2002:aa7:d0c9:: with SMTP id u9mr21437516edo.217.1572298769720; Mon, 28 Oct 2019 14:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572298769; cv=none; d=google.com; s=arc-20160816; b=QFjvaONwJdFJlfqSvp5djwDjCZjdrXA1yrk3Zu8Q3FjBJI29p0ciKm8KqJFWq7X2D4 mki/sWtOn5kEyt9ukO4SfT6PvBAfmITZsyUadiKe1rpz9g1QPrrIJ8PjWR4osxtpdaCF WNG+PWc5LH0KYVk4EGVeYE0rQ3WsHik9qR+swhVthFl9NC17iv4xaDNj9rXNO2G2HUbO pCCu7wWVXzvNxjLcNkyQKkb3D9SyDzl3XVzVZfUDYujZzpNq8Ot2c0Yz6OFDF7frK6Em Dapc/PnvnnXqXkr0ABOKvtwgu5bcJZI0qyH24IuzeR7KNbXYwVPRaYokpO78RybLYXVT WTCg== 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 :in-reply-to:references:mime-version:dkim-signature; bh=VuVinsI/3uiMH/uRjW5JsSQsBaqr+Zj6YBmT9PXcHok=; b=R8pjDnApu3RUm84N+vLDnolLbWrhZg4quCnjtz1rS5ydoi67d66CaPO0QmXxAnwJBb dNCJNJk2pYrAoDeqaEqC9gAiXySUraD4G/IgOOJxM+oQfvSW7co4esWGPT/t0U9iLbuq Kxl5vXFTqhgr3PPqXnGEyMlJuk35e5QIefgP2+x9XipKhA/7I3zeTn5vkQTpYC2n9OA8 8833sTcGTo/Vr31aWcH0agYoDpy0zF3LUrK/KNQ2L46RXV7Yq75GlqBkeCF09ncB7I9+ iM7v8FAIJM2rwo50V7FCaUinYpnNxI0K83GnEY4EdUNFfYcH7M+Ams0JGH35e7OHdft+ nTlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M0PUA4Tj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z33si7465956edz.114.2019.10.28.14.39.05; Mon, 28 Oct 2019 14:39:29 -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=@gmail.com header.s=20161025 header.b=M0PUA4Tj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732124AbfJ1Rha (ORCPT + 99 others); Mon, 28 Oct 2019 13:37:30 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35703 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725773AbfJ1Rha (ORCPT ); Mon, 28 Oct 2019 13:37:30 -0400 Received: by mail-lj1-f195.google.com with SMTP id m7so12287348lji.2 for ; Mon, 28 Oct 2019 10:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VuVinsI/3uiMH/uRjW5JsSQsBaqr+Zj6YBmT9PXcHok=; b=M0PUA4TjthTNgUv3eUuNaVYUk/T4pYaaHUCsnepsfmgtABGSfOWWgsuXT7yhF3AXtr SMuIn+qb+Lp6Ve89dGQ3FAybVuEm/bx3XL7zsAy7L0fJlHaabaUiFoekQkG3Z+2w5ykK j9pnaZ3k/t/8U1IIB5FCGwnQgLzgNTJnaHj4/Mp7fpfkbQpm4XtQUaVhiuYB1VSUcd3m yfRwWw7rn8jJVRgOlrmbWJ07vZtu5j78VARRhdI5ADwJgK7Q+3ixLsxG54xL3wE86d2Q wGKIMlzDtdb7KpSdqHL/lT14gEpKlqc7938aFegcHoMdoDMK3BwjJBuOzcme5Zudn/hW TIyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VuVinsI/3uiMH/uRjW5JsSQsBaqr+Zj6YBmT9PXcHok=; b=jX7Po0I0Kr+DeRrYg4mdapK8hKq8v9Qd1Itg9hUqSwUP8JAdQ5hHIbYkDm0haycqW9 WThGObhGdiqsU4ZggF7NuKBOYRh55OXnJDQv2muZqJiD9NsXpwRSsUZY/5KjAoCrVkp1 nyACdUHlL71dzVzbDBdWXXSi1CRar76DP+DzS0ontOZht1Fn6UxNVhUMt85JMOv6yM2+ 0EbM5qInkGZHTKvR1pTYPOcHfgeNfgJRAQlcdnWlupHC88IJSZSmAPOjj4nxESTR60DB VybHAtrvHru7KAyHf1o7WzxEXzLYBleWr2oBuMmSWyYbhNFyZ9/8sNUyFF9F6nQyMC3X B/Gw== X-Gm-Message-State: APjAAAUQJe6LbTmTFkKfK5aVKKnPXD8v36opQaVhCGJzkJI8Fa7kmRdK Fhka+Q2NRN1SCtb2pmZdeKvdvkwnZNGfUrpUQWaLexxW X-Received: by 2002:a2e:320d:: with SMTP id y13mr7421528ljy.145.1572284248866; Mon, 28 Oct 2019 10:37:28 -0700 (PDT) MIME-Version: 1.0 References: <7a15bc8ad7437dc3a044a4f9cd283500bd0b5f36.camel@perches.com> In-Reply-To: <7a15bc8ad7437dc3a044a4f9cd283500bd0b5f36.camel@perches.com> From: Miguel Ojeda Date: Mon, 28 Oct 2019 18:37:17 +0100 Message-ID: Subject: Re: [PATCH] compiler*.h: Add '__' prefix and suffix to all __attribute__ #defines To: Joe Perches Cc: Andrew Morton , linux-kernel , clang-built-linux 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 On Mon, Oct 28, 2019 at 12:43 PM Joe Perches wrote: > > diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h > index 72393a..b8c2145 100644 > --- a/include/linux/compiler_types.h > +++ b/include/linux/compiler_types.h > @@ -5,27 +5,27 @@ > #ifndef __ASSEMBLY__ > > #ifdef __CHECKER__ > -# define __user __attribute__((noderef, address_space(1))) > -# define __kernel __attribute__((address_space(0))) > -# define __safe __attribute__((safe)) > -# define __force __attribute__((force)) > -# define __nocast __attribute__((nocast)) > -# define __iomem __attribute__((noderef, address_space(2))) > -# define __must_hold(x) __attribute__((context(x,1,1))) > -# define __acquires(x) __attribute__((context(x,0,1))) > -# define __releases(x) __attribute__((context(x,1,0))) > -# define __acquire(x) __context__(x,1) > -# define __release(x) __context__(x,-1) > +# define __user __attribute__((__noderef__, __address_space__(1))) > +# define __kernel __attribute__((__address_space__(0))) > +# define __safe __attribute__((__safe__)) > +# define __force __attribute__((__force__)) > +# define __nocast __attribute__((__nocast__)) > +# define __iomem __attribute__((__noderef__, __address_space__(2))) > +# define __must_hold(x) __attribute__((__context__(x, 1, 1))) > +# define __acquires(x) __attribute__((__context__(x, 0, 1))) > +# define __releases(x) __attribute__((__context__(x, 1, 0))) > +# define __acquire(x) __context__(x, 1) > +# define __release(x) __context__(x, -1) > # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) > -# define __percpu __attribute__((noderef, address_space(3))) > -# define __rcu __attribute__((noderef, address_space(4))) > -# define __private __attribute__((noderef)) > +# define __percpu __attribute__((__noderef__, __address_space__(3))) > +# define __rcu __attribute__((__noderef__, __address_space__(4))) > +# define __private __attribute__((__noderef__)) 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. Cheers, Miguel