From patchwork Wed Jan 10 16:45:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 124123 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5497839qgn; Wed, 10 Jan 2018 08:47:50 -0800 (PST) X-Google-Smtp-Source: ACJfBot9v0rLFcM601Z/rEH9NBhpRHsyJ6W2jDkbhApBMlJAukyQRZsCCtuNUcvG7NeQU2w5SCxT X-Received: by 10.84.211.39 with SMTP id b36mr19888782pli.217.1515602869929; Wed, 10 Jan 2018 08:47:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515602869; cv=none; d=google.com; s=arc-20160816; b=tV961+DGJs88gLAcKjAFJ8lGOXsty0tvb0KOsIEYOvh1M9+5ApeLxQgMfQyFBnHRyR U83qombfWtY2cT5B+mD9T2FtFNyc3Hw1qz/iTdd/zBvpuk8FcEZWiCgLL+fMx3A2x0kf pXP4rq0Dc3uj0TcgxDWlKirmfZXaAC/xI85NAkUi1h90Z8VaAGV0+ANTcijfYR2uP8Pe U5cMLHL4eU/fZPRfwt+APW5yrb2nqz4oTTu0JytB5vClq5vCVgVZXoH6CqT6GYYD5MDi hrLZkueKkweC/7Vn9nRon/hBWGN/771PjsTyGeVvtpkV20zijxjERKri4wijrNiWwIE3 MRmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=K7rP3U7GfFvccjhMFJRTRL4tPRdlI6R9mTEGC9YY1uA=; b=wuflHvnMFP6k+0ZQc1BTM4t1XTbIbiqpWY4YCHcOS9QsJPLh8YccoFFCiz8l6hnhpp SLRiXUXVXcXFm5JFNNFZhnsv6rK9HCP2/nTHXQSAa3vB23M4nCfE26ZFxCKzbeSaa+FB IJ/BMXdYo8mK1jj+RLYnVAv4LWeHadp/teqiZKm3u4yTiMrrOXqRKZAoPSn32dB2/8A8 yQc9KTP1h+Ly5fYDGI+f4P4iyIEEqRXemyxl7gudP3bnxiM/Oima2P1KcqVpBjV9zrzP rLl6nEB0Mho2hyts9wg1sUvDREEyzGOLje2WWE8s8BErvBnz8TmIkAgy3Xw/n0sBmCpx 0zVw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si7558354pgf.60.2018.01.10.08.47.49; Wed, 10 Jan 2018 08:47:49 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966488AbeAJQrs (ORCPT + 28 others); Wed, 10 Jan 2018 11:47:48 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:59490 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965487AbeAJQrp (ORCPT ); Wed, 10 Jan 2018 11:47:45 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0MXTda-1eKRvp1WX0-00WSxb; Wed, 10 Jan 2018 17:46:19 +0100 From: Arnd Bergmann To: Tony Luck , Borislav Petkov Cc: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Yazen Ghannam , Xunlei Pang , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86: mce: fix type mismatch warning Date: Wed, 10 Jan 2018 17:45:54 +0100 Message-Id: <20180110164616.1465096-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:PfFhJT9tSovnZwks3NPVnwvO0ah/1r72Xa80XlhEcA3iZT/qBaT pendSYHaN0lVAsi3ROTOZNH9smCNvj8UQiIRxBKhj/nNK3uwSAfU+5JdqU92IFu1Wknyo0/ BezFvpxufzgYadouoSY7EThIC4UVHNs/QhzJbpYEAbzmLCsnw3DUaE3cguDiUMiGCVVSS+v GfdGE2heSwO+5rimQ9vaA== X-UI-Out-Filterresults: notjunk:1; V01:K0:+5hedIcdUiU=:1UMEe5P6EK1Jn8veNV3DCB Y6Ip25SCPvpPqdfMyVXiCOAyOV2LuMkolziR+4VrkZjUybt10Irep4cDeFZ/eMMAvT2Dtp2AA PK69n2JUwcmILyxxNoLiCyXz4xdJR+8vANPrKaFqRZMDnMVXfKJ4fr6auiLRaC+VkzJfHrX6Y GWwwKw6a5x8yZpT2HS2H6nv2+qBzI8tGcafDRvHT1zuiU8NErWgcNw7YclgWm9z1caL9Bi2// WjxCsRu2OVnOOovH8p15CWPYgxClykTs2p6Pk3HkF5OzvOa3VFQVIVCAeZD55AtdKGx+SEldT 4jWs4b0Lfw3BslMDOsaO132o2vOFEHB36vYzLiaIP97knxB1IjjbIpjaMTlXp5y+x5MRTNsZ+ g81XVXsULY+ga1X2VYuv2afYR1iowbdwgwlr3MS5lKn69Es3rKPNNHBV4/VeSfs021SpOGo87 sJVW1H7/XqsiqLaY9iengStFBGUjjbOUqvaLVRk7Wil2T96akH2j9RoF72JjbGnc1nhiXX5ln I5okGrbVrj2J3LrFSzGBiWiMh4oBlM7uOkrhIEN8VhiVCh8tAPDdQQpM1N4Za1O1zPyMjk0qy YSnTpNV/+oQ0D8iv4EnNr5LcQPltSyI8Eu9tIIePd9Q4dM6N/ef7dPWb19HRThX9YHD/jqVyc rShmVaxPVyAgR1FDu0wonfgLGB0i3IVS8jnz9KQ/4+gT4z3XtSZy+Eaxv8+fDMPCMZkUjzX0l Hgo2G/59qAyDm+uRadp/Vussx+y8HwGSFheFOQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The printed symbol is a 64-bit address, so we get a warning when building this code for 32-bit kernels: arch/x86/kernel/cpu/mcheck/mce.c: In function '__print_mce': arch/x86/kernel/cpu/mcheck/mce.c:237:21: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] This uses an extra uintptr_t cast to avoid the warning. Fixes: 7b6061627eb8 ("x86: do not use print_symbol()") Signed-off-by: Arnd Bergmann --- arch/x86/kernel/cpu/mcheck/mce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 26ee8c4c9b18..3b2f86c51a98 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -234,7 +234,7 @@ static void __print_mce(struct mce *m) m->cs, m->ip); if (m->cs == __KERNEL_CS) - pr_cont("{%pS}", (void *)m->ip); + pr_cont("{%pS}", (void *)(uintptr_t)m->ip); pr_cont("\n"); }