Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2136881imm; Sat, 23 Jun 2018 10:13:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKJucHBdJfo9OglklRE/2bZsbiMWw88WYVEcwVnurunK5MkSq0VHtzvdkF5QZDISE43ZqGU X-Received: by 2002:a62:ed13:: with SMTP id u19-v6mr6538422pfh.125.1529774019005; Sat, 23 Jun 2018 10:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529774018; cv=none; d=google.com; s=arc-20160816; b=QTmRGXTDIPDroH3sk+zQayeMWYvZ/XprAx9yukOuZrcUQiYV9N2lGLtdLtJ4W2exHF hrDSLfZQ6itOFlL+yV+Iyjaofv/pXkUohMwttpiecnbz+DF8aNhgkHs0ZXfQdnmEQr5p IjCSGgXk/JLXeWfJ6CbNfB3vYFvt7z4o5QRr1BPeDACRT/hiQABu+zyA1lFg0Mqph2um U5WK7TYVkNLNGpmz/ySCNySKlpSd7fxNKfohaOu5Qya1qf2286axEWe4pTW2uYGgRNBv i+ckonEommGMOAAis9XwDTmwgRR8Idd6MWm0PRN1LoyauxAGzqARe9+xeMsXrVu5HzZk Yk5A== 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:arc-authentication-results; bh=S3c1RgqWjSpGR8v4G+EsKmW/v0CwJX/sJyzbkeE4rK8=; b=SpZFndZbwybndhTw9i86uvkZB25YxnQhs1HlFXTIhlNT4WzLzK9BYvWU2xfZmmczxD ARWU8HRzv15lv7ZeuF5BAvi+zusHLP0jI8BmXWTex+sqAqd+gEGgP+o5T0Ya07cmRVCA 8HntJNOw0Yeud3Ye2grwZZhP5jIm/Bq9/Kms6bLqv+ZQaNfbfPHfVhvXJ6S9ViQyJa1G WZBynOCGOUfqOWHAB40oQdTTXzKCphIOFmZ37H1NwehyoL6LsD93oPzga+g7pP3OaVQp 3qdue5riTb9fcLN8JSBpsj1Kh1/mWdJBdsozHG0QRpxBnfBJxS2uLNk43s8pBtdXhjFu UJIw== 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 33-v6si10180828plu.385.2018.06.23.10.13.22; Sat, 23 Jun 2018 10:13:38 -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 S1751583AbeFWRMl (ORCPT + 99 others); Sat, 23 Jun 2018 13:12:41 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:55941 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751452AbeFWRMk (ORCPT ); Sat, 23 Jun 2018 13:12:40 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 41Chnt6fKZz9ttRy; Sat, 23 Jun 2018 19:12:34 +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 IlzLHlBjrRzJ; Sat, 23 Jun 2018 19:12:34 +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 41Chnt645xz9ttRr; Sat, 23 Jun 2018 19:12:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0E92D8B7F9; Sat, 23 Jun 2018 19:12:39 +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 5l2Fu0yspELQ; Sat, 23 Jun 2018 19:12:38 +0200 (CEST) Received: from [192.168.232.53] (unknown [192.168.232.53]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 171B58B74B; Sat, 23 Jun 2018 19:12:38 +0200 (CEST) Subject: =?UTF-8?Q?Re:_[PATCH]_powerpc/mm:_remove_warning_about_=e2=80=98typ?= =?UTF-8?Q?e=e2=80=99_being_set?= To: Mathieu Malaterre , Michael Ellerman Cc: Kate Stewart , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Paul Mackerras , Philippe Ombredanne , Thomas Gleixner , linuxppc-dev@lists.ozlabs.org, Peter Zijlstra , "akpm@linux-foundation.org" References: <20180622192749.24954-1-malat@debian.org> From: christophe leroy Message-ID: Date: Sat, 23 Jun 2018 19:12:37 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180622192749.24954-1-malat@debian.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-Antivirus: Avast (VPS 180623-2, 23/06/2018), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 22/06/2018 à 21:27, Mathieu Malaterre a écrit : > ‘type’ is only used when CONFIG_DEBUG_HIGHMEM is set. So add a possibly > unused tag to variable. Remove warning treated as error with W=1: > > arch/powerpc/mm/highmem.c:59:6: error: variable ‘type’ set but not used [-Werror=unused-but-set-variable] Is type neeeded at all when CONFIG_DEBUG_HIGHMEM is not set ? The call type = kmap_atomic_idx(); seems useless when CONFIG_DEBUG_HIGHMEM isn't set. Couldn't we just most type definition and setting inside the CONFIG_DEBUG_HIGHMEM {} below ? Alternatively, maybe you could replace the #ifdef CONFIG_DEBUG_HIGHMEM by an if (IS_ENABLED(CONFIG_DEBUG_HIGHMEM)) ? Christophe > > Signed-off-by: Mathieu Malaterre > --- > arch/powerpc/mm/highmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/mm/highmem.c b/arch/powerpc/mm/highmem.c > index 668e87d03f9e..82a0e37557a5 100644 > --- a/arch/powerpc/mm/highmem.c > +++ b/arch/powerpc/mm/highmem.c > @@ -56,7 +56,7 @@ EXPORT_SYMBOL(kmap_atomic_prot); > void __kunmap_atomic(void *kvaddr) > { > unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; > - int type; > + int type __maybe_unused; > > if (vaddr < __fix_to_virt(FIX_KMAP_END)) { > pagefault_enable(); > --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus