From nobody Tue Jan 24 08:54:04 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 4P1LP855cfz30wm4; Tue, 24 Jan 2023 08:54:04 +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 4P1LP830sQz3Qs1; Tue, 24 Jan 2023 08:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674550444; 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=NJmVJ3ATiNfCWol873aYDzz/W++QeobpgJ/a+r/XYs4=; b=qksgvnGNx9H16CX0PW6m1Iq6NO0BcURhGumb/JR3DXk7hA0ZY1/sI+ikv9GSThjdVshs2o TJ4AObIEEjZe9X1me4Wj8/SeQEXtsYCUmuz5TD3Cd9AzpONr/Pr0JeM4yhtnWKHtoA7K3N fTXnvY2mqjhLXZJe6841UzHtZ01gqLxfcmcyV47lcbIdqtILyezMHnZx6I3CFIZltNWvhd H037xrHmcZ54j6JJlFD6DpJVqB660bWBfrMsIkEiIuXRAh9j/nAEanKbB8MMwO8ioCYpFO NVR/t16Cm7+3WPN+crg38FDe2a0EX3SSZExT3sH07llqN3cS5MFbP+7F2L+8KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674550444; 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=NJmVJ3ATiNfCWol873aYDzz/W++QeobpgJ/a+r/XYs4=; b=fwz3tIRRoBmy4lkY17AdAq3lHjtEI5/rvTL6foOD4WAoRzV2jzQ8zQ1Iystivy1oVPaTes M0fV4UkyuuwPKCpqx8vm54UJZsShjxKkRHKAKZXbZcFPPXX8soxppQxC9t1jw940ASZFix Sx2I/Hq45jDyG9BZ2pMKW68LypZxOxK485vBJcxBlzlFhHePg6ApPuEQh81U/x0zv1XwFw ql2zeLOAA4vXjr0Pr7n8oV2YS12vSmVe1DNQr0v02i1ANukMMXq8lJVlfjv+YuVV3y12k5 p64C/jfvF/COtHtDSvWUBRQsFdhp6wYiGzdBeijcWWsqsO4BewghXI0W+zbYYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674550444; a=rsa-sha256; cv=none; b=xieDzYSjgPTQ0+YNOKEUA3DzEuW5+yD8MPufdxH0TUYvUHBX41moH9yPm8ra+5pEu5NSXg pQMCdIirGCFABGIfXkqGARZADjRyZKhmbhARCZhsQKNbokmcSuoJPD3+Dg4vZNFhNB8SOe DEkbmaaG10XcTxSArggcOzP04JiPE1I472hIBbE1CAIa/3bsABDhRSEH8bPbdc7sGZFqB9 UmzPsjhCSQpdnWVbGbb2jprsC7hqbKtHnkjwL7BZt4g1dXbS3kIMT3L2DdmQ76HtRKzo2H 3nBF3/LtlOu13jQJ8JD+SHrJioq13DHV5E+GEXRm6Vz8vhTLrqXJZ0VlJbAUDw== 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 4P1LP825zfz135j; Tue, 24 Jan 2023 08:54:04 +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 30O8s4ne035995; Tue, 24 Jan 2023 08:54:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30O8s4uf035994; Tue, 24 Jan 2023 08:54:04 GMT (envelope-from git) Date: Tue, 24 Jan 2023 08:54:04 GMT Message-Id: <202301240854.30O8s4uf035994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: c4b72d285c7a - stable/13 - linuxkpi: Add `dev_warn_once()` in 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c4b72d285c7a5b09e5f733b129df01e76f08be84 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c4b72d285c7a5b09e5f733b129df01e76f08be84 commit c4b72d285c7a5b09e5f733b129df01e76f08be84 Author: Jean-Sébastien Pédron AuthorDate: 2022-11-11 17:42:31 +0000 Commit: Emmanuel Vadot CommitDate: 2023-01-24 09:08:00 +0000 linuxkpi: Add `dev_warn_once()` in Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D36968 (cherry picked from commit c4163160e44d1f329301b0fe943854b9dc0750dc) --- sys/compat/linuxkpi/common/include/linux/device.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 6c76836c4d94..70015fb7d81f 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -204,6 +204,14 @@ show_class_attr_string(struct class *class, } \ } while (0) +#define dev_warn_once(dev, ...) do { \ + static bool __dev_warn_once; \ + if (!__dev_warn_once) { \ + __dev_warn_once = 1; \ + dev_warn(dev, __VA_ARGS__); \ + } \ +} while (0) + #define dev_err_once(dev, ...) do { \ static bool __dev_err_once; \ if (!__dev_err_once) { \