From patchwork Wed Aug 28 22:55:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 172494 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1395835ily; Wed, 28 Aug 2019 15:56:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/IY9KclEwpXatn9vT3XAak5fZciqlO12Qpfyf2cFeP06k4HVBvuZHDlH8c9y+e+ce+Me6 X-Received: by 2002:a17:90a:21c1:: with SMTP id q59mr6446911pjc.6.1567032976747; Wed, 28 Aug 2019 15:56:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567032976; cv=none; d=google.com; s=arc-20160816; b=oRzJhYsLtaN1FNU3jk9nJqxyOGkVJ/NxLivUozsJkZ9A0YolvkTj3RvVaw+q5W68bk 10Ad+9gIRMvbUIlPIUceSNRuir4gyOG/rSLcr02KrmjrPmxVOpiyvnP6im5OIex+nwpU ZXCwfl0o0dEM1Rg1yKQht1dyxfcrOGj6DTrH3VojeAsQiDP5IqcfG3LDiaduTZGum1O3 Tb4IDueIx1/Bndns6714cL8TqlVNIzyJpSjkTnK9Khi0dtEmUBNzn9ugfM7ng/7e0yLE 8IiA3DMMTNSZQJLIwu8IQLGHivqivieRsdxijzUQrvGD4cs+2LWypam8HPauvit7zxAU 62TA== 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=2yoc1GXfYVLtZMNWi7ZECLQeadNDjorQFIKFDUAGhfE=; b=Mz+UdvY0uNzYn3ynHAaWGt/nmAQzocjrshgxF9cx8yf5PcZc6gsPAfY9vmKrLlfodm AUwH80S8ZL3BQG2TWmRZ5niovv79heY/zyPE2L8oN6/52AvoUTy9HLLOEjHPVfFg0+8V lgfi3DngONAjysnF8VwSwiFxE3BSF/LrRLhM+oBOzcLcIicU0FviWl5fUIUf0xrPCAc3 lfcEgIZV9v/d91Lijb5/0BEmsjU/DSqbzR24RmMq4Z08pRvtVe9x78wfUGacUDW+ruB4 QU/noYDIPtbHtAcG0I8tyL/6MQbuOrPYlJISpHnn/trnhbrWuGdznYUUUFs44d0Q28Du ZBRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DhOt2NbA; 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 q19si533951pjp.10.2019.08.28.15.56.16; Wed, 28 Aug 2019 15:56:16 -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=DhOt2NbA; 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 S1727314AbfH1W4P (ORCPT + 28 others); Wed, 28 Aug 2019 18:56:15 -0400 Received: from mail-pf1-f202.google.com ([209.85.210.202]:43209 "EHLO mail-pf1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727230AbfH1W4L (ORCPT ); Wed, 28 Aug 2019 18:56:11 -0400 Received: by mail-pf1-f202.google.com with SMTP id q67so857760pfc.10 for ; Wed, 28 Aug 2019 15:56:11 -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=2yoc1GXfYVLtZMNWi7ZECLQeadNDjorQFIKFDUAGhfE=; b=DhOt2NbA0WCkAxiij5rqLx8+s6ImkZreZtvO53khZX4r8LiDrRXEaxcSqPrm+6A/wV RbvCPnS9TMGV9TgeEy/fod0EMRNImTnm+Z8InKr4nZuY9320QraIDLwfG4UeBPkoJrt6 0pFqqxLJ+UKjz/GwCbVbYgV0/aCJLnIOxL26dxi/tGPsNPutnUfdcF5dSm88dTInhfJI WMb1aaZKtKc48GMwRkbk1+xryLFSJ+NDPSaoJ4mUag2RWBqLeeO7m3FK/Vf8NYOSFvmB ozSXrEfdmPCTCafdWg3hEIT3lZosf2QMhxMfyopav00wNN/1TDGLXV7Q5wdCGgLZC4Cc NNOw== 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=2yoc1GXfYVLtZMNWi7ZECLQeadNDjorQFIKFDUAGhfE=; b=lzBlateSzIETjAMrGH1NIrGMvMhZDlnUItHb6NQLfwyHqO9vEYE7Q6isSI++x4A0A+ F6soiXaTSJLKPwCt8zPjzQQ8ojyQt3jqDcP/2WZVQ8WrB3k2QHezHPEuRX1lLdghgDfO DD7ebbDYkWEdDqag9pOmvLCH+8YQlNo5YdEvsF0//Ip9Uk+bm/z3Owo9Hl84ZIi3UfOQ wvo3Y+GrFecOr611WJnQQbwuF/DGdd5932nPINQi2ciV1/T4FIlMaQTyDMhkXoeYD1yE 2oYiWGvg8HPDBGL+1TiJ5ZNfDcpVCxZT/BH1j/LX5G3dyjU/8hQ6TczBlt0KjaNaM0RY +5LQ== X-Gm-Message-State: APjAAAWlwZaRtELOuONtLvHRkhqJcQ+zqp3llIsTFcQd9fTXpZmdDtMt nHBiIrRd2dKjSSHt2UPLUr7XlCr9J2txWNMHpOw= X-Received: by 2002:a65:56c1:: with SMTP id w1mr5392712pgs.395.1567032970530; Wed, 28 Aug 2019 15:56:10 -0700 (PDT) Date: Wed, 28 Aug 2019 15:55:26 -0700 In-Reply-To: <20190828225535.49592-1-ndesaulniers@google.com> Message-Id: <20190828225535.49592-6-ndesaulniers@google.com> Mime-Version: 1.0 References: <20190828225535.49592-1-ndesaulniers@google.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog Subject: [PATCH v3 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 Link: https://github.com/ClangBuiltLinux/linux/issues/619 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 */