From patchwork Tue Oct 9 11:19:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 981150 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="YhPv/39w"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42Tvwj0gySz9sCT for ; Tue, 9 Oct 2018 22:23:01 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbeJISj2 (ORCPT ); Tue, 9 Oct 2018 14:39:28 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:36180 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbeJISgy (ORCPT ); Tue, 9 Oct 2018 14:36:54 -0400 Received: by mail-ed1-f66.google.com with SMTP id c26-v6so1330125edt.3 for ; Tue, 09 Oct 2018 04:20:25 -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 :mime-version:content-transfer-encoding; bh=BvFODKJ3lJ+nmAkzDQXfTYLKbkSs6KigO50/DmHYVto=; b=YhPv/39whzmviX6k/6sNm1+Wa8Rq1sKG9jyF6PDjUcp4BuDVjMB5Ds7ONgMMvXDKFu flUkCOf394zBH6zox3VaeL7gi63mH1j7nLdeFy3ZBQ8fuLBk5nKOQUtn8JsyUDk1ZJ3+ o7L7T/sfCdgY4wsjuGsrxz1dQul/NJAMlhWB4= 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:mime-version:content-transfer-encoding; bh=BvFODKJ3lJ+nmAkzDQXfTYLKbkSs6KigO50/DmHYVto=; b=Wv1nF4VvIR3rjaFd9eSgD9fawS7X8nW3nVb8dQbS7D8SBfL+fm9XjVg9nQ7JY7WVQC ydY53qgGlaEJukdyEE+/s+sIt3Zg1xJaDnnmQthlihxF2NukizHOnO2FqHItyECLQjCd fj94HWxZ9pwYogYpz4z2j0lN1nQZdqQmHeIlQvQC8JouW7GdIimk/b8V/NBu0c7NEcor icPHlLgV4jazHsapAC3Ty8FMaU5kpICh0K1rauGmMsvKMnXkfxgCt2LlNV9iIZUP9TWt JKO6GWho4oabMOUlkq53GEvHuKt4NhpZ6mkZ7pENvJ7BKLSQtx7nvg5Ay7q9AR7PwLBp 9h3w== X-Gm-Message-State: ABuFfohZ/66KLviV2ilyhzGdKpLrs0MUwG+VG88+kTLaAzon62ueOyhR ar9qh1STdUnENX2xTq1JVaDGtw== X-Google-Smtp-Source: ACcGV61+4ZX6mIBGYA0dZ7Ic2YCde6/xvm4SxBiISnuZeIZa4wKJXtzi0/J9fx9evf2scCo5AUEXAw== X-Received: by 2002:a50:d9ca:: with SMTP id x10-v6mr34391337edj.103.1539084024328; Tue, 09 Oct 2018 04:20:24 -0700 (PDT) Received: from prevas-ravi.vestasvisitor.net ([193.47.71.171]) by smtp.gmail.com with ESMTPSA id n23-v6sm3595821eja.41.2018.10.09.04.20.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Oct 2018 04:20:23 -0700 (PDT) From: Rasmus Villemoes To: Jason Baron , Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , netdev@vger.kernel.org Subject: [PATCH v2 04/23] linux/net.h: use unique identifier for each struct _ddebug Date: Tue, 9 Oct 2018 13:19:54 +0200 Message-Id: <20181009112013.14238-5-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.19.1.4.g721af0fda3 In-Reply-To: <20181009112013.14238-1-linux@rasmusvillemoes.dk> References: <20180919220444.23190-1-linux@rasmusvillemoes.dk> <20181009112013.14238-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Changes on x86-64 later in this series require that all struct _ddebug descriptors in a translation unit uses distinct identifiers. Realize that for net_dbg_ratelimited by generating such an identifier via __UNIQUE_ID and pass that to an extra level of macros. No functional change. Cc: netdev@vger.kernel.org Acked-by: Jason Baron Signed-off-by: Rasmus Villemoes --- include/linux/net.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/net.h b/include/linux/net.h index 651fca72286c..397243a25f56 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -260,7 +260,7 @@ do { \ #define net_info_ratelimited(fmt, ...) \ net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__) #if defined(CONFIG_DYNAMIC_DEBUG) -#define net_dbg_ratelimited(fmt, ...) \ +#define _net_dbg_ratelimited(descriptor, fmt, ...) \ do { \ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ if (DYNAMIC_DEBUG_BRANCH(descriptor) && \ @@ -268,6 +268,8 @@ do { \ __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ ##__VA_ARGS__); \ } while (0) +#define net_dbg_ratelimited(fmt, ...) \ + _net_dbg_ratelimited(__UNIQUE_ID(ddebug), fmt, ##__VA_ARGS__) #elif defined(DEBUG) #define net_dbg_ratelimited(fmt, ...) \ net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__)