From patchwork Sun Feb 25 17:22:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Malaterre X-Patchwork-Id: 877570 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zqBvd19Phz9s2j for ; Mon, 26 Feb 2018 04:36:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="opWp9ke9"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zqBvc6cKkzDqqQ for ; Mon, 26 Feb 2018 04:36:12 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=debian.org 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="opWp9ke9"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=mathieu.malaterre@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="opWp9ke9"; dkim-atps=neutral Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 3zqBcN3FvhzF1P9 for ; Mon, 26 Feb 2018 04:23:00 +1100 (AEDT) Received: by mail-wm0-x243.google.com with SMTP id q83so13299340wme.5 for ; Sun, 25 Feb 2018 09:23:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cShMRX0buhRT/d7jByQ+juQ7O6LwLccpVi2rUdwR1HQ=; b=opWp9ke9QqcKhYbHR1DYkjNLC8Qzqk7t9P37aPXzDxn2xTmOj2hpiUZRPLzQU5kpUi WLZSDXL+RzHWAiyDcZMUv0ZRqeWumm4qmyGHRIXCwlgXLyh06Vh7hxrYj9OUI06Kic1i k6Mbz6ITxGfYpp9OxaUNQ0blZKP3sbAczCgn6ZODKGOB+bpu5v3UsZV4a3DurOHJ36Ew K31OUh0lth4eT0+jfyIF+6NxbCVY7fKRDrPddE1FMKkLzGIYX79BbRCxIz8TP94l/QeS m6rbJbStb6PpsD4tP6ejqfeFZPBO0KMzC0Zw39XB1ScuUcM3VVGt0hmipFEMUwc1IDN5 dJFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=cShMRX0buhRT/d7jByQ+juQ7O6LwLccpVi2rUdwR1HQ=; b=VHRBr3Wf1e3kT6rdClDjv9kNUTbPtW7S2e/3TjPc1jGdOeUle92tnlxJtk4dphXuhA 0WzTw4FljJF3Dh0puzgncBiei7knsHJlQI58tNtfa6o9k8WonkvXhwUWoxMEMHmNgojS E36WCQweJHhfsf+gESmUp5R2VKsgXPqo1hCUfJJOaLFTSHiw8CKIZrjdATQwCJJXjffo X0dDBKJHlDc3UpVbznLhVIx8D3AyY0Fb/rEBDE0roU/W9ZFLmc5VUS9OfSpwu4SYwOTX thBhzhEeIh6FUK/q559weu6ZE1qUff/hPxeKIu8qnbwT1L/TFOgKtMKfQaI7n5PJX3O2 yYuA== X-Gm-Message-State: APf1xPBYGVsiKgfPcKcrK2NhgBgHliVIWBxTuXUCcF5+UfWaow5AGK6G nFw2wYUZawtHxTTPp+goit4= X-Google-Smtp-Source: AG47ELt/sxJbmhBM3MoqNIKJoXtjQM65SU2Ku9GAz8Oh0MxwFqvXMWyZEtDMZ3wCCgIFs09evQkNnA== X-Received: by 10.28.21.136 with SMTP id 130mr5840304wmv.152.1519579377754; Sun, 25 Feb 2018 09:22:57 -0800 (PST) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id b185sm6445478wmb.24.2018.02.25.09.22.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Feb 2018 09:22:57 -0800 (PST) Received: by macbookpro.malat.net (Postfix, from userid 1000) id C84CF10C03F3; Sun, 25 Feb 2018 18:22:54 +0100 (CET) From: Mathieu Malaterre To: Michael Ellerman Subject: [PATCH 04/21] powerpc: Mark both tmp variables as unused Date: Sun, 25 Feb 2018 18:22:19 +0100 Message-Id: <20180225172236.29650-5-malat@debian.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180225172236.29650-1-malat@debian.org> References: <20180225172236.29650-1-malat@debian.org> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Malaterre , linux-kernel@vger.kernel.org, Paul Mackerras , Jiri Slaby , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Since the value of `tmp` is never intended to be read, declare both `tmp` variables as unused. Fix warning (treated as error in W=1): CC arch/powerpc/kernel/signal_32.o arch/powerpc/kernel/signal_32.c: In function ‘sys_swapcontext’: arch/powerpc/kernel/signal_32.c:1048:16: error: variable ‘tmp’ set but not used [-Werror=unused-but-set-variable] unsigned char tmp; ^~~ arch/powerpc/kernel/signal_32.c: In function ‘sys_debug_setcontext’: arch/powerpc/kernel/signal_32.c:1234:16: error: variable ‘tmp’ set but not used [-Werror=unused-but-set-variable] unsigned char tmp; ^~~ cc1: all warnings being treated as errors Signed-off-by: Mathieu Malaterre --- arch/powerpc/kernel/signal_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index a46de0035214..492f03451877 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -1045,7 +1045,7 @@ long sys_swapcontext(struct ucontext __user *old_ctx, struct ucontext __user *new_ctx, int ctx_size, int r6, int r7, int r8, struct pt_regs *regs) { - unsigned char tmp; + unsigned char tmp __maybe_unused; int ctx_has_vsx_region = 0; #ifdef CONFIG_PPC64 @@ -1231,7 +1231,7 @@ int sys_debug_setcontext(struct ucontext __user *ctx, { struct sig_dbg_op op; int i; - unsigned char tmp; + unsigned char tmp __maybe_unused; unsigned long new_msr = regs->msr; #ifdef CONFIG_PPC_ADV_DEBUG_REGS unsigned long new_dbcr0 = current->thread.debug.dbcr0;