From nobody Thu Feb 16 11:55:51 2023 X-Original-To: dev-commits-src-branches@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 4PHYLJ2RKBz3q5Ys; Thu, 16 Feb 2023 11:55:52 +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 4PHYLJ1jt9z48lx; Thu, 16 Feb 2023 11:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548552; 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=oRxbOYTikuIxTl8Xs3FfnubDvyOX9qQtpRMVPn4u2E4=; b=PDsg75m7zFhS0lJQFqHjEDCjsDVAgNzO7ulJXvyZCGQ2HorsJf8b8HAz8VgaokI8l4z/5M LYf6CnV2eBb7r1c/xuGItl1YQvYWaM+NZ/rGmtFTjYijyrZQnQ82uoShNytgp/9wHRze44 d+e4GiTfzFsTMou/WCOvZmrm22GoVvok61Yieyg6qdSFx/bnzzBh5/vHOHOLS392nqRAMJ nEsDiarDilKgsd0t+Hwjw09YluYx31W+yVF73dvsJW0aaTc+JYSwVuZ2kgBJIQr1c7tP+9 Rv04TNXqKAb9N4UJRQzGMxHFssjxOQcmmWRfhnPzUH9NNOtRGGOx/kowvncLVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548552; 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=oRxbOYTikuIxTl8Xs3FfnubDvyOX9qQtpRMVPn4u2E4=; b=L6PG/2yWIuuKP6iq83WRWYQ/HyCrUCM7IE85zK10MDxv7mgc0jj/mmgGLu1W9NDmYrqtb/ i8Mfpw7mluyvpqwRtHFYkleImJNnL7d5TMtgZJNZgLqsCNVGm89tXTeZBfbmN/2u/lehzE UzYhZzdz9ZcflfTmTAU9abiTQGCPScFLNH+Ex/hwEoZ4/M45R0Xv+w9CpoD3dLgnbQI7zg Q/ZP4tVlw/DTc/nWAhoYyldnQsy0il8N2BL6AmS9Ad0KOGVutGEth+2oFUgCxGX49XDDyK 5iJoj+YKFAFJrCGzZURg0xEytUxqnP8y5hwbW8FkMFi9aI2HLESlMZe9aofW1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548552; a=rsa-sha256; cv=none; b=yVoUKozdeDHVj4Tq/S5mp/7bsMw5Vem4b+AYml3spIO4NP42Znq/XZPif3e1hBK1QPsVib w517yQVwj7hUBmR0miUwdmEZzLEf1dkteDC9Yw6yO+Z20S71l6OtkqYo+ssEohaeW8hh8U lxleioHHdW9u7KYOtnjV2OfdAY0ypgY/wE1XAx1lpVyjYWSf4yuJOuFIIuR/u/MRGBhRFq ttBDYYpa0wH8IwPl7FdBm53/lbXOri4MEkPdJgmUulk6+eQzKGjYsqA0jlnaVYWkDwjBkh imYJgOS+4Gm7OnURZ0DwDTawWXwHLPALPmFBChyOEXC7MzSll6PMF5bj3hukcA== 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 4PHYLJ0mSgz12fW; Thu, 16 Feb 2023 11:55:52 +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 31GBtqkV055212; Thu, 16 Feb 2023 11:55:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBtpRX055211; Thu, 16 Feb 2023 11:55:51 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:55:51 GMT Message-Id: <202302161155.31GBtpRX055211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 01ae017c3e0d - stable/13 - linuxkpi: Define `dev_dbg_ratelimited()` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 01ae017c3e0da57e83982d5bd1d21bd8d4af9a4d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=01ae017c3e0da57e83982d5bd1d21bd8d4af9a4d commit 01ae017c3e0da57e83982d5bd1d21bd8d4af9a4d Author: Jean-Sébastien Pédron AuthorDate: 2023-01-19 00:15:03 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:13 +0000 linuxkpi: Define `dev_dbg_ratelimited()` Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38145 (cherry picked from commit bbff0400c1d7728ae1759d8f740033a0a2f8aeff) --- 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 bf9a0cabd066..01a1729830c4 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -233,6 +233,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 *);