Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1253856ybd; Sun, 23 Jun 2019 03:34:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJq2FS62bHdD5Ch1aqW9m7zXBlwhEM7Xig6/hj/zAbYBqJo3mhsKLgkIvdxFY9c26t+HiE X-Received: by 2002:a65:514a:: with SMTP id g10mr27253185pgq.328.1561286097674; Sun, 23 Jun 2019 03:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561286097; cv=none; d=google.com; s=arc-20160816; b=cNwhLTP/zNu3Fis/0oMgrsz+nHLxoanQg6vtdp51IPYKm+C7NjErHaAtU5v6RgYVes WGAvfBGAGM4E9nJurJ3Pm9pPubHQDQ4LTo5vjvxAVElUAaiHIkWBhRncizlC2wz9tRzS 29pok1rNaoQCVIdYXicRjWArqZuPuCUfFd8A94SUXpVWvlHJ6KBgGU2kpI4sLIAOc6Vw 3Jw5sO12TssHrdA/ixM7Rd3hq1Jse3ITeQdUhjfzUwGPZtBDZsd6vvmde0GfU9iccqOT aineXkSPjJ/MGgzHBtO0L1I95YMuUq0LI8q/EftI6GUuq965Vag8TD8yv5QO8mq2RzFd yqhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=fL//r75TyoOH12BOusdMff8Y1ddZJgL7vjP9d2f+UKs=; b=cdE6gAMLc5Y8x4dECWYy8m6rLvTc6eKUEuixIDD3YGBuqAopMoApavXFbTOnh0un3L /5XA1J9DZOsiniKc4QseZb45k8D8/6V5Tlr9QFWqyZgIGaPVl6eRR9GWNlnzQwrcKNJ4 YPRrDewL47erM2bcJ6lIYH41pFkiTGEy4H1a2LJPPBxyEVpvwcNjoFAqnd+YYIbrCNPG j1/xknMj1rQqDbZbnrG6L/uSX1EARI5hk+hgJf6erjUju0+HU8HpmCd/5bf8zneF4CWy 4RrSkUgQ6V4a8Nys11TiWoAK5NYB48spyN0zcSfaNUl94TfITrLKB1tmQDiuOes4DOyV PMLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019061801 header.b=DFuAqy07; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si7033741plk.244.2019.06.23.03.34.28; Sun, 23 Jun 2019 03:34:57 -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=@zytor.com header.s=2019061801 header.b=DFuAqy07; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726477AbfFWKWj (ORCPT + 99 others); Sun, 23 Jun 2019 06:22:39 -0400 Received: from terminus.zytor.com ([198.137.202.136]:37431 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726350AbfFWKWj (ORCPT ); Sun, 23 Jun 2019 06:22:39 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x5NAMOV02589435 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 23 Jun 2019 03:22:24 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x5NAMOV02589435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019061801; t=1561285345; bh=fL//r75TyoOH12BOusdMff8Y1ddZJgL7vjP9d2f+UKs=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=DFuAqy07/H5VoPIWAKG0DcdQ51PjdgxOeRuhRho5zbpcz2HAVmU9RoeY1dDvE3/k9 fVv0El+zOgyxzimj+5yJlYWoC4GMbrSQ+AuDx0z49bZAc12f6CBCDQHQz+KGfJizuy RerD05FE6yfMNzCNMmytgHJPO/WY2Do6jsqau0WabNxjmTpqDhx5bIvTVRJ+XBerUk cBCBLVO4iUH9H/NMpxrCzy7h2K45jYqW37E18WeywcRGqNF2id3Jdy+yBh9ehFEu5l zYY7jKpC8xe5kMc66d9Z0jedwPN+LD9H+fDJ/kaI8yK6HT++fnhfg+0cnlkSt4dq1e /YWTqyTD3CuKA== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x5NAMODK2589431; Sun, 23 Jun 2019 03:22:24 -0700 Date: Sun, 23 Jun 2019 03:22:24 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Nathan Huckleberry Message-ID: Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, ndesaulniers@google.com, hpa@zytor.com, nhuck@google.com Reply-To: tglx@linutronix.de, nhuck@google.com, ndesaulniers@google.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com In-Reply-To: <20190614181604.112297-1-nhuck@google.com> References: <20190614181604.112297-1-nhuck@google.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] timer_list: Guard procfs specific code Git-Commit-ID: a9314773a91a1d3b36270085246a6715a326ff00 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_03_06,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, DKIM_VALID_EF autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a9314773a91a1d3b36270085246a6715a326ff00 Gitweb: https://git.kernel.org/tip/a9314773a91a1d3b36270085246a6715a326ff00 Author: Nathan Huckleberry AuthorDate: Fri, 14 Jun 2019 11:16:04 -0700 Committer: Thomas Gleixner CommitDate: Sun, 23 Jun 2019 00:08:52 +0200 timer_list: Guard procfs specific code 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 --- 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 98ba50dcb1b2..acb326f5f50a 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c @@ -282,23 +282,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()); @@ -317,6 +300,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--) { @@ -376,3 +377,4 @@ static int __init init_timer_list_procfs(void) return 0; } __initcall(init_timer_list_procfs); +#endif