Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp119448imu; Wed, 7 Nov 2018 22:10:26 -0800 (PST) X-Google-Smtp-Source: AJdET5cXEJFGqoeKqQjqKV5mD/2JhO8BuNUJX8Kwsj6Je9pmZOD6lJQ3m6SRoXFxi4JwRmS57k8i X-Received: by 2002:a62:d206:: with SMTP id c6-v6mr3257608pfg.143.1541657426328; Wed, 07 Nov 2018 22:10:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541657426; cv=none; d=google.com; s=arc-20160816; b=ZsTD90HhixRk1Ux/1eH/nXeezDbhDAwscz3cRIagx9kRbkTtzSEWjr50SzI2Hzw4Y2 CdKDhKnTdOq9hQOX4qNRBR3lWqT056MsqJZVqoABAisluMLcJVMETAlPuqEEYn2OM8lF vZnQt4KJwMQebh3Y4CIcHHm8Ko3KAtqXY8GfFTKcBD/XhLv8UKPWn1M48gA5h8ZgfAUE SEH7GpROPXK9Mc1qrSMiFzCi9WnnkFwW9YCiLQiQdTxB2w8Mb+/WC+YbedlyZOU3viuu P6mYHPQ/3xlUZkFH1xGeoFreNM26lul+i+ZmDMN9JI7CdykWaTGnh/GTJP81LppkQz6l Iwiw== 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; bh=FS90lsb5MHIbZu5yfBmcZERhISduckshKyg3nvMvbrc=; b=VdcKRvPHVx73xo7+7Ig9Ko6ShNQSCKEPpznHPsQEqjfsRrgYKKb2nhvf0sf94SgYqK LvI65YeWjr1Q/e+I6h1EECUQzzu0HHFXtkiDjfsALNMST2vUt1Wp0ETXb23KpQkEI+g8 BtvbeTiTBfge78DJn9n2MdsnicTg0+lSPsWHswmn2G8r1B0EwNxGLx2CY+JcMt4rk9Qn PsP/WOJIvNZ6yCnnyWbS2MaIZ4ECDQDu90nMjnu1DH1fZ/q2DPTI9SuK8F2FHAS2HsSE Sm1FOL1ORJ9F2dkACoyqLGdKmAw/N0JjJRgP0maAIfJ286UeGZOm8rfWJdH75P4tt/DX 5thg== 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 gn9si3109689plb.71.2018.11.07.22.10.08; Wed, 07 Nov 2018 22:10:26 -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 S1726454AbeKHPnc (ORCPT + 99 others); Thu, 8 Nov 2018 10:43:32 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:55744 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725972AbeKHPnc (ORCPT ); Thu, 8 Nov 2018 10:43:32 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 42rCYC4XP4z9ttSR; Thu, 8 Nov 2018 07:09:35 +0100 (CET) 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 7GM9rmS96FhL; Thu, 8 Nov 2018 07:09:35 +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 42rCYC41bNz9ttBh; Thu, 8 Nov 2018 07:09:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C96928B82A; Thu, 8 Nov 2018 07:09:38 +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 NHJVGxbchT84; Thu, 8 Nov 2018 07:09:38 +0100 (CET) Received: from po14163vm.idsi0.si.c-s.fr (unknown [192.168.232.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0F65A8B74C; Thu, 8 Nov 2018 07:09:37 +0100 (CET) Subject: Re: [PATCH] powerpc: Mark variable `cpumsr` as unused To: Mathieu Malaterre , Michael Ellerman , Breno Leitao Cc: Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20181107202641.7865-1-malat@debian.org> From: Christophe Leroy Message-ID: Date: Thu, 8 Nov 2018 06:09:35 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20181107202641.7865-1-malat@debian.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/07/2018 08:26 PM, Mathieu Malaterre wrote: > Add gcc attribute unused for `cpumsr` variable. > > Fix warnings treated as errors with W=1: > > arch/powerpc/kernel/process.c:231:16: error: variable ‘cpumsr’ set but not used [-Werror=unused-but-set-variable] > arch/powerpc/kernel/process.c:296:16: error: variable ‘cpumsr’ set but not used [-Werror=unused-but-set-variable] > > Signed-off-by: Mathieu Malaterre I don't think this is the good way to fix that. This problem was introduced by commit 5c784c8414fb ("powerpc/tm: Remove msr_tm_active()"). That commit should be reverted and fixed. That commit should have removed the macro and kept the inline function. Christophe > --- > arch/powerpc/kernel/process.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c > index 96f34730010f..b9f1a2408738 100644 > --- a/arch/powerpc/kernel/process.c > +++ b/arch/powerpc/kernel/process.c > @@ -228,7 +228,7 @@ EXPORT_SYMBOL_GPL(flush_fp_to_thread); > > void enable_kernel_fp(void) > { > - unsigned long cpumsr; > + unsigned long cpumsr __maybe_unused; > > WARN_ON(preemptible()); > > @@ -293,7 +293,7 @@ EXPORT_SYMBOL(giveup_altivec); > > void enable_kernel_altivec(void) > { > - unsigned long cpumsr; > + unsigned long cpumsr __maybe_unused; > > WARN_ON(preemptible()); > >