From nobody Tue Oct 15 21:18:06 2024
X-Original-To: dev-commits-src-main@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 4XSn4v2W9Hz5Z1hL;
	Tue, 15 Oct 2024 21:18:07 +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 "R11" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4XSn4v0sF1z54sg;
	Tue, 15 Oct 2024 21:18:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1729027087;
	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=tjXdPEXruTIbJy1sq/Or3JiMZ6F90ExMgf+kQ8IT6mo=;
	b=VSD/xXDK54FmS//yEVwPMyIOysc4kcU6UvSOZ8DOGH+/oronT2q1Ez/vtwRoH2SQ3EhLVt
	jQ6a48t9K5nDVNoJTYP78OX8IZjF1XzSq/FMyjHOgGUYjXy1X8JiwAnp1P6210++lOYHgW
	tElc9DhifEUUnl9vmMErnHLq0/Lo1dy9vguk1Wo1FdEc25c5wA8lU0jZCVQ9b+6+RMO2KE
	kbDvnEet7RoxMh4w86Bxe4tPG0gRs9CzoxZxk1lLVGD28kgINALXieQDu1d8DJ9WGheGU+
	HmTlj9IinaYZx5KElpA+MPvEVTc+hZmi3J1ZTrfkMwx7GYEZPSuNP8MksjlAcA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1729027087;
	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=tjXdPEXruTIbJy1sq/Or3JiMZ6F90ExMgf+kQ8IT6mo=;
	b=BTkNfRyMvQE1KGvHv+R1JuyKO7wsPKcpuVYVeoi5sNjXiyQ7B5mZoUZYefTYmKh9WbVy5U
	x+vHvHpABISA1s6zPGxjoJmRd0ev2qv/5bEMywwSnLlZYqHxhobZyUbPqWccR8D1D4FRRn
	sIYhBlItJb4fAAyTnpU/xP+0vLeJfFpFO7Lp2K5jYTHlfIbLbPFL6TohiRWgZABZPSjZbQ
	KBzxxt6M7UWOJVKdfi2yN2mw0sXMN5do8xRsNXw8dSkpr7iQVMJmjQdt+sxPARXjjpPkUR
	i+I8n1/OqMtXeteXZlXuNlXsuB3pu2szj6mIkfxsB7vC0jO6fF6miJK8sEO0JA==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729027087; a=rsa-sha256; cv=none;
	b=eUal1JsMo9WgKCgqaYwAdlMZKv6IIoWPtIe9ANTgcj3fsYNhiWiVTSi0uT0E41RtB7gB+p
	hab+7Y3NuhVA/HM3kDHCDhZ7w5UdpdVixN24qoAWOmzXlGGHYZvd3i1QAjsxKWt4TIOVbz
	cNMSJy3MYx13G6Jzk4O3jtGJkUIPRLVCeTRQBmUSDCjf+odKyiXlfGZYe4hjOzem1NE2m1
	F4Aa08EoKOZRTGi1aZLld9S6wYxdsLiC08A8Sa5gbOyyvG8qh8DWkfnEhgnJ8J0ohzr/BG
	eR/sgbnxRxnko+jYI8F7EBAOA7ZBVwQ/oqJ9qC2V+en+hvz1gOSK/RnkrXsuCg==
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 4XSn4v0SZPzdZ2;
	Tue, 15 Oct 2024 21:18:07 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FLI68Q021658;
	Tue, 15 Oct 2024 21:18:06 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FLI6iR021655;
	Tue, 15 Oct 2024 21:18:06 GMT
	(envelope-from git)
Date: Tue, 15 Oct 2024 21:18:06 GMT
Message-Id: <202410152118.49FLI6iR021655@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-main@FreeBSD.org
From: Warner Losh <imp@FreeBSD.org>
Subject: git: 16672453f125 - main - cdefs: Add __deprecated
List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main
List-Help: <mailto:dev-commits-src-main+help@freebsd.org>
List-Post: <mailto:dev-commits-src-main@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org>
X-BeenThere: dev-commits-src-main@freebsd.org
Sender: owner-dev-commits-src-main@FreeBSD.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: imp
X-Git-Repository: src
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 16672453f12586703f1c51d909bd1900691bf884
Auto-Submitted: auto-generated

The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=16672453f12586703f1c51d909bd1900691bf884

commit 16672453f12586703f1c51d909bd1900691bf884
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-10-15 19:49:53 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-10-15 21:05:49 +0000

    cdefs: Add __deprecated
    
    Add __deprecated decorator. This is for a deprecated interface. copystr
    is tagged with this today in copy(9), but don't actually provide it or
    use it. copystr is a #define so adding it will have to wait.
    
    LinuxKPI was defining this away completely in compiler.h. Since this is
    shared between Linux KPI consumers and OpenZFS, if it's already defined,
    use the FreeBSD sys/cdefs.h version, otherwise define it away. For
    OpenZFS this will retain it, while for Linux KPI it will tend to drop it
    (I think always, but I didn't look at everything).
    
    Sponsored by:           Netflix
    Reviewed by:            jhb, emaste
    Differential Revision:  https://reviews.freebsd.org/D46137
---
 share/man/man9/cdefs.9                              | 6 +++++-
 sys/compat/linuxkpi/common/include/linux/compiler.h | 2 ++
 sys/sys/cdefs.h                                     | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9
index 8c127694ab6e..3d1f6159bc60 100644
--- a/share/man/man9/cdefs.9
+++ b/share/man/man9/cdefs.9
@@ -85,8 +85,12 @@ linkage.
 .It Sy __weak_symbol Ta Declare the symbol to be a weak symbol
 .It Sy __dead2 Ta Function will not return
 .It Sy __pure2 Ta Function has no side effects
-.It Sy __unused Ta To Variable may be unused (usually arguments), so do not warn about it
+.It Sy __unused Ta To Variable may be unused (usually arguments), so do not
+warn about it
 .It Sy __used Ta Function really is used, so emit it even if it appears unused.
+.It Sy __deprecated Ta Function interface has been deprecated, and clients
+should migrate to a new interface.
+A warning will be issued for clients of this interface.
 .It Sy __packed Ta \&Do not have space between structure elements for natural alignment.
 Used when communicating with external protocols.
 .It Sy __aligned(x) Ta Specify in bytes the minimum alignment for the specified field, structure or variable
diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h
index c82b9acd53fb..fb5ad3bf4fe4 100644
--- a/sys/compat/linuxkpi/common/include/linux/compiler.h
+++ b/sys/compat/linuxkpi/common/include/linux/compiler.h
@@ -48,7 +48,9 @@
 #define __cond_lock(x,c)		(c)
 #define	__bitwise
 #define __devinitdata
+#ifndef	__deprecated
 #define	__deprecated
+#endif
 #define __init
 #define	__initconst
 #define	__devinit
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 9c4c8e0a324a..353090db6995 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -154,6 +154,7 @@
 #define	__pure2		__attribute__((__const__))
 #define	__unused	__attribute__((__unused__))
 #define	__used		__attribute__((__used__))
+#define __deprecated	__attribute__((__deprecated__))
 #define	__packed	__attribute__((__packed__))
 #define	__aligned(x)	__attribute__((__aligned__(x)))
 #define	__section(x)	__attribute__((__section__(x)))