From owner-p4-projects@FreeBSD.ORG Mon May 29 13:51:01 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A307B16AC61; Mon, 29 May 2006 13:51:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4BFF16AC49 for ; Mon, 29 May 2006 13:50:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F49E43D5F for ; Mon, 29 May 2006 13:50:49 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4TDnam4048819 for ; Mon, 29 May 2006 13:49:36 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4TDnZhD048816 for perforce@freebsd.org; Mon, 29 May 2006 13:49:35 GMT (envelope-from jhb@freebsd.org) Date: Mon, 29 May 2006 13:49:35 GMT Message-Id: <200605291349.k4TDnZhD048816@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 98070 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 13:51:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=98070 Change 98070 by jhb@jhb_mutex on 2006/05/29 13:48:39 Diff reductions with CVS and trim a useless else that only serves to obfuscate the code. Affected files ... .. //depot/projects/smpng/sys/kern/kern_linker.c#64 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_linker.c#64 (text+ko) ==== @@ -306,8 +306,8 @@ KLD_DPF(FILE, ("linker_file_register_modules: registering modules" " in %s\n", lf->filename)); - if (linker_file_lookup_set(lf, "modmetadata_set", &start, &stop, - NULL) != 0) { + if (linker_file_lookup_set(lf, "modmetadata_set", &start, + &stop, NULL) != 0) { /* * This fallback should be unnecessary, but if we get booted * from boot2 instead of loader and we are missing our @@ -581,8 +581,8 @@ KLD_DPF(FILE, ("linker_file_unload: module %p" " vetoes unload\n", mod)); return (error); - } else - MOD_XLOCK; + } + MOD_XLOCK; module_release(mod); } MOD_XUNLOCK; @@ -648,10 +648,10 @@ } /* - * Locate a linker set and its contents. This is a helper function to - * avoid linker_if.h exposure elsewhere. Note: firstp and lastp are - * really void **. This function is used in this file so we can avoid - * having lots of (void **) casts. + * Locate a linker set and its contents. This is a helper function to avoid + * linker_if.h exposure elsewhere. Note: firstp and lastp are really void **. + * This function is used in this file so we can avoid having lots of (void **) + * casts. */ int linker_file_lookup_set(linker_file_t file, const char *name, @@ -766,7 +766,7 @@ * * Note that we do not obey list locking protocols here. We really don't need * DDB to hang because somebody's got the lock held. We'll take the chance - * that the files list is inconsistent instead. + * that the files list is inconsistant instead. */ int @@ -1899,7 +1899,7 @@ int ver, error = 0, count; /* - * All files are dependent on /kernel. + * All files are dependant on /kernel. */ KLD_LOCK_ASSERT(); if (linker_kernel_file) { @@ -1952,8 +1952,7 @@ break; continue; } - error = linker_load_module(NULL, modname, lf, verinfo, - NULL); + error = linker_load_module(NULL, modname, lf, verinfo, NULL); if (error) { printf("KLD %s: depends on %s - not available\n", lf->filename, modname);