Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4243595yba; Tue, 9 Apr 2019 14:27:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/zqgT2MH3ebMvKrSZsWUYLa03Bk+BbvJuOfFOiDiS496R1AHy8sxYXlwAveZ7DQZpraUW X-Received: by 2002:a17:902:f089:: with SMTP id go9mr38161710plb.309.1554845229837; Tue, 09 Apr 2019 14:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554845229; cv=none; d=google.com; s=arc-20160816; b=pTMT9CPCUPvZjxTsmSbTVHeWMbyG7emQ2kpZFkKtAtLov5tS0wSAuyNCXDjpFZE7Sc hqmpnCLfevr1Ef1/Wj3bOAc4Q91ySiSPbNHpQg5ax3DJgFapSdtXiqTFYXDeJPkf/MVZ JFscK3sOMSy5C1dg8cybJu7jPoWeXrgR6zPxAPXw1q9XGbx8nRO8OBrAbFxb+A5a0+CE TLuVPp+rNDMcpvAiYj5S8hRzItB9Vp9pKexO+Wm0QNZIctWO8RDH08Ih4kIL9shN2i2q bkEJmCuiWZ2mjUX8Wz0CudwMU7YagvxCDZMLGWSSMv+doat1Cl9xeDfDQq1dCIkHmhFC Hc8g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8KN4q20HRUQBAdf+paD/ffQpCN5tvmQdqpoiavL9WR4=; b=IGocQcCQs7y8yVhic+X6kdTQoGEWHQzz9BgCnCHdHDMscGToZOPsIF1PI17683dli/ NmkyCkG5JAEJQHtYBFBJQakStSQTvzdUEj9SHHhsMUv5BmV1FRMGnrL8Afs+KGx+pqxl lj7j4G8fmJlzVkXSJ90mKURW6I/N//JPhYp9YLsb/8Z69iPqAy7d7xZJSpM81RqKbBwF EQVjRVnIfKWjBKxgKSTJI3ZkmbvYLFMf1CzcRkX/KSrE47i+MiXQUVmCfdKtbJTtBzK7 W+SqLCQjy9amCtHMoFrzv3UAoX+s4IxPeB+95N4sO2LJDu1NtbypNlFsi2X+6EpQ1dZ9 Mz/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=G82ZdSPq; 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 7si28151169pgn.419.2019.04.09.14.26.54; Tue, 09 Apr 2019 14:27:09 -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=G82ZdSPq; 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 S1726800AbfDIV0F (ORCPT + 99 others); Tue, 9 Apr 2019 17:26:05 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:41293 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726333AbfDIVZz (ORCPT ); Tue, 9 Apr 2019 17:25:55 -0400 Received: by mail-ed1-f68.google.com with SMTP id u2so118320eds.8 for ; Tue, 09 Apr 2019 14:25:53 -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=8KN4q20HRUQBAdf+paD/ffQpCN5tvmQdqpoiavL9WR4=; b=G82ZdSPq0Rot6o3lKKasjZMa+n0D3x81mT0LEpd08rBCmJP5aCIS+t6gyjf4dd3qt9 B61dGodhXZoGr+r58ljQgYP4AINfcPMu5yZRE93NnYY9SHMFwxRWQShueEqf/morqNKF 5S1vcS5JaYoNIPAUPVS3E6sQ/HVhFWvXjXIhA= 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=8KN4q20HRUQBAdf+paD/ffQpCN5tvmQdqpoiavL9WR4=; b=swSBL1Eo8nYhDIGDAk3qqAHvh7WKGT/fv/wlHp1be+YIBXR94IR3sgWQzkjW6IL/Uw HWZ0IeXt7W6WvQp35Hyp2Aqi3JYahl4VpeXO2LPwQS8HU4XtP+A/VToHkkgdmhk4Yk7k qljF7hvKNQRqUyq91s+W0d9JboHHQh3iLyWDEiXRAOpQFuDjyY9D2nUqfDC3Xgmt017y OJFuuiAa8UVBtOF/4YuKfBrk9Z0xrln+686w4m/gTkWH2HOhWududCP7xld/YGsQ7Csx E0aXkVIXhEXq5KQXr7ZUPyMAxUGPmlOdS9kL4vz6Zc+a1HISI1SUqEk1KZ/70fOWtBj+ hDGA== X-Gm-Message-State: APjAAAW47Zsjqv682eRzbpVE/Jqqn6v2h095Jqs7zNKhooZKActSAm/u OvuGBv5onRiGZikEeUA+03BvHA== X-Received: by 2002:a50:a4db:: with SMTP id x27mr24655365edb.120.1554845153314; Tue, 09 Apr 2019 14:25:53 -0700 (PDT) Received: from prevas-ravi.prevas.se (ip-5-186-118-63.cgn.fibianet.dk. [5.186.118.63]) by smtp.gmail.com with ESMTPSA id i26sm3477986ejc.51.2019.04.09.14.25.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Apr 2019 14:25:52 -0700 (PDT) From: Rasmus Villemoes To: Andrew Morton Cc: Jason Baron , linux-kernel@vger.kernel.org, Rasmus Villemoes , netdev@vger.kernel.org Subject: [PATCH 02/10] linux/net.h: use unique identifier for each struct _ddebug Date: Tue, 9 Apr 2019 23:25:09 +0200 Message-Id: <20190409212517.7321-3-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190409212517.7321-1-linux@rasmusvillemoes.dk> References: <20190409212517.7321-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 c606c72311d0..828e0db1e63a 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -266,7 +266,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) && \ @@ -274,6 +274,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__) -- 2.20.1