Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4921529pxk; Wed, 30 Sep 2020 15:41:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykyzFEcDQSUVrq4oLiyi4qMgabkBkLZQlVE6HZFQz6QzelqWqvqooWQpdec7Aa0YX2hOtx X-Received: by 2002:a50:d68a:: with SMTP id r10mr5303127edi.9.1601505708467; Wed, 30 Sep 2020 15:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601505708; cv=none; d=google.com; s=arc-20160816; b=o9tt1AxYtMcybx7JlfesSRXtRrGHjOqcp/Ajyp1tSEIOxt9M2iIain5ZxaVxwPGl5S z5sZIwhocwlK1z7XwMEzhQQvjX32a3y3cDklCuQGJvbnMZMC7SixaamxGWP8xaTHBV/y QrlfujoC48oNSwY+ym3UNJiWHezcmr1vIE08FKUgF3V+/CFt2C6X7T0MDAOBCw0OcQPD 4Gu58pokXeMO6x6SpE1nbRhrPdlndQLKwHYGnwkY4qJML6wkndU73CZUq2wH3zw8jl40 KSqERo6X1nWXJP6M4XG5Y2Y2ibGeM0MPfSxMngtFJDdBsGKjUDtq9ENi3BhJiKVhCI3c CyiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ne0Tvj0LHDNoNtT3tCH3e2zAqdrRlJSiwY/+6OCzSRk=; b=GdhHJ3Of7JMRsoM7Bx9pQ2MGLSjd6FOT9+2ifV/OKl7pzCsArMlVCXkHepZ+AdJndn AyIUH2oz/vQE3GP2YisWIjo2ZCWgi6v6UIKi2nwIbBvdN0PCfCx3uJ6EQmy7MaHekO+0 2gLPKsPiHeeeBbdHUEXzgz6aQR1hsAmK8OZ84N6quoPZR8dcyrmMW/ydd+eW0G2uBXw0 K09bNxZeA0HAn0AyPP3Qf0uyRVnXaC15PLNA2gp4HEkVQE27hGZU00yX3LtqK1uFO0Vg 0lbEBjrEiY9M591rAler6XjWUWlSNESePqaLMyw48aXYn+HaZJJBJ7aay8Qw+R1ksEn1 SbYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kbGgM2Os; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si2244660eje.414.2020.09.30.15.41.26; Wed, 30 Sep 2020 15:41:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kbGgM2Os; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730633AbgI3VlJ (ORCPT + 99 others); Wed, 30 Sep 2020 17:41:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgI3VlI (ORCPT ); Wed, 30 Sep 2020 17:41:08 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3D67C0613D0 for ; Wed, 30 Sep 2020 14:41:06 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id d6so2242588pfn.9 for ; Wed, 30 Sep 2020 14:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ne0Tvj0LHDNoNtT3tCH3e2zAqdrRlJSiwY/+6OCzSRk=; b=kbGgM2Os4lnrxJsMIgRxFQNFc6xu0BbOErzR7ku01j8+p1FHcxDfpz5h9so3n1uMsv 7A9aI6yGddKPtt+1pNiFLdkJ+/xVeKtTMUdAzZc/cy2SfT0SxmKkyZGt+7yB5jd1c0z4 dagyXQLQyS0zenl5ndJttkryDst1MwxCbc20q/3d5JpRkpF1BSPPj++dfYEIg6+DWe9Q K1OiYlbIAA8aXSAGmdNvPBRBXlr9Ta9U60l6z5fRTAVd3ue4cB4lhpKuUBzXYgBcsJCy buhIaN2YbRTp9NQ5R5/pWu+440bd8w1RwQBGQT2w4Cpy3hf2RnXwxa9m8iwMLnmVxfVQ 1l2A== 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=ne0Tvj0LHDNoNtT3tCH3e2zAqdrRlJSiwY/+6OCzSRk=; b=B7gDtu5w2qAsGDdd0abPGTZVUNJkyi7IDD6mU75/Jo2PoOcuyd2LYI9wjTx9kaaU2g Rbct+fJqJNGfeftHUywxTkVoovmo5vt27oMpRTBG2xBoJAzMr665BnOgsQ+9wiXfquAu KRE59xNritRtYM9FvtM8cRm7cvuv510D0HSErtpLv5C5UHVpFQJvUvIVzVd8q5sYSDYI LAme2HE26SqJ/7CDDFxaSf7R0/lol0QzMBjmBCNzR15myF1qmtSceg4tXkMo+5Yz0gDa ZQeO+bghEmf/sQLa9qYdXEPaG92ut0gL8PIPrYfoZVAS0u1dPayp466UfeVz85uWdPi5 zADg== X-Gm-Message-State: AOAM53083g23kwxHKRSh94CVHWHTRunU84a2pmueptmVKvvBTxVgKtUt COOP0FevMmfu0gumAhb6ClBzbO79gyN5UcJBM947mwQasXkmmQ== X-Received: by 2002:a17:902:c40d:b029:d2:93e8:1f4b with SMTP id k13-20020a170902c40db02900d293e81f4bmr4285228plk.29.1601502066090; Wed, 30 Sep 2020 14:41:06 -0700 (PDT) MIME-Version: 1.0 References: <20200929192549.501516-1-ndesaulniers@google.com> <133589afbe999347454dfcc46ae782897bf9e3a2.camel@perches.com> <46f69161e60b802488ba8c8f3f8bbf922aa3b49b.camel@perches.com> In-Reply-To: <46f69161e60b802488ba8c8f3f8bbf922aa3b49b.camel@perches.com> From: Nick Desaulniers Date: Wed, 30 Sep 2020 14:40:54 -0700 Message-ID: Subject: Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo") To: Joe Perches Cc: Sedat Dilek , "Paul E . McKenney" , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Josh Triplett , Kees Cook , LKML , rcu@vger.kernel.org, Clang-Built-Linux ML , Miguel Ojeda , Michael Ellerman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 30, 2020 at 12:16 PM Joe Perches wrote: > > Use a more generic form for __section that requires quotes to avoid > complications with clang and gcc differences. > > Remove the quote operator # from compiler_attributes.h __section macro. > > Convert all unquoted __section(foo) uses to quoted __section("foo"). > Also convert __attribute__((section("foo"))) uses to __section("foo") > even if the __attribute__ has multiple list entry forms. > > Signed-off-by: Joe Perches > --- > > This is the current output from the script against next-20200930 > attached in this link: > > https://lore.kernel.org/lkml/0e582a7f5144a33f465978d97701f9b3dcc377f3.camel@perches.com/ > > It might be useful to run the script immediately before > the next -rc1. $ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 powernv_defconfig $ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 ... arch/powerpc/boot/main.c:193:44: error: expected ';' after top level declarator static char cmdline[BOOT_COMMAND_LINE_SIZE] ^ ; $ git blame arch/powerpc/boot/main.c -L 193 | head -n2 a2dd5da77f2cc arch/powerpc/boot/main.c (Anton Blanchard 2014-04-14 21:54:05 +1000 193) static char cmdline[BOOT_COMMAND_LINE_SIZE] 9d04187c25477 arch/powerpc/boot/main.c (Joe Perches 2020-09-30 12:16:43 -0700 194) __section("__builtin_cmdline"); Looks like arch/powerpc/boot/main.c doesn't include compiler_attributes.h? Preprocessing it doesn't expand __section as expected. I think scripts/Makefile.lib's c_flags injects this via -include flag. (x86_64, arm, and arm64 defconfigs worked fine for me otherwise). https://lore.kernel.org/lkml/46f69161e60b802488ba8c8f3f8bbf922aa3b49b.camel@perches.com/ -- Thanks, ~Nick Desaulniers