Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1359742imu; Fri, 9 Nov 2018 15:23:26 -0800 (PST) X-Google-Smtp-Source: AJdET5eQgMkQmp+YJC5VZGZ+QhStf/ITBGuG7lpXXNsjY5jM1TaZEXc3BTkuzQcFaN0R+MQ+lSGa X-Received: by 2002:a63:f201:: with SMTP id v1mr1602428pgh.232.1541805805960; Fri, 09 Nov 2018 15:23:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541805805; cv=none; d=google.com; s=arc-20160816; b=V54+XQYwiPq5AR8xVinyqcI5GdkbaK0snCVtQmS6wzvg8a/Yb2NRAPkIPnjZsTOpuG NRDJpo5bs1q6mBB6ujOG5QR5MP02zyyhoBtqP1b2ra3PREG0Q2D34rqnU2FrPBlbZ/6V g0namHWWN7CtcJz2s5L8HFVLjb6F1RjwtK2jq7SR2m9Z7zdAiFyya2OQZQSu+tSFgR45 FV1a6GYk3whIBJwP7m4aQC/FI8CgusAwYcwLAlnncsVlVJc6pPAv/kws8GSkYizSa9/5 qAdt9Cs8P61SxHZcQ7PhjO2hMID7fkx6aNy2Jqgip3Cn+wyvr+BWFzgLhO0nKJaK5Fxu vvzQ== 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:date:cc:to:from:subject :message-id; bh=IvV+fKHRJV61Dd/3meyJFt2XWl2lhy9dsEnS5b76QoY=; b=ta1FkSaPOAY8JMn8yGHu0ibW9q5wroOC7nsu+rh9LXtpBsX5dJI0Ms8MfjVVvF875x c38GezSOK8MqNGPrNQkJZYxSmgeTyepyTPmNwoRpa9e7GpX8z1gXzsb1pRByXtm8hC+6 S1/kj2+uMBNeFfXNlaQy/XjaLj63epHQ2kS3dEfB+J6hOrIw2gchCYJiF+Z1Pjq0mXWh ABR291xtWbeWUWjJAPHKWW5T96KF+ZhCyJql2kyt7KKbsUxncRRDHWEd7cTskxqp3kUn aNItmXz9nxnZsPfqKDcqWmCqDP0E1fsLTfag1GERIkbnFnSDmCd5xCT2ziGzZwH/mUpk /Qng== ARC-Authentication-Results: i=1; mx.google.com; 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 1-v6si9264462plj.146.2018.11.09.15.23.09; Fri, 09 Nov 2018 15:23:25 -0800 (PST) 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; 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 S1728846AbeKJJFS (ORCPT + 99 others); Sat, 10 Nov 2018 04:05:18 -0500 Received: from smtprelay0112.hostedemail.com ([216.40.44.112]:36960 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727746AbeKJJFS (ORCPT ); Sat, 10 Nov 2018 04:05:18 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 627977817; Fri, 9 Nov 2018 23:22:31 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:599:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3866:3867:3868:3870:3874:4321:4605:5007:6119:7903:9140:10004:10400:10848:11026:11232:11473:11658:11914:12043:12296:12438:12555:12740:12760:12895:13069:13311:13357:13439:14181:14659:14721:21080:21451:21627:21796:30036:30054:30070:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:29,LUA_SUMMARY:none X-HE-Tag: verse81_6d337e82fce1b X-Filterd-Recvd-Size: 2618 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf09.hostedemail.com (Postfix) with ESMTPA; Fri, 9 Nov 2018 23:22:30 +0000 (UTC) Message-ID: <2358250f27022be9eb5c4e6a3d95ee869c3af45f.camel@perches.com> Subject: Re: [PATCH v3 04/23] linux/net.h: use unique identifier for each struct _ddebug From: Joe Perches To: Rasmus Villemoes , Andrew Morton , Jason Baron Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Date: Fri, 09 Nov 2018 15:22:28 -0800 In-Reply-To: <20181109231021.11658-5-linux@rasmusvillemoes.dk> References: <20181009112013.14238-1-linux@rasmusvillemoes.dk> <20181109231021.11658-1-linux@rasmusvillemoes.dk> <20181109231021.11658-5-linux@rasmusvillemoes.dk> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2018-11-10 at 00:10 +0100, Rasmus Villemoes wrote: > 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. Why does this require an extra indirection _? > 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__)