From patchwork Tue Aug 27 20:39:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 172294 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp6308260ily; Tue, 27 Aug 2019 13:40:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyd3y4M3EL9+GMOOqboFUzcNtokUK2msBuDfpSgUY8Q8rak+MK1W5dR3dWAQFaVDDiryBYb X-Received: by 2002:a17:90a:234f:: with SMTP id f73mr642437pje.130.1566938438334; Tue, 27 Aug 2019 13:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566938438; cv=none; d=google.com; s=arc-20160816; b=TFx6hqXpNlvFVOEb7pmORLIaUYS1dfblx2qhOpCqvJmD7Eo2EnG9Bg+jDKYVbLAS2X WXAL+Fl6vzu9nutMdWtvyYGW2WWJ+Nfm7oaxEeJLi4mj2bDE4hop2IbgIkewKy5V80Ta OJ2CKhgpDBF1Fwgj8H2I7PyEQ9ZRXJr5Bu0jvLch9NeG9GntI210/PoPEZcPCtWfbxnO WiC7zgU2W5WB4kP5ZVbs/nkoDSWo+3I/Breb/ouVOgmSjT+GkguSOF0OE8WST+BBLKEA q7p9+17ksngQfHbFAAAHJGDCpsNV7tiQl9t/jK8Ti95fDePBhE32pVPcrGOC9VXV4v1a AgLA== 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=pMRR3udv7zUt55udgy/JnJSChNtnGj7LBE8r938k6XI=; b=rb1MdIG75r6UmSl8q9b6xw1qOBcajo/SElIMUs92JO1DMiiDJ/TBk8753eq30YVeVj xuoEmG0PpZ846RJwKTn8NkmI9EmU3RYMWhSoukq1UzfPmdPJELmJAZMdZ08TBAfJuJTf niwiRCEyIy6ebrq09jaTx1/12TAaTvDleU7PaAv144hZbdBWXcO+Ib6UsFRll+bBEe1b hpyRr1eP1y2n+IzGWBwiXLEjr36Hn5PITCcFZjKVsWFpS+sctUC8MkBruO1U/vJozeXW J0OsFd0HRmxIW2VT2zih0JtyehvBqfY20IwdM9sOue5rWgMDI5kvxf9sMPDgoKaepALc 5oMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=udtjEyCD; 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 q24si124056pls.7.2019.08.27.13.40.38; Tue, 27 Aug 2019 13:40:38 -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=udtjEyCD; 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 S1730622AbfH0Ukh (ORCPT + 28 others); Tue, 27 Aug 2019 16:40:37 -0400 Received: from mail-pl1-f201.google.com ([209.85.214.201]:45204 "EHLO mail-pl1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730523AbfH0Ukg (ORCPT ); Tue, 27 Aug 2019 16:40:36 -0400 Received: by mail-pl1-f201.google.com with SMTP id c14so197621plo.12 for ; Tue, 27 Aug 2019 13:40:35 -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=pMRR3udv7zUt55udgy/JnJSChNtnGj7LBE8r938k6XI=; b=udtjEyCDVwYq/FK3kBeTb3nH8Aa7vL9kuHCFwllx1BaX/30WXSHx6kZYDXQ7Q+voCO cK/gu8GvhtQ36YbkCBbyMFDS1/DLu+qYijMvJFH5APSWGaS9EoRiWUmfTTs102uoutds WrWXfIy8nJf3Io7Dsmrfo+DF6TzSDatNANOWeaTRc/PeYESbP6O8Q+9MAl2oE+eUuyDM WLi/k40Mz/YxM3rUzFk/5JdQBAbl2nlbxiaysh8/ku9XqHmQQbMIxCss2j9KNXL3dwjt nwDrCze8E57svT2Qpwd05NkuaR8T0Wd8XQuXchUbZ/yUTKgxjwXeph5z5nP+k6Akieyr Ot6w== 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=pMRR3udv7zUt55udgy/JnJSChNtnGj7LBE8r938k6XI=; b=pM64XVsj4hCueTErparp360gQ0EjOajShVPzIeUcmjt5RHkF2szFPFS88mX9hj2GiB g4G8eMH7maCwFwWzuUDz4AIFURbUBaP4uIXHvifnKfVP/AsB3lwKb4vBPCR0/wTTjoCX rvOU7iZAR5SlhWysfsm1yNkbt7zghaUvFYxUT+XCuJE3743uqC39P+m+3tPJJj6JWtzp nwghEYHzOXXcQM9HVmWYtWDFN7AJ8F5sUdxIATqbpNx4IxQX61geASyqQf1sQDa0zegn 15Mclag2qHXde/aGYxPEQ48eBggUeYPatO29ZfXkoyjfoVaC+ia/oYxvAc4vEu7krxtW SgDg== X-Gm-Message-State: APjAAAVO/pG7nSavXQw6/qSXKbPOeV/8Ey0/t0Je1QWclyM+H6f2nXBl osfZKROBaIvoSG7tk0/b6d6kvSJO+/hL0VyfoWY= X-Received: by 2002:a65:6152:: with SMTP id o18mr255957pgv.279.1566938435091; Tue, 27 Aug 2019 13:40:35 -0700 (PDT) Date: Tue, 27 Aug 2019 13:39:56 -0700 In-Reply-To: <20190827204007.201890-1-ndesaulniers@google.com> Message-Id: <20190827204007.201890-4-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 03/14] parisc: 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/parisc/include/asm/cache.h | 2 +- arch/parisc/include/asm/ldcw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.23.0.187.g17f5b7556c-goog diff --git a/arch/parisc/include/asm/cache.h b/arch/parisc/include/asm/cache.h index 73ca89a47f49..e5de3f897633 100644 --- a/arch/parisc/include/asm/cache.h +++ b/arch/parisc/include/asm/cache.h @@ -22,7 +22,7 @@ #define ARCH_DMA_MINALIGN L1_CACHE_BYTES -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(.data..read_mostly) void parisc_cache_init(void); /* initializes cache-flushing */ void disable_sr_hashing_asm(int); /* low level support for above */ diff --git a/arch/parisc/include/asm/ldcw.h b/arch/parisc/include/asm/ldcw.h index 3eb4bfc1fb36..e080143e79a3 100644 --- a/arch/parisc/include/asm/ldcw.h +++ b/arch/parisc/include/asm/ldcw.h @@ -52,7 +52,7 @@ }) #ifdef CONFIG_SMP -# define __lock_aligned __attribute__((__section__(".data..lock_aligned"))) +# define __lock_aligned __section(.data..lock_aligned) #endif #endif /* __PARISC_LDCW_H */