Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5837405imu; Mon, 26 Nov 2018 05:56:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/VX6qqHTZ21hd0PgLLdXD6TIUCgG7L1X3P2s/WBEP+pEAQcNmpLVlXiAVgGo+7SQNkahA2Z X-Received: by 2002:a17:902:6b83:: with SMTP id p3mr8092548plk.118.1543240598503; Mon, 26 Nov 2018 05:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543240598; cv=none; d=google.com; s=arc-20160816; b=bcpDuxVRm/s/uwigL+hYZIltb61lFRIYzjF/F7iBNRQbkj31dR3qOom30Ddnhn434W HL+FdWHRn6P8Fmj6QhuE7QiVKZpiO8ErcrmEJ1POFCLDt/HwR+edp8hWzYciSyJuFbjc dlqJ0cnVP8ieixYUZHrsiEWI1i/9N6UgNPiCx41zG9VCXC+4SmRxvtO6L1TeIgddzFeh LBW3NvyxKozpjnD/rnUt6Gb4HhVSeBds6Zh6Am210IGS8L8DAVcOZjjZ8AWooIlVOu3e NY9Hy+34o4Ki7K/Ey83CaLna//mdmbTXo7pg+VwYbOD1pQB4ZhFqvp2NZVuTqteBKvXw cAoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=FqwGGu8Uauynibny9e4RGH1TW25GGhA7x7UrVndh7so=; b=d74NJ6CgodUeDIhadGAxU2hq/7+80cjTOX5/Z0mdKSVry6Xr/xcppvUIa4gQlx7n1Y EpYkTKy8gXuhuIcWpJWbTEE5PlrDoMVf7Xox2v8RF7LT+r1UXVzFxXe38YLkhMXqkrtW ZIfh0I5FhHthtLVpvuRKC0sMRqrxgwwvQghggw0edgNRAkOHdAHGoEnfE47VaE1VPvIC YTd478ehuj1YmWZJrDk8Bluzc6wq0aOQAb8vu5c/WG4QXAmAP5XwF+6hRN5Wcvy8eUnO 9VcQn/Ye9BFVstCnxT3RekA4DSzwKPTR02i6Hc9IFPdd5elH9c24xrvlfDC4fBOKcFYm 2ERw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si317014pgh.496.2018.11.26.05.56.01; Mon, 26 Nov 2018 05:56:38 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726410AbeK0AtX (ORCPT + 99 others); Mon, 26 Nov 2018 19:49:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53532 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726201AbeK0AtW (ORCPT ); Mon, 26 Nov 2018 19:49:22 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0CD1FC049583; Mon, 26 Nov 2018 13:55:10 +0000 (UTC) Received: from treble.redhat.com (ovpn-121-105.rdu2.redhat.com [10.10.121.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id E9AE21A926; Mon, 26 Nov 2018 13:55:07 +0000 (UTC) From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel , Andy Lutomirski , Steven Rostedt , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Linus Torvalds , Masami Hiramatsu , Jason Baron , Jiri Kosina , David Laight , Borislav Petkov , Julia Cartwright , Jessica Yu , "H. Peter Anvin" Subject: [PATCH v2 1/4] compiler.h: Make __ADDRESSABLE() symbol truly unique Date: Mon, 26 Nov 2018 07:54:57 -0600 Message-Id: <0d708fd0a7d860766f027d8c07e9d97d52d997bf.1543200841.git.jpoimboe@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 26 Nov 2018 13:55:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The __ADDRESSABLE() macro uses the __LINE__ macro to create a temporary symbol which has a unique name. However, if the macro is used multiple times from within another macro, the line number will always be the same, resulting in duplicate symbols. Make the temporary symbols truly unique by using __UNIQUE_ID instead of __LINE__. Signed-off-by: Josh Poimboeuf --- include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 06396c1cf127..4bb73fd918b5 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -282,7 +282,7 @@ unsigned long read_word_at_a_time(const void *addr) */ #define __ADDRESSABLE(sym) \ static void * __section(".discard.addressable") __used \ - __PASTE(__addressable_##sym, __LINE__) = (void *)&sym; + __UNIQUE_ID(__addressable_##sym) = (void *)&sym; /** * offset_to_ptr - convert a relative memory offset to an absolute pointer -- 2.17.2