Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2457626imc; Tue, 12 Mar 2019 14:28:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmpZdJ3Tf8jzVJYWasHwZ3MplmML93w7+p+jwcr+YvofQfnehMdg/3DYzWxr0SqvMMs90C X-Received: by 2002:a62:be02:: with SMTP id l2mr40972502pff.55.1552426087180; Tue, 12 Mar 2019 14:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552426087; cv=none; d=google.com; s=arc-20160816; b=EEdUFUlkNBiAA6OygOA/xuiElHmeU3EUqOhD0zRZjpeLxZI5haQ4zu1QJuIkwXab1/ foPlM1JQSEiMJO+HmYURuYjcEXNIhzbMoJXHjC2DfJh2WR2ZoCXemIqI2u4WJly/7RCc VBzFoiEz0cjAtvw3EYxps5qgnXI1+GKxYKgcEguOESiSjJ6g1LrNwcx+/Lp8aqpKshoA yZGppJstPsHEChr/kCe/vK/aJ63gf3FcrFXX1gcNZFLmRumDZwfam74m7XUXXwAD667e fFDngDJ+a0RnodSP1n1Ip7QXmrDJ1njxcaeqOHf4467pkmGj/atBhPgLBJGvpkMqobii 9N2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=L4e+tqePl6sj60tGcmH+D7neMPhy0vq6Tj88TMJuFro=; b=Yhig3QApSz37nl+56C00jYxPddovdPvjUmSQWA2PcIF0HZnA+wQpBbqZKNdWZEhtEa oqUu4yfThrPM/C7sPtIQ2Vc7YZLCdaWW8kRepjmJV+ZHKduPA/EbtOgCQec1G9Fn08gm L/fSyHSoNI7unFg4CQpwF1GbqSY4UntAByPp56Rs4fN/kZOB1RP7+eZcg8PnqsvYZ063 5S1qPmwTAUuLdIIlLI5uQa3hTpR+KLP06zOiLH8DOg1/WZOfUQOry+m1ExCHGawCvpp9 5ZUAHKNmncs4dbqZJ8IaLQDgtaXmXNAUECIotRlWW7mNihfuXHfUFVQg79sudmSOyVLu erwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=WrGYXtij; 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 j2si8995918plk.220.2019.03.12.14.27.51; Tue, 12 Mar 2019 14:28:07 -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=@c-s.fr header.s=mail header.b=WrGYXtij; 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 S1726819AbfCLVZh (ORCPT + 99 others); Tue, 12 Mar 2019 17:25:37 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:35228 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726640AbfCLVZg (ORCPT ); Tue, 12 Mar 2019 17:25:36 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44Jp0t5T2vz9v1TK; Tue, 12 Mar 2019 22:25:34 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=WrGYXtij; dkim-adsp=pass; dkim-atps=neutral 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 sZw7ZXtKIQX9; Tue, 12 Mar 2019 22:25:34 +0100 (CET) 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 44Jp0t4G2cz9v1TJ; Tue, 12 Mar 2019 22:25:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1552425934; bh=L4e+tqePl6sj60tGcmH+D7neMPhy0vq6Tj88TMJuFro=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=WrGYXtijE6154/0e/iU5/F6mQZkp2PBzkx6i/Uu24p+CsPyxwSwkWyuBotXJJaFaE 5POqU1FhOhzanbTCNow9wQKFbNIqaBj9DihYKUS4pepfb8aeORFOtQlI6vp3cNu6Yl zrLWfMFj+m2zAF/8eqAF4p3WUnxhqaMzlwme2YSc= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B83BA8B8B1; Tue, 12 Mar 2019 22:25:34 +0100 (CET) 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 1Rwv6qYX61Tb; Tue, 12 Mar 2019 22:25:34 +0100 (CET) Received: from PO15451 (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 52E3B8B8A7; Tue, 12 Mar 2019 22:25:34 +0100 (CET) Subject: Re: [PATCH] powerpc: sstep: Mark variable `rc` as unused in function 'analyse_instr' To: Mathieu Malaterre Cc: Michael Ellerman , Paul Mackerras , linuxppc-dev , LKML References: <20190312202008.29681-1-malat@debian.org> <57a0d93c-8784-d6af-a5fb-75e31455ae57@c-s.fr> From: Christophe Leroy Message-ID: <94d90740-c970-01b0-c430-bafc2e9eecd3@c-s.fr> Date: Tue, 12 Mar 2019 22:25:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 12/03/2019 à 22:12, Mathieu Malaterre a écrit : > On Tue, Mar 12, 2019 at 9:56 PM Christophe Leroy > wrote: >> >> >> >> Le 12/03/2019 à 21:20, Mathieu Malaterre a écrit : >>> Add gcc attribute unused for `rc` variable. >>> >>> Fix warnings treated as errors with W=1: >>> >>> arch/powerpc/lib/sstep.c:1172:31: error: variable 'rc' set but not used [-Werror=unused-but-set-variable] >>> >>> Signed-off-by: Mathieu Malaterre >>> --- >>> arch/powerpc/lib/sstep.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c >>> index 3d33fb509ef4..32d092f62ae0 100644 >>> --- a/arch/powerpc/lib/sstep.c >>> +++ b/arch/powerpc/lib/sstep.c >>> @@ -1169,7 +1169,7 @@ static nokprobe_inline int trap_compare(long v1, long v2) >>> int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, >>> unsigned int instr) >>> { >>> - unsigned int opcode, ra, rb, rc, rd, spr, u; >>> + unsigned int opcode, ra, rb, rc __maybe_unused, rd, spr, u; >> >> I think it would be better to enclose 'rc' inside a #ifdef CONFIG_PPC64 > > Hum odd, I would have bet you would have suggested me to use > IS_ENABLED with some crazy scheme (I was not able to mix it with the > switch case nicely). Well I guess yes, you could also get rid of the #ifdef __powerpc64__ and instead add the following just after the 'case 4:' if (!IS_ENABLED(CONFIG_64)) break; That's less uggly than adding two #ifdef/#endif Christophe > > Anyway I'll try your suggestion and post a v2. > >> Christophe >> >>> unsigned long int imm; >>> unsigned long int val, val2; >>> unsigned int mb, me, sh; >>>