Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4243334yba; Tue, 9 Apr 2019 14:26:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwN9kBU7rUZd8i1n1dhTrmj5BnpuVkkunBCs0ns/fiSE1ArTHTiUxgtstY73um0qADCuOHg X-Received: by 2002:a17:902:ec0b:: with SMTP id cy11mr39757799plb.21.1554845204308; Tue, 09 Apr 2019 14:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554845204; cv=none; d=google.com; s=arc-20160816; b=FFOFVP71nwHmbL0G8Cd0tqXAANepI4fRLqegAF9uHqn4hFCYml8cVBUulQpiypP3nu yM9KjA4p+O+FAAgmu8vma96z7sKmK8zaTwbd2g1vbzSx1XKkASxqy9lOmiYoC2iLyz/z WMcf95VPbpcaFyy2W0GTQN4vly+l+lhFiEm6LY66BhMElp2oJ9umKJ4fjaOcCu8ushTL uDPaKthKC0o23DYa3qY7NJfOAFu5Tt8KHhgjPYfRs+IW1VsBU0BZ17t2Kkrohs9pSI6y lAY6T3sh+8HduuOKsM+DfBS13dH/qaYftr8JOOJDOPfaSuMld8JIwQ59THXx2q34hM30 6mGA== 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=ZI11Zmtr2qg4/K1lFbCuudGPrJYgVYyPLkGzsua46oQ=; b=YMredDl0MO0ReZby1gWTeukLLRV6UO35gOLRDUwqFpYTVT+9MV73eh4Fs6qjfZEslj BC7YpNxauYclTQ/UYoucqLILBCmAz6tumwvC9UE1V3+qbZNpV3yzza7lqW+klWV+dZ+V UnALXt6h6VR7oAkReAQeWCllSx2TPl0AftlBIdJBOdZ9nZwWKPo/iyvfOddrtpAQs1Z2 +rOYDqRwc4e22MHZ5lXenr4PatHZGZQ3lW3gawBbC8idb3kUNOR8SgIyUCG8bXdiX6Eg lnuHHkhvm0VyPzqv6/4H3S/C3Zwzw/8K5/qW76AsgN2hYnP9VSohoSwYy7aOOdCYTC9L vyPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b="hmGG9/7a"; 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 a17si28330424pgk.572.2019.04.09.14.26.27; Tue, 09 Apr 2019 14:26:44 -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="hmGG9/7a"; 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 S1726655AbfDIVZy (ORCPT + 99 others); Tue, 9 Apr 2019 17:25:54 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:38133 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726444AbfDIVZy (ORCPT ); Tue, 9 Apr 2019 17:25:54 -0400 Received: by mail-ed1-f65.google.com with SMTP id d13so129073edr.5 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=ZI11Zmtr2qg4/K1lFbCuudGPrJYgVYyPLkGzsua46oQ=; b=hmGG9/7al8yzsp5pJYYQNnpUZtCG6MaGXWnNfUmGHl6LFY4z5fr9QBU34I/0BdkT3x 4EMZ4c9zTHIePHafB9nCo9/QWiqhYplmB7QIuntWk60CNP/rCEsl+xw0d5Jcp8YVXcjW oNexDIX1Wa/8+aZS6iruwWgQd0niWYVDIo/PI= 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=ZI11Zmtr2qg4/K1lFbCuudGPrJYgVYyPLkGzsua46oQ=; b=AcW6RrcqF0AzXXGTyV6jfiSoLRa/uq72pn/QlKQNFiSODkHX2QRk8h+bnZbQW+VLDR kfQOtfloZX9NH/VDwFA1//o5zfuCHUgK0+FQud52nKBYjGSPgfRjvUQu6bl8byLNFtg9 PtTco+WHW4hynwAJ0eLz0JueriyxRqj7USB5Xc2kidBMASxV8romVBzdwCntb/9wViSI 4t23vZ+CS4S+OnPThKwQEeXArbE4xDX4hqwFIN3vKbnCxJSTacGqU5+S2ftQPMNH+Mrj j85HvbICm+u4fZqQqfdgi1F83ChOEhWU56s3OxArNJK1n4OPaPkGfSBXWe7fYuIjGyQA +mvQ== X-Gm-Message-State: APjAAAW56cS2QkxsO7qMJNZhO1em9as5LeEbO+c5GLB4KxPFusBwit+y ZL/zcfwYUjS/QjVy+43yoX0hjw== X-Received: by 2002:a50:b4c9:: with SMTP id x9mr24548318edd.132.1554845152431; Tue, 09 Apr 2019 14:25:52 -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.51 (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 , Greg Kroah-Hartman Subject: [PATCH 01/10] linux/device.h: use unique identifier for each struct _ddebug Date: Tue, 9 Apr 2019 23:25:08 +0200 Message-Id: <20190409212517.7321-2-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 dev_dbg_ratelimited by generating such an identifier via __UNIQUE_ID and pass that to an extra level of macros. No functional change. Reviewed-by: Greg Kroah-Hartman Acked-by: Jason Baron Signed-off-by: Rasmus Villemoes --- include/linux/device.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/device.h b/include/linux/device.h index 4e6987e11f68..64b95a913fef 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1562,7 +1562,7 @@ do { \ dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__) #if defined(CONFIG_DYNAMIC_DEBUG) /* descriptor check is first to prevent flooding with "callbacks suppressed" */ -#define dev_dbg_ratelimited(dev, fmt, ...) \ +#define _dev_dbg_ratelimited(descriptor, dev, fmt, ...) \ do { \ static DEFINE_RATELIMIT_STATE(_rs, \ DEFAULT_RATELIMIT_INTERVAL, \ @@ -1573,6 +1573,8 @@ do { \ __dynamic_dev_dbg(&descriptor, dev, dev_fmt(fmt), \ ##__VA_ARGS__); \ } while (0) +#define dev_dbg_ratelimited(dev, fmt, ...) \ + _dev_dbg_ratelimited(__UNIQUE_ID(ddebug), dev, fmt, ##__VA_ARGS__) #elif defined(DEBUG) #define dev_dbg_ratelimited(dev, fmt, ...) \ do { \ -- 2.20.1