From nobody Wed Jan 25 22:15:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P2J6v4Zkzz3bbVq; Wed, 25 Jan 2023 22:15:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P2J6v44j7z4680; Wed, 25 Jan 2023 22:15:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674684903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l+RuU/es6Fow3LQzQcF246bTt5aBbSih9EXUw9wgfLw=; b=AyUYQK/aG3mgEsJ2jK18gh37XE8IqKB4bQekGiAq+5lIJsLzv0KWWb0TcXBxj6cxp0IXY/ Sk8GEZst/qQtxjrRf3zAsWVWOub+dj5m2pGoWIlesJ6sJlG1ClUyxvmaaqPwR2JCmCztHD c9T1M0njz+XO7Hx7llgKcd8NxAQQfa/+fEGsJZQc+2oE6j+rHmvSTf/s7SvM012FMic656 JpB/nOkYRMWXjEQIn/9iR7bn9r4iT0mSftKXW/r595k2VD1mPa1rbpcZgc05sLSqFi0kb0 usgjbU6h54H6F3MRXaDpEOzAVlDDyuopBUXlJKjskICF6xjaJeaQ03ffpM9EUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674684903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l+RuU/es6Fow3LQzQcF246bTt5aBbSih9EXUw9wgfLw=; b=UJ915T7IalKhPi/KTjAvugtAinK1pv/Zjb3y3R2t4zbQ1GfgU85T6++wvD/GU1iyKzZQFr LWCM+dmlsibk6IlbQE+HIlg01CbtIyrnUAkROQDzdJnMt3CmyXKvgbSgMIadrekrI61oD1 F3qe4vn9gsgXch8tMPrUhWd3ro+LCV6tLqh89MBeu/bwemYBETpgnSqWGDnUFNrRhYyQVe AfUrCETDl8W40oveSDeh3Dgc6AJJZBRFyu/QVod4w4NJkW2ERktvaC5QWgSQbMRPX7Weh9 QmQ/r9gzpJwgZFrHDDdUBewAUl7mcKufdF4SYw3Zhtujbo9ATiC9g1rMunho0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674684903; a=rsa-sha256; cv=none; b=I6KfBetE7S7s3UBukkL7n7nOg1AmMeuB262k9EJtXvasP8kznizDuKjR2BRGA92GDkRQtl KrjLy7B9N+PAb+IE9cpZM5of6WtW2jwn7yT6bOOlZGnMN4u6xyWpt3jMnBQaHa9s1nW8vQ Wl9GAP7sh9i1/7MC3qKfZ5W92E+8Oisf4/E0cbcZQtpS8S14LQ2j8l26G956Cu5b2OFUBE T5sqIh4R/IFro4uFMcKvOAF1xE8HUk70ALyvbcr7Y4Il2VvatPG3sUl6+NZiWnxcLr5quF 3hS0ZF5daHYdETcozv0r/s3wQrrkd6HJohzLG76wwmU5T+OKgehJmSlb+doeWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P2J6v31yTz15JT; Wed, 25 Jan 2023 22:15:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30PMF3aF064162; Wed, 25 Jan 2023 22:15:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30PMF3ED064161; Wed, 25 Jan 2023 22:15:03 GMT (envelope-from git) Date: Wed, 25 Jan 2023 22:15:03 GMT Message-Id: <202301252215.30PMF3ED064161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: bbff0400c1d7 - main - linuxkpi: Define `dev_dbg_ratelimited()` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbff0400c1d7728ae1759d8f740033a0a2f8aeff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bbff0400c1d7728ae1759d8f740033a0a2f8aeff commit bbff0400c1d7728ae1759d8f740033a0a2f8aeff Author: Jean-Sébastien Pédron AuthorDate: 2023-01-19 00:15:03 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-01-25 21:48:32 +0000 linuxkpi: Define `dev_dbg_ratelimited()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38145 --- sys/compat/linuxkpi/common/include/linux/device.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index dfe80e84cea8..92e7e6772fbd 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -235,6 +235,12 @@ show_class_attr_string(struct class *class, dev_warn(dev, __VA_ARGS__); \ } while (0) +#define dev_dbg_ratelimited(dev, ...) do { \ + static linux_ratelimit_t __ratelimited; \ + if (linux_ratelimited(&__ratelimited)) \ + dev_dbg(dev, __VA_ARGS__); \ +} while (0) + /* Public and LinuxKPI internal devres functions. */ void *lkpi_devres_alloc(void(*release)(struct device *, void *), size_t, gfp_t); void lkpi_devres_add(struct device *, void *);