From patchwork Mon Jun 17 13:04:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 167026 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2838225ilk; Mon, 17 Jun 2019 06:04:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZO/EufEnz6RnxYxo5tSTPSTjr3ZhyXsuy1QxR3AQAhYMTOKUzwJDCK7PJThATIRO1lcQz X-Received: by 2002:a63:374a:: with SMTP id g10mr38188583pgn.31.1560776677518; Mon, 17 Jun 2019 06:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560776677; cv=none; d=google.com; s=arc-20160816; b=lxx355JSytPBKciOynW9pyLRnRJVvkQLcM1GpZFp5Ib7Gw2oKEwNdS4lSZvoS9MkXF fSQ+OrvhhuUxOKK6H0TGSE6i+1MQLV4EEE9A3APzosWhJWTpTspErlycHcwEFRCd8sFm hVUbnC05ApVHrlXENfHC9FC2ssRK/LqbnBRBkmEd+IWN1j93z8qtoIniRMcXIvAtJh6d yubT2zPvo3vqupqEtBsgp3Uyd9RQih87RnzyN8liuig3JvVfba8b4qJZK7YVmzjzdN3j EVW5sNpK+/u7IXG2A9VPyrEMagY9n78lGfiBOUqprlxhtWb5OXpMvy3stU2lRJvSKyQD 2EsA== 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:subject:cc:to:from; bh=gcqPiFxidwDBMweSh64UKntt+oVAuiQY6/qZE0wcDq4=; b=VwVu+65b+Y4MphRtbCW7jjYEc72YyySjDIiTljvX47V1S3aoZkaED+UiJmcIudB8+X QpMkvpC2EZV8QD9EJXf9XKYp0ZTAm2kJgMO/Mcnn6oK5Ly4+jgqi8bcqdecANhLpcnB+ FbZ0j9sGDrefjmhtNRCt2/LamMAQi3c6JzITdRWEVI9rmh4SLC2agQlN6lN/seHCzmZL aRwjsr4JYqb7UmSjzCitpNNxumUvdFggQqTZJ8q01imsdquO3wr+WsnWIzZb3RitTIhf PALCaNohh/FypvfYowQkEPAQqYySzHfHatIIvMm08IuJZOA4rosVANywLbNw1UQyRW+v TwHQ== 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 f5si10382815pgq.564.2019.06.17.06.04.37; Mon, 17 Jun 2019 06:04:37 -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 S1727715AbfFQNEf (ORCPT + 27 others); Mon, 17 Jun 2019 09:04:35 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:41383 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbfFQNEf (ORCPT ); Mon, 17 Jun 2019 09:04:35 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M3DFj-1hdfaV1WAf-003en6; Mon, 17 Jun 2019 15:04:30 +0200 From: Arnd Bergmann To: Alexander Shishkin Cc: Arnd Bergmann , Greg Kroah-Hartman , Souptick Joarder , linux-kernel@vger.kernel.org Subject: [PATCH] hwtracing: msu: fix unused variable warning Date: Mon, 17 Jun 2019 15:04:14 +0200 Message-Id: <20190617130428.1887747-1-arnd@arndb.de> X-Mailer: git-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cl5hGaVd66e91uy ZAYa6xhhXplhpYLZ2PPi/mXen9LdM7ZA6cZ5EQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On non-x86 builds, we now get a harmless warning: drivers/hwtracing/intel_th/msu.c:783:21: error: unused variable 'i' [-Werror,-Wunused-variable] int ret = -ENOMEM, i; ^ drivers/hwtracing/intel_th/msu.c:863:6: error: unused variable 'i' [-Werror,-Wunused-variable] int i; ^ Add the matching #ifdef. Fixes: ba39bd830605 ("intel_th: msu: Switch over to scatterlist") Signed-off-by: Arnd Bergmann --- drivers/hwtracing/intel_th/msu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.20.0 diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index 81bb54fa3ce8..833a5a8f13ad 100644 --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -780,7 +780,10 @@ static int __msc_buffer_win_alloc(struct msc_window *win, static int msc_buffer_win_alloc(struct msc *msc, unsigned int nr_blocks) { struct msc_window *win; - int ret = -ENOMEM, i; + int ret = -ENOMEM; +#ifdef CONFIG_X86 + int i; +#endif if (!nr_blocks) return 0; @@ -860,7 +863,9 @@ static void __msc_buffer_win_free(struct msc *msc, struct msc_window *win) */ static void msc_buffer_win_free(struct msc *msc, struct msc_window *win) { +#ifdef CONFIG_X86 int i; +#endif msc->nr_pages -= win->nr_blocks;