From owner-svn-src-all@freebsd.org Fri Apr 15 06:12:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2126EAEC7EF; Fri, 15 Apr 2016 06:12:18 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D44C1BAE; Fri, 15 Apr 2016 06:12:18 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 8F8C89F5; Thu, 14 Apr 2016 23:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1460700737; bh=bh4i5qFuGY759sx9DrTbAeVRO0QOdgH3ZipzX3ymAeo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=c0FnTCqLjwMWnweRPTLUjYqmtBn/rpbnuQJXNc4B0W3YBK4iwTvS9nv7myQ4ssqGd ADjdFxvgC76r9TLOBZ70ZD0VjBgiX0E4pGJDx7eXzflTqDDe9x46+6gLa8ej/UaQ/p smnqT6oHzcKlgXtzA85Qmw6hluNOG0d8Z4FijUuM= From: Peter Wemm To: svn-src-head@freebsd.org Cc: Pedro Giffuni , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r297974 - in head/sys: i386/i386 i386/ibcs2 x86/x86 Date: Thu, 14 Apr 2016 23:12:11 -0700 Message-ID: <208673032.ZrzIEQ39cc@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <570FCFE5.3010304@FreeBSD.org> References: <201604141704.u3EH47Vv063976@repo.freebsd.org> <570FCFE5.3010304@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5472288.G5GOYcMBt7"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 06:12:18 -0000 --nextPart5472288.G5GOYcMBt7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Thursday, April 14, 2016 12:14:13 PM Pedro Giffuni wrote: > On 04/14/16 12:04, Pedro F. Giffuni wrote: > > Author: pfg > > Date: Thu Apr 14 17:04:06 2016 > > New Revision: 297974 > > URL: https://svnweb.freebsd.org/changeset/base/297974 > >=20 > > Log: > > x86: for pointers replace 0 with NULL. > > =20 > > These are mostly cosmetical, no functional change. > > =20 > > Found with devel/coccinelle. > >=20 > > Modified: > > head/sys/i386/i386/db_disasm.c > > head/sys/i386/i386/pmap.c > > head/sys/i386/ibcs2/imgact_coff.c > > head/sys/x86/x86/nexus.c >=20 > ... >=20 > > Modified: head/sys/i386/i386/pmap.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > > =3D=3D=3D=3D --- head/sys/i386/i386/pmap.c=09Thu Apr 14 16:32:27 20= 16=09 (r297973) > > +++ head/sys/i386/i386/pmap.c=09Thu Apr 14 17:04:06 2016=09(r297974= ) > > @@ -269,15 +269,15 @@ pt_entry_t *CMAP3; > >=20 > > static pd_entry_t *KPTD; > > caddr_t ptvmmap =3D 0; > > caddr_t CADDR3; > >=20 > > -struct msgbuf *msgbufp =3D 0; > > +struct msgbuf *msgbufp =3D NULL; > >=20 > > /* > > =20 > > * Crashdump maps. > > */ > > =20 > > static caddr_t crashdumpmap; > >=20 > > -static pt_entry_t *PMAP1 =3D 0, *PMAP2; > > -static pt_entry_t *PADDR1 =3D 0, *PADDR2; > > +static pt_entry_t *PMAP1 =3D NULL, *PMAP2; > > +static pt_entry_t *PADDR1 =3D NULL, *PADDR2; > >=20 > > #ifdef SMP > > static int PMAP1cpu; > > static int PMAP1changedcpu; >=20 > Hmm .. being static, there is no need to initialize these. Several eons ago, at least some of these were initialized to force them= into=20 the data section so that they had known or safe values before the bss z= ero=20 pass. I don't know if that was ever an issue on freebsd, or just the u= pstream=20 code. You'd have to look well back into ancient 2.0 or earlier vintage= code. =20 I have a vague memory that our early a.out kernel had to zero its own b= ss=20 because the early a.out boot blocks didn't, and these variables would h= ave=20 been caught in the crossfire. Or something.. In any case, I'd be surprised if the compiler didn't put them in the bs= s=20 section these days anyway. At least without cc -ffreestanding, anyway.= =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart5472288.G5GOYcMBt7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJXEIY8AAoJEDXWlwnsgJ4EZf4H/0tsmQljb6s5XIxcOAHzAej8 rQU4i5Ka5jjzXVf044fjjKbQptAtJPr3C331VT+58iwxcDZECoy0V/v/UWKMaLW7 yB/216cLvMsPv5611tfDndLJ3peDVv9sixEgvVk9s3DYFCerbLg8N0PbmfeJxFSg 7YWPCdeVn++c8RRumB4Tc0DffE1QcU9KMoHih1My3Mkdv1kygdVO3SRi8yPLI66T 70rD/RHlGBM+76CMzFNfE4nZp8HmBmzmxSmFy/9kPhdxoa3wpNHcS2Mgg/d7WcLz z8g4dYgJxKAPiQA8ULHtD0Lrs87d/T5WOfHioq/S+9U/CRibk7YvHyK35FKEVNo= =BF9J -----END PGP SIGNATURE----- --nextPart5472288.G5GOYcMBt7--