From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbcBLQmZ (ORCPT ); Fri, 12 Feb 2016 11:42:25 -0500 Received: from mail-ob0-f170.google.com ([209.85.214.170]:33702 "EHLO mail-ob0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbcBLQmX convert rfc822-to-8bit (ORCPT ); Fri, 12 Feb 2016 11:42:23 -0500 MIME-Version: 1.0 In-Reply-To: References: <74c0820133f1dada0d70c74bc70a9530b2697f86.1455198893.git.jslaby@suse.cz> From: Andy Lutomirski Date: Fri, 12 Feb 2016 08:42:02 -0800 Message-ID: Subject: Re: [PATCH 3.12 55/64] x86: vvar, fix excessive gcc-6 DECLARE_VVAR warnings To: Jiri Slaby Cc: stable , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 11, 2016 at 5:59 AM, Jiri Slaby wrote: > 3.12-stable review patch. If anyone has any objections, please let me know. > > =============== > > On 3.12, with gcc-6, I see a lot of: > arch/x86/include/asm/vvar.h:33:28: warning: ‘vvaraddr_jiffies’ defined but not used [-Wunused-const-variable] > static type const * const vvaraddr_ ## name = \ > ^ > arch/x86/include/asm/vvar.h:46:1: note: in expansion of macro ‘DECLARE_VVAR’ > DECLARE_VVAR(0, volatile unsigned long, jiffies) > ^~~~~~~~~~~~ > > In upstream, this is fixed by ef721987ae (x86, vdso: Introduce VVAR > marco for vdso32) and f40c330091 (x86, vdso: Move the vvar and hpet > mappings next to the 64-bit vDSO). But this is not applicable to > stable. > > So mark the vvar declaration as __maybe_unused and be done with it. > This will generate it to the code only if it is used. I.e. the same as > with gcc < 6. LGTM.