From patchwork Tue Aug 27 20:39:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 172296 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp6308415ily; Tue, 27 Aug 2019 13:40:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVv4ZSsVl9sZXHbEQ2GVSMx4n7EYseEh4ulkc7Jvw5SoA8uoq0Sg322QHcHKKyTZxVqmVy X-Received: by 2002:a17:90a:f0c9:: with SMTP id fa9mr590888pjb.137.1566938446499; Tue, 27 Aug 2019 13:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566938446; cv=none; d=google.com; s=arc-20160816; b=tCRykB4opntytec4U2aaAfWrdXHOLXJeDBOX6pnYugjs9eGoK/rigsfhdOWEdFakU9 v4234souAQdIIiR9w9mRjIny+TYi255Hqmvs/WNORJBDrlD19mpkUgUMHPs6A1moC0cA GsRou+M6L+nTQNvYqetl9JB2cM8sLPfjqhfGgKEP1m3KiFGJcTdpu6HWNYfCg7kzYTHl RG62DbU0G7iaBCC9Y7CHrcZC6S0yAn1hCm68iRuwMkK6mbb3I4L2wXwXnBDKcr/vBPzf us3GkEfRn7Hwwqc1wQTPQBLkAdwc5/MPUDA23PAPkv27/4Ef5nyKcr6dQowoAOqrPM9j hl6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=tH7yiZ4DL/IkimFAxsXUYbqZ+IlrPZSmhVaW+hn/z/8=; b=H5WYPoWs9EGXjBhgPxpmDK1nbHu3KOURASjVcaFwoEs30QqSlYV+d50PQe/8UvlmkT Xnk+zJ+PB631K7LVQ8uZGsf5EE36QH4ztZYmi8wXWtYwU3pGjZhr90rRw7yqUmh4NJlX 0HfRox4U9XuHmkoGa9VjyV/7pjlxk2jt4QRHw/pkfmNzEbddXB/qIzlGeNbne4aqPeFw 6/N6RBmEUHZuJ6tf5L9APGHN5q2ZSLO7yARGXSikgB8PBuc2GnBNu3kfJCLtOBzowqdg Wdpn+mDY9oNjd7mtZfj40morncLwj8XhAP9YzfXfbG+YZ5zZy5NOyS1P3YV8ei/q1ThH pqFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=n0LdiSdO; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si339627pgy.255.2019.08.27.13.40.45; Tue, 27 Aug 2019 13:40:46 -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=@google.com header.s=20161025 header.b=n0LdiSdO; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730674AbfH0Uko (ORCPT + 28 others); Tue, 27 Aug 2019 16:40:44 -0400 Received: from mail-qt1-f202.google.com ([209.85.160.202]:55802 "EHLO mail-qt1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730221AbfH0Ukn (ORCPT ); Tue, 27 Aug 2019 16:40:43 -0400 Received: by mail-qt1-f202.google.com with SMTP id z93so129721qtc.22 for ; Tue, 27 Aug 2019 13:40:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=tH7yiZ4DL/IkimFAxsXUYbqZ+IlrPZSmhVaW+hn/z/8=; b=n0LdiSdOzXuRJngcIMltgwmxzEdvOm/U2iaaJkJ5SMyebx7xgAPC0fWRUGoaPlgEDm i2Kq7YcvAIGN+5tZsRlDY7cKjJz0WNsjEZrj1G4PT5xk9M9urqOw/otYjBC1XO4LFkKF 6BVIAhu27ZTRv5fu9QWEkkLqlSFbBSKXJhno3wD+XQvnW7oduaHsf7AxHJjI5zoue+CU kqp6BK40i8JQOEqSbp72KhHSCfJwrlweqQyf1rFOGeeEKZn7nHPE+ykpQ8cVpru4Tpn9 i41OZfOBoEZH0a/ZbskqZJf4yazbh71/OPAPdM9voiUphvh7/Xt5YjE2JDzhEGBgCTnX 6+uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=tH7yiZ4DL/IkimFAxsXUYbqZ+IlrPZSmhVaW+hn/z/8=; b=QUV62n4HEuQ2zZT2IR83HE7rS4H8atnzwadn8mGdx7bs/GrPwphrABwBNEXJy0ZVcV KRMcMMtceXi9tJ6F7+UgKSuXy2489DYbLK2FupGgry55I/+lZ1/6aRO5l9Fjzmuii97T 1SsjdzWXHKxWFs4usVoFDx9Di+2JE6kmyUwIushM+RqV/97t27WpjgLhF3WtsM996dfc Or4W++VyUcufOL5y6jAfIiIulHcot7mgEtwqhopg0x7zs1rIdtq1MkDW/NBhxSBpOj2Q Jo7WJXwtmFhh80PCUyNQthWRzx/fDiHRtRFBwoszNIAcyZwNkt6+BHsY0cxgCXW+2+vx gNKg== X-Gm-Message-State: APjAAAVt22liz0dPvfpMPVhUippfAvZpiHbPIKeX1exYMhsQZzCMmJ+K iBZ+4ouaKNsAIKBxTdPKtSQN5Qfr/xixOiZ0Cew= X-Received: by 2002:a05:6214:10e1:: with SMTP id q1mr461176qvt.148.1566938442229; Tue, 27 Aug 2019 13:40:42 -0700 (PDT) Date: Tue, 27 Aug 2019 13:39:58 -0700 In-Reply-To: <20190827204007.201890-1-ndesaulniers@google.com> Message-Id: <20190827204007.201890-6-ndesaulniers@google.com> Mime-Version: 1.0 References: <20190827204007.201890-1-ndesaulniers@google.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog Subject: [PATCH v2 05/14] ia64: prefer __section from compiler_attributes.h From: Nick Desaulniers To: miguel.ojeda.sandonis@gmail.com Cc: sedat.dilek@gmail.com, will@kernel.org, jpoimboe@redhat.com, naveen.n.rao@linux.vnet.ibm.com, davem@davemloft.net, paul.burton@mips.com, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, Nick Desaulniers Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GCC unescapes escaped string section names while Clang does not. Because __section uses the `#` stringification operator for the section name, it doesn't need to be escaped. Instead, we should: 1. Prefer __section(.section_name_no_quotes). 2. Only use __attribute__((__section(".section"))) when creating the section name via C preprocessor (see the definition of __define_initcall in arch/um/include/shared/init.h). This antipattern was found with: $ grep -e __section\(\" -e __section__\(\" -r See the discussions in: Link: https://bugs.llvm.org/show_bug.cgi?id=42950 Link: https://marc.info/?l=linux-netdev&m=156412960619946&w=2 Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers --- arch/ia64/include/asm/cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.23.0.187.g17f5b7556c-goog diff --git a/arch/ia64/include/asm/cache.h b/arch/ia64/include/asm/cache.h index 4eb6f742d14f..7decf91ca11a 100644 --- a/arch/ia64/include/asm/cache.h +++ b/arch/ia64/include/asm/cache.h @@ -25,6 +25,6 @@ # define SMP_CACHE_BYTES (1 << 3) #endif -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(.data..read_mostly) #endif /* _ASM_IA64_CACHE_H */