From patchwork Fri Jan 8 18:30:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 565007 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BB3B21402A1 for ; Sat, 9 Jan 2016 05:31:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=cbEEcyMq; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 960C61A075D for ; Sat, 9 Jan 2016 05:31:47 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=cbEEcyMq; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pa0-x241.google.com (mail-pa0-x241.google.com [IPv6:2607:f8b0:400e:c03::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 55BB21A031E for ; Sat, 9 Jan 2016 05:30:23 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=cbEEcyMq; dkim-atps=neutral Received: by mail-pa0-x241.google.com with SMTP id pv5so22849799pac.0 for ; Fri, 08 Jan 2016 10:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8WZ1RtR8qbgskcy0o+m8HtuIHyXT8C5mwekMoJttbbg=; b=cbEEcyMq20pCZtTgXx453+DlusAwirLwRCZM18yG7i7AfiE/u4oNgZYmGsfYwY9i3H nIox0b3jSxBWdwTrW/NUG07uXC4a3b2XF5+OY4bbPTu56/WPYel+ycrYLQdUssArEwEo iU4XHZZOPp16Se/rF7iU177P8wXlqHcEwsWyLcdcsxNJ5QV4wwuvubeXrgG8t0HC8jSV E1Vn/J6zJ2TYUHlGaDu+/ESvXAav5LPisyBn8YwFDYIjWQjECk0sEFRcW4AENWQfRBWx jboizRThTYSMgpwAOPWra/sl6J6thN/suMqCd4LN9Ca/V+5QkNmW6MEbmernAVJio7jz PJUw== X-Received: by 10.66.55.66 with SMTP id q2mr94517563pap.120.1452277821556; Fri, 08 Jan 2016 10:30:21 -0800 (PST) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id y18sm6314753pfi.84.2016.01.08.10.30.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jan 2016 10:30:21 -0800 (PST) From: Brian Norris To: Ian Munsie , Michael Neuling Subject: [PATCH v2 2/2] cxl: use -Werror only with CONFIG_PPC_WERROR Date: Fri, 8 Jan 2016 10:30:10 -0800 Message-Id: <1452277810-98195-2-git-send-email-computersforpeace@gmail.com> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1452277810-98195-1-git-send-email-computersforpeace@gmail.com> References: <1452277810-98195-1-git-send-email-computersforpeace@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Anton Blanchard , linux-kernel@vger.kernel.org, Michal Marek , Joe Perches , Brian Norris , linuxppc-dev@lists.ozlabs.org MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Some developers really like to have -Werror enabled for their code, as it helps to ensure warning free code. Others don't want -Werror, as it (for example) can cause problems when newer (or older) compilers have different sets of warnings, or new warnings can appear just when turning up the warning level (e.g., make W=1 or W=2). Thus, it seems prudent to have the use of -Werror be configurable. It so happens that cxl is only built on PowerPC, and PowerPC already has a nice set of Kconfig options for this, under CONFIG_PPC_WERROR. So let's use that, and the world is a happy place again! (Note that PPC_WERROR defaults to =y, so the common case compile should still be enforcing -Werror.) Fixes: d3d73f4b38a8 ("cxl: Compile with -Werror") Signed-off-by: Brian Norris --- v2: new in v2 drivers/misc/cxl/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/cxl/Makefile b/drivers/misc/cxl/Makefile index ab6f392d3504..be2ac5ce349f 100644 --- a/drivers/misc/cxl/Makefile +++ b/drivers/misc/cxl/Makefile @@ -1,4 +1,5 @@ -ccflags-y := -Werror $(call cc-disable-warning, unused-const-variable) +ccflags-y := $(call cc-disable-warning, unused-const-variable) +ccflags-$(CONFIG_PPC_WERROR) += -Werror cxl-y += main.o file.o irq.o fault.o native.o cxl-y += context.o sysfs.o debugfs.o pci.o trace.o