Received: by 10.223.185.116 with SMTP id b49csp1507226wrg; Sun, 4 Mar 2018 03:36:34 -0800 (PST) X-Google-Smtp-Source: AG47ELtKHSnT9/q6BR89eIrPXfTyndpu/6GrCVLkpAZJIgsj/UkQ1N8b6owOGC0EBtSHbWJW/jlZ X-Received: by 2002:a17:902:bb81:: with SMTP id m1-v6mr9978918pls.71.1520163394450; Sun, 04 Mar 2018 03:36:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520163394; cv=none; d=google.com; s=arc-20160816; b=KmfKvr1qQIzyTnzzbWqSfjelNUuVrO6SJC7ZgrRR2DyA5z/0glf6HsAPeJo2Tm6J24 uqDjYwejSJ+H9jbHsBv9UwkJk4UmyOrx4HEH56PFiXcWzUtngorbmOGdlCdCNJphVqfG bssvt7lzbSWdQXTUxRk356uNIxIHjK3JDF1/7cGnA1abGa+qm+zsGqMfDcZVXQ4ThS+x FDoFVVTS9hJY2A53kXa+crdheBwra98yu9u2qQ5k+URRlKLVidlpKO87ta6pw0LlCor6 VJO19lV9pXgr4Tyy07ZqqhslHTQizwXxO8ey6B0IWWL9Sv5EGIpdnz7EgHcvjvgeQuUq eBHQ== 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:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=wJqgsFMtwlLxZMifVNyl7I9zLixWL+srLcY/zMPpPFY=; b=CSmlzGjwpNUF6MXbrQ6lJp6uEr6jV8PnEDqBqqytJQICSXm+sdm3Nv5ZaPBSebXsYj W9ACcs/ThYymRXmqfF1BDISRnOzom0UWgxk3BPMMXyNA9Uud53dOPVgOEktdql1qc3jq qKT80/9e7QWOQdtPEG/rpG46TLdoWvtcEyiH/0lQZZSVtCGN2eRVJs9Bru2GazXaRjTE F9WeLkYJQN2LODDFp5nKb2m2gyUrsZc4ZMU8tFvX0ryNf8nBqkP0eSjwtkkMVJYgOeAV QsCYOJzR/5XuLCOyv5CFkdpxUGM+gc10c+UGX9MxVZPjF9Q3q64MNROjYRrWzOVaMKDV Jj1Q== 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 b11si6868221pgr.612.2018.03.04.03.35.40; Sun, 04 Mar 2018 03:36:34 -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 S1752669AbeCDKyN convert rfc822-to-8bit (ORCPT + 99 others); Sun, 4 Mar 2018 05:54:13 -0500 Received: from ozlabs.org ([103.22.144.67]:57687 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751844AbeCDKyM (ORCPT ); Sun, 4 Mar 2018 05:54:12 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3zvKfV5Rxjz9s25; Sun, 4 Mar 2018 21:54:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Mathieu Malaterre Cc: Benjamin Herrenschmidt , Paul Mackerras , Jiri Slaby , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Mathieu Malaterre Subject: Re: [PATCH 03/21] powerpc: Mark the variable earlycon_acpi_spcr_enable maybe_unused In-Reply-To: <20180225172236.29650-4-malat@debian.org> References: <20180225172236.29650-1-malat@debian.org> <20180225172236.29650-4-malat@debian.org> Date: Sun, 04 Mar 2018 21:54:08 +1100 Message-ID: <87po4kglgv.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 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 Mathieu Malaterre writes: > Re-use the object-like macro EARLYCON_USED_OR_UNUSED to mark > `earlycon_acpi_spcr_enable` as maybe_unused. > > Fix the following warning (treated as error in W=1) > > CC arch/powerpc/kernel/setup-common.o > In file included from ./include/linux/serial_8250.h:14:0, > from arch/powerpc/kernel/setup-common.c:33: > ./include/linux/serial_core.h:382:19: error: ‘earlycon_acpi_spcr_enable’ defined but not used [-Werror=unused-const-variable=] > static const bool earlycon_acpi_spcr_enable; > ^~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > Signed-off-by: Mathieu Malaterre > --- > include/linux/serial_core.h | 1 + I can't take this one as that's not a file I maintain. The script says: $ ./scripts/get_maintainer.pl include/linux/serial_core.h gregkh@linuxfoundation.org jslaby@suse.com linux-kernel@vger.kernel.org Can you resend it to them? > diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h > index b32df49a3bd5..4d14ecd7dbe8 100644 > --- a/include/linux/serial_core.h > +++ b/include/linux/serial_core.h > @@ -379,6 +379,7 @@ extern int of_setup_earlycon(const struct earlycon_id *match, > extern bool earlycon_acpi_spcr_enable __initdata; > int setup_earlycon(char *buf); > #else > +EARLYCON_USED_OR_UNUSED > static const bool earlycon_acpi_spcr_enable; The macro eventually turns into an __attribute__, which I think is typically placed after the variable, so eg: static const bool earlycon_acpi_spcr_enable EARLYCON_USED_OR_UNUSED; cheers > static inline int setup_earlycon(char *buf) { return 0; } > #endif > -- > 2.11.0