From nobody Wed Apr 03 06:25:26 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 4V8ZVv1bdxz5G6yZ; Wed, 3 Apr 2024 06:25:27 +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 4V8ZVv0hqbz4hkQ; Wed, 3 Apr 2024 06:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712125527; 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=oGZJ81AjUV4p+kAzy2pm+yoVoqeAAiDxN/3qcriwjAo=; b=DfPk7ptaciiyx9WgrL68ok2MKCyX19WgvyWgYq8ME+kIIPa9F3Gmb8ggdrf7E5us+1Mi2i orwKkm8WrREcI3O800RQHvwM2yrqWm05MOlAm8S05OuAH5PV5zEzlXPMqrQkyBjOuE0K+L Ks1/W9HNSrBsi8RO14cGwYexRujTcqTqmCb3aUVOfVE2AmiLrokFrdJ6tE4A43Q2f3brRm c38Cn7uyjXKmewTHxik9LQAsYGGuGRjHVF23yySL4wgzyew8vGBRTD+MU2VsYBuXVrlAfd Pcap6uK2atnfEUE9NguUdmPLFri7ZYMHISDUQU5NS+5kGkd5beazX7QClMx6FQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712125527; a=rsa-sha256; cv=none; b=GONl+ON4YG2RSLs7UYgooKVTnz6PNOq8/bRcqr9up/KvmrVRih6w0U7ulqk9nZNYTK1Grz 9Y7fkeY9evRxnUTpkwCmw5MyQlM5Y9TnCABqwUMctwOVU4++DgYUB42ZEgJ0774tf1OvsM h7Wf59VX0HkUW6MqTtSMtMLgFrWZTLEh+ywC0Dc8xOF2mVzUZuSW5ML8k/Xsj+yBixUUOz lGJjJ8U+VdpGVRNXYcS1HlDDgVNX+xP8skDfLMJhkIyDiWYQk31vcpEhTj2DcCU60cil8S xIa/ClRUVqRSjDew1IN3LxnQbM8vrjJPbZEtJQta8VuQ6Cc3ruAKUxD/b6o1Tw== 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=1712125527; 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=oGZJ81AjUV4p+kAzy2pm+yoVoqeAAiDxN/3qcriwjAo=; b=V+7brZ03V0Ys2Cqsq1ceA2noKSeQfdyj6gXywVeK7cWNtDrZWoFHHxJYysj/dUzPrk8G5w pPsX/GzTwmgQXMrWFRm4I/QSN6tCRgJ3PFA4urj4CsFXBsOI6Bejt4DWMOCBICQcV967Ox FW5acB0q+ltxoSxzgT4JVP30Nj0QzpxkjtZFD6y/6aPwsSPJlWA/ixBrqPUVumdZ5o82gu rQcdxwOQ8hXGnZ/yLw9ZH/1DH7fReSZj2GBKJNMZ4Fz9P/tFrBnh+67PJfeZt9Jlh6/R3i m5HhUgCDT9AyXQeyUrTqPy4Q5sTJ9KJCpFUHSCUCsHMcbv5Uj9zNaOMhW3srLQ== 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 4V8ZVv0BcpzLsg; Wed, 3 Apr 2024 06:25:27 +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 4336PQKe096579; Wed, 3 Apr 2024 06:25:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4336PQ9u096576; Wed, 3 Apr 2024 06:25:26 GMT (envelope-from git) Date: Wed, 3 Apr 2024 06:25:26 GMT Message-Id: <202404030625.4336PQ9u096576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 41d9d301fbd0 - stable/14 - kern linker: Make linker_file_add_dependency() void 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 41d9d301fbd091eee159d8e6d70b60ff7d67c349 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=41d9d301fbd091eee159d8e6d70b60ff7d67c349 commit 41d9d301fbd091eee159d8e6d70b60ff7d67c349 Author: Zhenlei Huang AuthorDate: 2024-03-27 04:02:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-04-03 06:15:15 +0000 kern linker: Make linker_file_add_dependency() void The only possible return value has been zero since cee9542d51f0. No functional change intended. Reviewed by: dfr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44507 (cherry picked from commit 1c7307cf6763a295ea9896be9f197d40511c77ed) --- sys/kern/kern_linker.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index 6ac2e694a4cf..2b220295f78e 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -144,7 +144,7 @@ struct modlist { typedef struct modlist *modlist_t; static modlisthead_t found_modules; -static int linker_file_add_dependency(linker_file_t file, +static void linker_file_add_dependency(linker_file_t file, linker_file_t dep); static caddr_t linker_file_lookup_symbol_internal(linker_file_t file, const char* name, int deps); @@ -779,7 +779,7 @@ linker_ctf_get(linker_file_t file, linker_ctf_t *lc) return (LINKER_CTF_GET(file, lc)); } -static int +static void linker_file_add_dependency(linker_file_t file, linker_file_t dep) { linker_file_t *newdeps; @@ -792,7 +792,6 @@ linker_file_add_dependency(linker_file_t file, linker_file_t dep) KLD_DPF(FILE, ("linker_file_add_dependency:" " adding %s as dependency for %s\n", dep->filename, file->filename)); - return (0); } /* @@ -1721,10 +1720,7 @@ restart: TAILQ_FOREACH_SAFE(lf, &depended_files, loaded, nlf) { if (linker_kernel_file) { linker_kernel_file->refs++; - error = linker_file_add_dependency(lf, - linker_kernel_file); - if (error) - panic("cannot add dependency"); + linker_file_add_dependency(lf, linker_kernel_file); } error = linker_file_lookup_set(lf, MDT_SETNAME, &start, &stop, NULL); @@ -1746,10 +1742,7 @@ restart: if (lf == mod->container) continue; mod->container->refs++; - error = linker_file_add_dependency(lf, - mod->container); - if (error) - panic("cannot add dependency"); + linker_file_add_dependency(lf, mod->container); } } /* @@ -2212,11 +2205,8 @@ linker_load_module(const char *kldname, const char *modname, error = ENOENT; break; } - if (parent) { - error = linker_file_add_dependency(parent, lfdep); - if (error) - break; - } + if (parent) + linker_file_add_dependency(parent, lfdep); if (lfpp) *lfpp = lfdep; } while (0); @@ -2245,9 +2235,7 @@ linker_load_dependencies(linker_file_t lf) sx_assert(&kld_sx, SA_XLOCKED); if (linker_kernel_file) { linker_kernel_file->refs++; - error = linker_file_add_dependency(lf, linker_kernel_file); - if (error) - return (error); + linker_file_add_dependency(lf, linker_kernel_file); } if (linker_file_lookup_set(lf, MDT_SETNAME, &start, &stop, NULL) != 0) @@ -2288,9 +2276,7 @@ linker_load_dependencies(linker_file_t lf) if (mod) { /* woohoo, it's loaded already */ lfdep = mod->container; lfdep->refs++; - error = linker_file_add_dependency(lf, lfdep); - if (error) - break; + linker_file_add_dependency(lf, lfdep); continue; } error = linker_load_module(NULL, modname, lf, verinfo, NULL);