Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp173174imu; Wed, 7 Nov 2018 23:26:47 -0800 (PST) X-Google-Smtp-Source: AJdET5eaSecGzjMsZ30i4yPk+8OibAqsKBVcVXEnVDS/7YzyeFAyACQ49O+9W3ePfCbzau9EGnGG X-Received: by 2002:a65:5103:: with SMTP id f3-v6mr2958191pgq.54.1541662007862; Wed, 07 Nov 2018 23:26:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541662007; cv=none; d=google.com; s=arc-20160816; b=LqSzV06Ag/t4k+EwYd25essiOoUW4ALHyNlZaykxnuYexWXeB81sqiQldvwqKtzrEX v5zssUWv5ap7cUZTrDnQ9Uw4HzWtItOYN6tpQm2igF70e05Ak+INp+DA7c2CfU8Sy0+u ggIH0r/h8ZpYGCfczq2dZbB2rbGALIe3tHvvw67UGWetpT87gqsXWwFSnH3reimY7HQj dsXOmeGw2bORCI1L71I58f3payZxL/t6yt3UJxQzGdCEc3hc8/dXK3u6twGw0hjrLfJb lOsxsJR9tO/uqVERQ3Mx8EY2x6S+MQFoDERgiHP63LmulLOBCzmGpsxQVc00jH3edlDA RkkA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=RGnEXw5/AiWuyJ4kfZt1NnzFqAldArgK8hQX/73X6vU=; b=y9k3M2+VUd0Tqff7f8ctza4YvbYtAHupZ3gM0YIqrusWp6JgvjoiAksREHfT72+yti 00kGKQOwXKNIeNwrXW22qeNxTaWRCy1lWJEer2t+XhEGWYI6hqIkoQJHRTXPHoy38Q5k bDmHjCJxIETppgL/nou8o/MPAPdhW+O3RkJOYcyhsAj1Ol8May4DN2rHS6XemLUQ2n4y ib13x8zc58tAIeDHkZYrxoaDCZj/LjfANnGQOQDPB3JJHxQnN4I0dMXFVnadqhumOt+R l9+wnrRrh7z0LLkND86mb6pyEFVOHD3f0dA02/g1F299ekZkyvzJJYIIb58pb0dLZIVy mw+Q== 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 b65-v6si2617062plb.152.2018.11.07.23.26.31; Wed, 07 Nov 2018 23:26:47 -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 S1726583AbeKHRAJ convert rfc822-to-8bit (ORCPT + 99 others); Thu, 8 Nov 2018 12:00:09 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:33722 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbeKHRAJ (ORCPT ); Thu, 8 Nov 2018 12:00:09 -0500 Received: by mail-oi1-f196.google.com with SMTP id x204-v6so668758oia.0 for ; Wed, 07 Nov 2018 23:26:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=m5QoePyAj2YI6QUty4NP8hZpIkgaGBT9QFNFVrkmBkU=; b=dQo/lES9N+Q4X1LLx9CyXyTWjuxdNfe2oA8quDcpJ8S0DoK8fawMXHW/GEZZQZZg41 8Cwp+nG5QnIgoSVGZ96DLPK3DkVGrAt/+qDZXG9r/y5g48OS+idKKzILemwu1sNHrh7U ARFXsYOUWsPEL0QaL2zE1nTu948BM1M1IhUFV6WFKbuTm/uoyulS2dUtkQ+X4cojN42A hVdpCfa8TpSbBjpS8kTT1rF56jE5/Bs6wqS46En1zP417/ZfQ65nu+8K4VjSu1LDpx2e U5mOZmhLlr7RHCXJICVd74uXnajArnrOvRikIKWchCMRhtOKw0YtoBIst2zBvTUDoECI Y/Qg== X-Gm-Message-State: AGRZ1gLq2jGvcAVHVD0KT53hk4c/PZs5FcnX2BXHWB1J4GWblRc8RbTT as40KUPXEu9DFiH7wOAr7l2Hg8j71QqINzwBRiM= X-Received: by 2002:aca:aa84:: with SMTP id t126-v6mr2093746oie.218.1541661960379; Wed, 07 Nov 2018 23:26:00 -0800 (PST) MIME-Version: 1.0 References: <20181107202641.7865-1-malat@debian.org> In-Reply-To: From: Mathieu Malaterre Date: Thu, 8 Nov 2018 08:25:47 +0100 Message-ID: Subject: Re: [PATCH] powerpc: Mark variable `cpumsr` as unused To: Christophe LEROY Cc: Michael Ellerman , Breno Leitao , Paul Mackerras , linuxppc-dev , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 8, 2018 at 7:09 AM Christophe Leroy wrote: > > > > 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. I see, it makes sense. > That commit should have removed the macro and kept the inline function. Breno, what do you think ? > 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()); > > > >