Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1964642imm; Fri, 7 Sep 2018 08:46:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbKLAE7VQX2Uyvz+8moPqgFNXAlEQEAcWvc/V5S5sCsSPVVQ35U9k1o+ihBJXWUIAICrWVe X-Received: by 2002:a17:902:7896:: with SMTP id q22-v6mr5777821pll.47.1536335216084; Fri, 07 Sep 2018 08:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536335216; cv=none; d=google.com; s=arc-20160816; b=pY50wV/XYraAP53JnqAsbLqS0oSSv99COIBmfItoKNewTRZHgeDRt3tb183C5L9sQ0 fngXIBD6lAfOe5d/lqmfhgK0JJdtDSF4p2NBmQ/Pwc0JGfiyVd6Uo2+x3GxkAvdM+Zpo kLcb46ea2VJDSyuNth0+LENYDNoYNQXCZ8ybkJdU1ei7yYUtNvbK9Nx180I4vRhlH35r /xI54AlKSdtz8SOnbx0PekeAjdOvUoqCsNSCDdFTqQPND/BbaJuGoGaCxdUGP2Wi4l7p h7K5YgBi7qi3tKACy4jLe4uXRpW/ytLsxSLQTK4Wc48+U4CJ7WUWHnY28Xud5NeMEPPH 6ZzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id; bh=PDVPHbNhHevE3piPpe697rbQjT+LmOsCldEMln6/XG0=; b=z0frTn/vxfEy3fjlrj/CU7xM6EngzKQOXEqcPcbQA1GSYsCCEEWyjZUHTB/+AsTYED z4nDhGPnxssjl+orV/k/l8dWFeaYooDidfGaRLjSWKNxJglZPGmVItLtbgbleM9cF+nK StxTae74Hd7RNFTXJ5Yb15rjx2h7rw3fb7e/A4qMgR3gxQ+dRDvV2Itvex8RUgIft4CB jo9El313fy1uDvP/tVBIRinb93A5wF3atJoWA2X65cGBmIFgWH6otZey+vqIgbDumTIQ HJuPrNbB2c7h6fsV9j4clAVFvx5T2dOpFZQpRYh+f4lx72P1adn3+rL+vFY00QsltZP2 MrWA== 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 t6-v6si7992243plq.268.2018.09.07.08.46.40; Fri, 07 Sep 2018 08:46:56 -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; 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 S1729723AbeIGS2d (ORCPT + 99 others); Fri, 7 Sep 2018 14:28:33 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:61866 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727801AbeIGS2c (ORCPT ); Fri, 7 Sep 2018 14:28:32 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 426Jf60jmXz9ttFS; Fri, 7 Sep 2018 15:47:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id vMYWHJHf9UTg; Fri, 7 Sep 2018 15:47:26 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 426Jf608lhz9ttFK; Fri, 7 Sep 2018 15:47:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B53EA8B950; Fri, 7 Sep 2018 15:47:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id Nt0ZqT9crSlO; Fri, 7 Sep 2018 15:47:29 +0200 (CEST) Received: from pc16082vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 934E68B94C; Fri, 7 Sep 2018 15:47:29 +0200 (CEST) Received: by pc16082vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 869C3718AB; Fri, 7 Sep 2018 13:47:29 +0000 (UTC) Message-Id: <113d4a559f6eec448b253bf5f0b4f2a8ffb187af.1536327756.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH v3 1/3] powerpc/process: fix casting and missing header To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , muriloo@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 7 Sep 2018 13:47:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes the following warnings. The first ones are leftovers from when __get_user() was replaced by probe_kernel_address(). The last one is from when show_user_instructions() was added. arch/powerpc/kernel/process.c:1287:22: warning: incorrect type in argument 2 (different address spaces) arch/powerpc/kernel/process.c:1287:22: expected void const *src arch/powerpc/kernel/process.c:1287:22: got unsigned int [noderef] * arch/powerpc/kernel/process.c:1319:21: warning: incorrect type in argument 2 (different address spaces) arch/powerpc/kernel/process.c:1319:21: expected void const *src arch/powerpc/kernel/process.c:1319:21: got unsigned int [noderef] * arch/powerpc/kernel/process.c:1302:6: warning: symbol 'show_user_instructions' was not declared. Should it be static? Fixes: 7b051f665c32d ("powerpc: Use probe_kernel_address in show_instructions") Fixes: 88b0fe1757359 ("powerpc: Add show_user_instructions()") Signed-off-by: Christophe Leroy --- v3: new in v3 to fix sparse warnings reported by snowpatch on the serie arch/powerpc/kernel/process.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 913c5725cdb2..e108e1ef2b85 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include @@ -1284,7 +1285,7 @@ static void show_instructions(struct pt_regs *regs) #endif if (!__kernel_text_address(pc) || - probe_kernel_address((unsigned int __user *)pc, instr)) { + probe_kernel_address((const void *)pc, instr)) { pr_cont("XXXXXXXX "); } else { if (regs->nip == pc) @@ -1316,7 +1317,7 @@ void show_user_instructions(struct pt_regs *regs) pr_info("%s[%d]: code: ", current->comm, current->pid); } - if (probe_kernel_address((unsigned int __user *)pc, instr)) { + if (probe_kernel_address((const void *)pc, instr)) { pr_cont("XXXXXXXX "); } else { if (regs->nip == pc) -- 2.13.3