Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1253113imm; Wed, 19 Sep 2018 15:05:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbNfptQz/J7e8qIdRzRnm/1Id56UkQ3jw9x/qBS0a5dgAye0N6hUB07CcjVi0+w6UTy4son X-Received: by 2002:a63:4107:: with SMTP id o7-v6mr3185635pga.256.1537394737144; Wed, 19 Sep 2018 15:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537394737; cv=none; d=google.com; s=arc-20160816; b=ZqxUtznSbRx4UOp1ExT4pidZjENZ/BcObnSnSLXakg+zaM40ITWDNguWISe3ko+h6z bc5Gdpz3Q2w9pbHrwVoNixps9XzyrKqdJvssJP8yI+5c2uVZvJg3ycWlTQtdjjsCzYH0 F3oT/0ANNOL7qD53Ht/bascK+3Rn3HkVPrxbiHrcknZ48xjWfTz85NjmCAAfWKpyuuAS Fh9F3Dw6bt0xjw3qP+xyQiGF2IvtWgILUM6ny/Q5UfgU2L58ME8VXCSmZEzUTVvcmHw9 jPt2Ci6u5z3HekLrgmFvhx0l129EloS8XMh/wOLGKpdNtIJ8D3lWUibWfXApOOOnY520 YnAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Fs5UFE/HY2e8DYvOOnhEO+Vn3hqK5fCSlLvW6URjl6I=; b=aPz9QURdRe4f00TMoPglk/M1pZtspbjvfUMRsIesYPPmYwqZVXxrYcV0OTR972T9KQ DI96Im5Av6t03Hmnfsr9AxuA6IHN4qX03lIpBGk7jEjlKNSTND86wqbBMpDBXOm40+NS TO0jEGQG+a6XtxIAydyG/hSljXMykLyy9xOa2INNLqnf0JAkXgELlH2tEK4oqW3aI3KJ I2QmmWGf973wFOO2skePuNid331Lrj0dh5p9SuLugNG/fEK0t+9NTWpWpDE53+5TTLy3 9oR/0EcVZJjGzQ3TjMdniaBoW3RYalLh6hdD3QRCf6rl8r8cjPQv0ozQh8tpOdv80lNy aQjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=hB2ODxoW; 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 v23-v6si22034727plo.19.2018.09.19.15.05.20; Wed, 19 Sep 2018 15:05: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; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=hB2ODxoW; 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 S2387452AbeITDpC (ORCPT + 99 others); Wed, 19 Sep 2018 23:45:02 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:45621 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733235AbeITDpC (ORCPT ); Wed, 19 Sep 2018 23:45:02 -0400 Received: by mail-ed1-f66.google.com with SMTP id p52-v6so6145400eda.12 for ; Wed, 19 Sep 2018 15:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Fs5UFE/HY2e8DYvOOnhEO+Vn3hqK5fCSlLvW6URjl6I=; b=hB2ODxoWssQUoQ5/gKKy5JThiOKigOWQ80hRWs0puFOG/05a1bF+KQ0htM4Hg5h2Sf hFO5DTCpAXj0e2toQnV3qigiL53oGpAdFOOLTW1uLG6QCpHEmJw4PDRSTRFTdvBfNbWe +gzcanXOi9gC7JsOBbzBXyUrKNdA0+9tIXwUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Fs5UFE/HY2e8DYvOOnhEO+Vn3hqK5fCSlLvW6URjl6I=; b=JHHs3XMarkaoNsa4M8Q3P1vzY0NgRRNUAmIPQM3YpzT+NaA8BBxZeY0E8KNt3L0b6I UECa0+VOGqIFGpJHJc8+SBk5Khr+duD0/l3nt56pX38+6+qMfQLXVxxZFWj2Zta+PzLY jQQc+9iWuUWoiiUEeyUCTq/SDrAY1vpSCsqrQucb9hnfmJ16yQLZ6+/4IB0GYimZGgvt keWfhq+GSTQ4i7MPPTgGIT74wXkBLylcMvQhgDoUxz6vgsUThKkIMvvrZ8ljwRCgfu1d Tu1mDADHLg5AFwHb5TASlrOyyFy7zNW2OpBXJLaFAV4z2BUMDa3y1ZkLCZNqjwNASwTC MmSw== X-Gm-Message-State: APzg51B0+9ncl4pDGVcovlx3+FFD5N7ugQxK6SZkabzQM9HmpUrEqvdr wemOjLQMk4Lk+EPM2nooE1/vgA== X-Received: by 2002:a50:d01a:: with SMTP id j26-v6mr63249314edf.15.1537394704261; Wed, 19 Sep 2018 15:05:04 -0700 (PDT) Received: from prevas-ravi.waoo.dk (dhcp-5-186-115-161.cgn.ip.fibianet.dk. [5.186.115.161]) by smtp.gmail.com with ESMTPSA id a9-v6sm2798edi.26.2018.09.19.15.05.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Sep 2018 15:05:03 -0700 (PDT) From: Rasmus Villemoes To: Jason Baron , Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes Subject: [PATCH 12/22] dynamic_debug: add static inline stub for ddebug_add_module Date: Thu, 20 Sep 2018 00:04:34 +0200 Message-Id: <20180919220444.23190-13-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180919220444.23190-1-linux@rasmusvillemoes.dk> References: <20180919220444.23190-1-linux@rasmusvillemoes.dk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For symmetry with ddebug_remove_module, and to avoid a bit of ifdeffery in module.c, move the declaration of ddebug_add_module inside #if defined(CONFIG_DYNAMIC_DEBUG) and add a corresponding no-op stub in the #else branch. Signed-off-by: Rasmus Villemoes --- include/linux/dynamic_debug.h | 10 ++++++++-- kernel/module.c | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 0a643316597c..6a002b789d51 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -47,10 +47,10 @@ struct _ddebug { } __attribute__((aligned(8))); -int ddebug_add_module(struct _ddebug *tab, unsigned int n, - const char *modname); #if defined(CONFIG_DYNAMIC_DEBUG) +int ddebug_add_module(struct _ddebug *tab, unsigned int n, + const char *modname); extern int ddebug_remove_module(const char *mod_name); extern __printf(2, 3) void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); @@ -152,6 +152,12 @@ do { \ #include #include +static inline int ddebug_add_module(struct _ddebug *tab, unsigned int n, + const char *modname) +{ + return 0; +} + static inline int ddebug_remove_module(const char *mod) { return 0; diff --git a/kernel/module.c b/kernel/module.c index 381f9bf282fe..be2727c5a003 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2715,9 +2715,7 @@ static void dynamic_debug_setup(struct module *mod, struct _ddebug *debug, unsig { if (!debug) return; -#ifdef CONFIG_DYNAMIC_DEBUG ddebug_add_module(debug, num, mod->name); -#endif } static void dynamic_debug_remove(struct module *mod, struct _ddebug *debug) -- 2.16.4