From nobody Sat Feb 17 21:32:50 2024 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 4Tchq65PsSz59lC2; Sat, 17 Feb 2024 21:32:50 +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 4Tchq63yXWz4h1n; Sat, 17 Feb 2024 21:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205570; 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=2dknK7aApfwUXmtsodXlCnKflkRvI4FX4JStTcfRRzM=; b=hvVhT6vC+LgjK4IFG6Ip7VMURfNXuTazz/Lor0Jp7elcq41MHFv95pqcrZpFlJ24fO0R2P mHRNt49/1JN4K2nBHdUbc5vNjhhzbFZQh922zFplnbLC6fUGAXOyeopPU7gsc27rWNfBg1 IWYH8GeSqZelR5/ZQ+x60PIX23gulC9Av18gJA3mMY3fXz1dsXq4fovB1Kfst/rigjyaC1 upPESUz0svve17NBVHAKYERrwUR2a6nLmtGOYWi7hSbelpacCXRo/nSffvuAglTY4BXKzI iIRowDd2bi7uvqOpEGPc220YuEOacqQMHDkmeTFET//211yvdxv8FVKemxQdkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205570; 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=2dknK7aApfwUXmtsodXlCnKflkRvI4FX4JStTcfRRzM=; b=AdWJMiCYhQwR2nJ+Tz2LlVsqTqJ2H4lDNOJ9aIyz0FriXag4jTOqM3IaQjw6dNoKGTzSEu VnygyZnKA8qKJChwpCjyERzLzg+m/tHRjxqvv1mCfE6dNT2HPLYLPnT+Ow1c5WHIFI0Kg8 ySmeRWjtiIdmrSRz31k0PWcovfcUVyo9lDUptnzc2AxZ6OVUs1Zbeb1oqHYWj01RuEw/A3 cuycg35AsCn9+y3ClNOptXiaGLaP08f+zf3KarICWstmO1ZQaj4CtwdsLwiV8Ir9HfIweY 32nbxY6ae+mqAAAwGq6cXwW/wLbTWS0STL0Tia36PQg4rBBsGcDKb8kDnhS7Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708205570; a=rsa-sha256; cv=none; b=fuPkHorvtkcC3/boDIAFdjfn00m4Th2iodVZoLpikvLgvTAnAKlOqEvt+Xa+hPolgFhGoH xr3pZ+2My8m3JSe4A7e0pRf2xPx571dHSQQdK65ApnhgYugfoX+rIFSkCs07vaaV5zxBVE eBBTM+wZ9SpCI97kwlUU8cw+ULMvxgkeuqiypac+y9R4K+EpQadY2y2ZXTVkS7KY2Kuoho rPcdu8v80ATBdGKqI0xsp/GO8HTaXRg6iB7Z4JVd3mUcJ83ouMJzVCsCfshqtjbmCrNixW 4Ki2ftylX+JCf3syJ57iMfEW+C40/cuOC2LF9x2mdYCOw6eybYXUmPZFnLU/gQ== 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 4Tchq6319kzPZV; Sat, 17 Feb 2024 21:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41HLWol6020403; Sat, 17 Feb 2024 21:32:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HLWowS020400; Sat, 17 Feb 2024 21:32:50 GMT (envelope-from git) Date: Sat, 17 Feb 2024 21:32:50 GMT Message-Id: <202402172132.41HLWowS020400@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 8291858235d3 - stable/14 - LinuxKPI: Implement dev_dbg_once() macro 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8291858235d3e74fb02ebcdc2aa7f4d4cad2b6be Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=8291858235d3e74fb02ebcdc2aa7f4d4cad2b6be commit 8291858235d3e74fb02ebcdc2aa7f4d4cad2b6be Author: Vladimir Kondratyev AuthorDate: 2023-12-24 08:19:58 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-17 20:58:36 +0000 LinuxKPI: Implement dev_dbg_once() macro Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42795 (cherry picked from commit a01259965319897b836019f1d4dcf1b5a5a6ea1a) --- 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 df06b356e092..2135d365460b 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -235,6 +235,14 @@ show_class_attr_string(struct class *class, } \ } while (0) +#define dev_dbg_once(dev, ...) do { \ + static bool __dev_dbg_once; \ + if (!__dev_dbg_once) { \ + __dev_dbg_once = 1; \ + dev_dbg(dev, __VA_ARGS__); \ + } \ +} while (0) + #define dev_err_ratelimited(dev, ...) do { \ static linux_ratelimit_t __ratelimited; \ if (linux_ratelimited(&__ratelimited)) \