From nobody Tue Jan  2 00:42:03 2024
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 4T3vF768x7z560Jt;
	Tue,  2 Jan 2024 00:42: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 4T3vF74cg2z3Pq8;
	Tue,  2 Jan 2024 00:42:03 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1704156123;
	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=cBKkrItLiO9LSdyMyIBminkI0TNOOGyiP8xIUxfBlHc=;
	b=ImApL9YRw58M1oFXlJNkJ0IS/GzZP39syYAJyqB8VxP6oL+JPDYkRqrpIIRbb/1PHICgie
	g8vGwXY7wFC5sde1QZzsbsHhCCVfUDjotFBBK/9UpTc9ny1zm8v3/63Rh65TqU0ORoqtWI
	7cSqBNmTl/D0duS2Anbrx6NwtRL8hOdZPk0VfyLPpk755qvioqMrb9R9EmFYYOQ3+08A0H
	m5nBObA2120FPeLm2+sz78yWNj/lj+mK4iSQlCbKjGVlNcJ6WKVEH1UXn2y8+VJtSOtIEx
	tzOJHMxtozrpK9TusmSPZVFZdwXqCmPX4cMY4UymhHUj8nnbr9ij2GKZkkRMTw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704156123; a=rsa-sha256; cv=none;
	b=b3bGoSS/ItEVcyy7owyi5CeOxH4U+VZhbMCZns46mQubbE3fNwOeammQOMYEkRftipDij2
	IFIv3aDoa44J4wDXc65e+x4qO6qTnb0zZPk2kaOGMwooUafCQOHpBXyAhPcHE+OujZhZ3V
	7BTY8WNGRXHpf8sRNH4+pd+vnXJnnaN/B3cz89neZVe7F6PDu97IcEL1K+0oYw0YeyjIQk
	3tgjUcoXUt65FGWZzIV6va3I9/AH9BvbcOOOzoCdPRPlh1d1xmq82n/kF0L82zcgrrSP/y
	lUa6BUKKqHLBGQB1aVl+nwvfqnFOo9bE8kXP3zuAlzls7ucnVjzdKSW/aVdffQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1704156123;
	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=cBKkrItLiO9LSdyMyIBminkI0TNOOGyiP8xIUxfBlHc=;
	b=rgwl44kjDFGVdTNF6hgRtbwZ3DtwqVQSvYtTgMvDadIW+UZLtknC9lBZvq0CLgvtQERMeY
	znhS3FCXAyJOj1O4AK4XduA0oh8RotxbQOcQM/X4DJ3oWoZK5q77Vdov02I3zGmok+qJ6+
	RMlwqUXxYjA54NLd0WwuTnu6mekTDZu8gzxIe8CRbGdooW37izpo7F6rTTTSY4dPK0yYT/
	NAvvSkDIrjoiK6Ohc3VIQR3J+C3pQVUNq0gxAVW2coWa0kl7EAnOWDF8yJlk+QDt5kFYvT
	zRMKrbF64d5Xc7QiQW0BQUFTtpVpYAKHNNjjVNPTavzlQHPOdhFxNvxOV81ZtQ==
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 4T3vF71CHbzfnK;
	Tue,  2 Jan 2024 00:42:03 +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 4020g3xG097167;
	Tue, 2 Jan 2024 00:42:03 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4020g3xN097164;
	Tue, 2 Jan 2024 00:42:03 GMT
	(envelope-from git)
Date: Tue, 2 Jan 2024 00:42:03 GMT
Message-Id: <202401020042.4020g3xN097164@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Konstantin Belousov <kib@FreeBSD.org>
Subject: git: dc0bf449c2e8 - stable/14 - ofed: use ANSI C functions
  definitions in opensm/sm.c
List-Id: Commits to the stable branches of the FreeBSD src repository <dev-commits-src-branches.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: <mailto:dev-commits-src-branches+help@freebsd.org>
List-Post: <mailto:dev-commits-src-branches@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-branches+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-branches+unsubscribe@freebsd.org>
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: kib
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/14
X-Git-Reftype: branch
X-Git-Commit: dc0bf449c2e85b17e10a1e179d186662fb8783aa
Auto-Submitted: auto-generated

The branch stable/14 has been updated by kib:

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

commit dc0bf449c2e85b17e10a1e179d186662fb8783aa
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-12-26 19:16:49 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-01-02 00:41:39 +0000

    ofed: use ANSI C functions definitions in opensm/sm.c
    
    (cherry picked from commit bf7830d79dd02a84225c93130c2dce68e0a541d6)
---
 contrib/ofed/opensm/opensm/st.c | 71 ++++++++++++-----------------------------
 1 file changed, 21 insertions(+), 50 deletions(-)

diff --git a/contrib/ofed/opensm/opensm/st.c b/contrib/ofed/opensm/opensm/st.c
index c2ee01474c23..7dba30644d61 100644
--- a/contrib/ofed/opensm/opensm/st.c
+++ b/contrib/ofed/opensm/opensm/st.c
@@ -174,7 +174,7 @@ static int new_size(int size)
 static int collision = 0;
 static int init_st = 0;
 
-static void stat_col()
+static void stat_col(void)
 {
 	FILE *f = fopen("/var/log/osm_st_col", "w");
 	fprintf(f, "collision: %d\n", collision);
@@ -182,9 +182,7 @@ static void stat_col()
 }
 #endif
 
-st_table *st_init_table_with_size(type, size)
-struct st_hash_type *type;
-size_t size;
+st_table *st_init_table_with_size(struct st_hash_type *type, size_t size)
 {
 	st_table *tbl;
 
@@ -208,8 +206,7 @@ size_t size;
 	return tbl;
 }
 
-st_table *st_init_table(type)
-struct st_hash_type *type;
+st_table *st_init_table(struct st_hash_type *type)
 {
 	return st_init_table_with_size(type, 0);
 }
@@ -219,8 +216,7 @@ st_table *st_init_numtable(void)
 	return st_init_table(&type_numhash);
 }
 
-st_table *st_init_numtable_with_size(size)
-size_t size;
+st_table *st_init_numtable_with_size(size_t size)
 {
 	return st_init_table_with_size(&type_numhash, size);
 }
@@ -230,14 +226,12 @@ st_table *st_init_strtable(void)
 	return st_init_table(&type_strhash);
 }
 
-st_table *st_init_strtable_with_size(size)
-size_t size;
+st_table *st_init_strtable_with_size(size_t size)
 {
 	return st_init_table_with_size(&type_strhash, size);
 }
 
-void st_free_table(table)
-st_table *table;
+void st_free_table(st_table *table)
 {
 	register st_table_entry *ptr, *next;
 	int i;
@@ -276,10 +270,7 @@ st_table *table;
   }\
 } while (0)
 
-int st_lookup(table, key, value)
-st_table *table;
-register st_data_t key;
-st_data_t *value;
+int st_lookup(st_table *table, st_data_t key, st_data_t *value)
 {
 	unsigned int hash_val, bin_pos;
 	register st_table_entry *ptr;
@@ -315,10 +306,7 @@ do {\
   table->num_entries++;\
 } while (0);
 
-int st_insert(table, key, value)
-register st_table *table;
-register st_data_t key;
-st_data_t value;
+int st_insert(st_table *table, st_data_t key, st_data_t value)
 {
 	unsigned int hash_val, bin_pos;
 	register st_table_entry *ptr;
@@ -335,10 +323,7 @@ st_data_t value;
 	}
 }
 
-void st_add_direct(table, key, value)
-st_table *table;
-st_data_t key;
-st_data_t value;
+void st_add_direct(st_table *table, st_data_t key, st_data_t value)
 {
 	unsigned int hash_val, bin_pos;
 
@@ -347,8 +332,7 @@ st_data_t value;
 	ADD_DIRECT(table, key, value, hash_val, bin_pos);
 }
 
-static void rehash(table)
-register st_table *table;
+static void rehash(st_table *table)
 {
 	register st_table_entry *ptr, *next, **new_bins;
 	int i, old_num_bins = table->num_bins, new_num_bins;
@@ -376,8 +360,7 @@ register st_table *table;
 	table->bins = new_bins;
 }
 
-st_table *st_copy(old_table)
-st_table *old_table;
+st_table *st_copy(st_table *old_table)
 {
 	st_table *new_table;
 	st_table_entry *ptr, *entry;
@@ -416,10 +399,7 @@ st_table *old_table;
 	return new_table;
 }
 
-int st_delete(table, key, value)
-register st_table *table;
-register st_data_t *key;
-st_data_t *value;
+int st_delete(st_table *table, st_data_t *key, st_data_t *value)
 {
 	unsigned int hash_val;
 	st_table_entry *tmp;
@@ -460,11 +440,8 @@ st_data_t *value;
 	return 0;
 }
 
-int st_delete_safe(table, key, value, never)
-register st_table *table;
-register st_data_t *key;
-st_data_t *value;
-st_data_t never;
+int st_delete_safe(st_table *table, st_data_t *key, st_data_t *value,
+    st_data_t never)
 {
 	unsigned int hash_val;
 	register st_table_entry *ptr;
@@ -499,9 +476,7 @@ static int delete_never(st_data_t key, st_data_t value, st_data_t never)
 	return ST_CONTINUE;
 }
 
-void st_cleanup_safe(table, never)
-st_table *table;
-st_data_t never;
+void st_cleanup_safe(st_table *table, st_data_t never)
 {
 	int num_entries = table->num_entries;
 
@@ -509,10 +484,9 @@ st_data_t never;
 	table->num_entries = num_entries;
 }
 
-void st_foreach(table, func, arg)
-st_table *table;
-int (*func) (st_data_t key, st_data_t val, st_data_t arg);
-st_data_t arg;
+void st_foreach(st_table *table,
+    int (*func)(st_data_t key, st_data_t val, st_data_t arg),
+    st_data_t arg)
 {
 	st_table_entry *ptr, *last, *tmp;
 	enum st_retval retval;
@@ -544,8 +518,7 @@ st_data_t arg;
 	}
 }
 
-static int strhash(string)
-register const char *string;
+static int strhash(const char *string)
 {
 	register int c;
 
@@ -578,14 +551,12 @@ register const char *string;
 #endif
 }
 
-static int numcmp(x, y)
-void *x, *y;
+static int numcmp(void *x, void *y)
 {
 	return (st_ptr_t) x != (st_ptr_t) y;
 }
 
-static st_ptr_t numhash(n)
-void *n;
+static st_ptr_t numhash(void *n)
 {
 	return (st_ptr_t) n;
 }