Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3784326ybi; Mon, 29 Jul 2019 12:33:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyD8kPs55YCziYALOfNeOblqPyvS+sOuTwq+kH5zpvMqH6JblF8K+NRhmwVqLck22wA3GiE X-Received: by 2002:a62:be02:: with SMTP id l2mr39085662pff.63.1564428819093; Mon, 29 Jul 2019 12:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428819; cv=none; d=google.com; s=arc-20160816; b=pO9miFygbqYi91wJ7oM0l8VtNf8SeAZc0K1DOZ9ZBzSBS9EYp2khNAvWmdece55aEW VncndRJkvc9W8u+GPmIxglUPakGfZYTeJgEXHN3PYN88plgk9W4t7VMmK+mzxr1bwojh o9zAkn+Wmu0uzP59hlpeiwoC3svhSM30/i3OuzIDThIEW2ltIkwxZElpoTAVfcDHCGXs 37lRp44FcMpZVhx9ws/osRSXIsL1la/x1DuJDtaPGXt4BKPwtN2V5+SqhrtA9CLfsRjh MdGzfRe1e0RAfgia4MxI/j0J93FRmwoJ+ZPFC61dv33G7t/eLCw/i/4bgOIFARdZvwZq YtBg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pqKdEcak7OH1hoepdgBUqr4/nGnmfbdAQqN7tGc9hHo=; b=g9B2Mdp5GrQ9pDZ55s0nVv6nkTQFnBmSfSXYr1SQlA5N6MBqRSil4B3n1GwxIUHaZC iBvDSnZSC39bJVCUlK5exgdhnvSRyt10sjRVuYN/80h0RLfQtmRdCO+yDJA1vCmOKtBw 8j+KRtagtQl1FOq9YniH3tinX0NpZtmh1SVeaxsS6AvvVtHknpQSBFbEqU3nF2OEeide x7GgswPLuo59z6HtV4v8bf4xv7NXJZ9/dP0b1LxTnwapuPcyjObMrqkDrrljZ9qebgda mlhtXxSJCr53DaZGr7eWQVOtysNPAkzj2FaNtW3hzBSUGTkVEgvE133bsXZgKdpY+JLx g3pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AdxBP7ro; 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 o3si18019plb.238.2019.07.29.12.33.23; Mon, 29 Jul 2019 12:33:39 -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; dkim=pass header.i=@kernel.org header.s=default header.b=AdxBP7ro; 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 S1730038AbfG2T2y (ORCPT + 99 others); Mon, 29 Jul 2019 15:28:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:41498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730011AbfG2T2r (ORCPT ); Mon, 29 Jul 2019 15:28:47 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 99CC521655; Mon, 29 Jul 2019 19:28:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428526; bh=ARDh9vgOoUICoXPnoZ17qmCuc+eluowsNr0KVU08Rg0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AdxBP7roQN8OcUd8BuSloHRbpihovD/qLCrzcLbQPzIVpxSUKtDJHb5lkNOCpRa1F 7PntcuYv7uW7cIbe1ohn8KpVUuZZfRmHguP3x8OweypniB5G0uHKFqOU5P8FkRawb8 FHB/LvB49sappJs58SJ3LnPEaXmXtKPXeeZ6kj1w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Huckleberry , Thomas Gleixner , Nick Desaulniers , john.stultz@linaro.org, sboyd@kernel.org, clang-built-linux@googlegroups.com, Sasha Levin Subject: [PATCH 4.14 065/293] timer_list: Guard procfs specific code Date: Mon, 29 Jul 2019 21:19:16 +0200 Message-Id: <20190729190829.623689977@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 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 [ Upstream commit a9314773a91a1d3b36270085246a6715a326ff00 ] With CONFIG_PROC_FS=n the following warning is emitted: kernel/time/timer_list.c:361:36: warning: unused variable 'timer_list_sops' [-Wunused-const-variable] static const struct seq_operations timer_list_sops = { Add #ifdef guard around procfs specific code. Signed-off-by: Nathan Huckleberry Signed-off-by: Thomas Gleixner Reviewed-by: Nick Desaulniers Cc: john.stultz@linaro.org Cc: sboyd@kernel.org Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/534 Link: https://lkml.kernel.org/r/20190614181604.112297-1-nhuck@google.com Signed-off-by: Sasha Levin --- kernel/time/timer_list.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index 0ed768b56c60..7e9f149d34ea 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c @@ -289,23 +289,6 @@ static inline void timer_list_header(struct seq_file *m, u64 now) SEQ_printf(m, "\n"); } -static int timer_list_show(struct seq_file *m, void *v) -{ - struct timer_list_iter *iter = v; - - if (iter->cpu == -1 && !iter->second_pass) - timer_list_header(m, iter->now); - else if (!iter->second_pass) - print_cpu(m, iter->cpu, iter->now); -#ifdef CONFIG_GENERIC_CLOCKEVENTS - else if (iter->cpu == -1 && iter->second_pass) - timer_list_show_tickdevices_header(m); - else - print_tickdevice(m, tick_get_device(iter->cpu), iter->cpu); -#endif - return 0; -} - void sysrq_timer_list_show(void) { u64 now = ktime_to_ns(ktime_get()); @@ -324,6 +307,24 @@ void sysrq_timer_list_show(void) return; } +#ifdef CONFIG_PROC_FS +static int timer_list_show(struct seq_file *m, void *v) +{ + struct timer_list_iter *iter = v; + + if (iter->cpu == -1 && !iter->second_pass) + timer_list_header(m, iter->now); + else if (!iter->second_pass) + print_cpu(m, iter->cpu, iter->now); +#ifdef CONFIG_GENERIC_CLOCKEVENTS + else if (iter->cpu == -1 && iter->second_pass) + timer_list_show_tickdevices_header(m); + else + print_tickdevice(m, tick_get_device(iter->cpu), iter->cpu); +#endif + return 0; +} + static void *move_iter(struct timer_list_iter *iter, loff_t offset) { for (; offset; offset--) { @@ -395,3 +396,4 @@ static int __init init_timer_list_procfs(void) return 0; } __initcall(init_timer_list_procfs); +#endif -- 2.20.1