From owner-svn-src-head@freebsd.org Wed Dec 20 20:33:50 2017 Return-Path: Delivered-To: svn-src-head@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 4BC75EA31E9; Wed, 20 Dec 2017 20:33:50 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F02991766; Wed, 20 Dec 2017 20:33:49 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with ESMTPA id Rl3ceUPWcS7BpRl3deqAOB; Wed, 20 Dec 2017 13:33:43 -0700 X-Authority-Analysis: v=2.2 cv=NKylwwyg c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=ocR9PWop10UA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=QBFYB0sSn6BLKAkMk14A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 5226D99F; Wed, 20 Dec 2017 12:33:40 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id vBKKXdbF040804; Wed, 20 Dec 2017 12:33:39 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id vBKKXdbS040801; Wed, 20 Dec 2017 12:33:39 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201712202033.vBKKXdbS040801@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327037 - head/sys/dev/acpica In-Reply-To: Message from Warner Losh of "Wed, 20 Dec 2017 19:14:16 +0000." <201712201914.vBKJEG68087359@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 20 Dec 2017 12:33:39 -0800 X-CMAE-Envelope: MS4wfE76oorjWowxD4zx9B6SUlT/Eyyr/pjq6+UQ8RsskhIumz6lYQYCuAkKAocQiakfy+6v93r6fkexS0ZoDXRKXa9NjNPwUI6rYuVRLNwJ7izr72OSZ2G+ /YqZ2aDUXuoYZGzR3y4q6UOmRQPBS3cYb7FUCv/6IxfGnAXDN9iktp/dOtC0pWJiTu/TMHsX/DJgfypLWiubdvk/inOeaSG8fDLHyDMCcU/CirqnuZWX9mAY JCNM3hZfKovbsUst5ddXRrDErYO7OmZwr1nUhLdtluNnEupAzqnJJy/wlmyXuBUu X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Dec 2017 20:33:50 -0000 In message <201712201914.vBKJEG68087359@repo.freebsd.org>, Warner Losh writes: > Author: imp > Date: Wed Dec 20 19:14:16 2017 > New Revision: 327037 > URL: https://svnweb.freebsd.org/changeset/base/327037 > > Log: > Simplify the code a bit. > > Replace clumsy for(;;) { if (foo) break; ...} with simpler > while (!foo) { ... }. > > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D13546 > > Modified: > head/sys/dev/acpica/acpi.c > > Modified: head/sys/dev/acpica/acpi.c > ============================================================================= > = > --- head/sys/dev/acpica/acpi.c Wed Dec 20 19:14:11 2017 (r32703 > 6) > +++ head/sys/dev/acpica/acpi.c Wed Dec 20 19:14:16 2017 (r32703 > 7) > @@ -1014,10 +1014,7 @@ acpi_hint_device_unit(device_t acdev, device_t child, > * name to see if one's resources are a subset of this device. > */ > line = 0; > - for (;;) { > - if (resource_find_dev(&line, name, &unit, "at", NULL) != 0) > - break; > - > + while (resource_find_dev(&line, name, &unit, "at", NULL) == 0) { > /* Must have an "at" for acpi or isa. */ > resource_string_value(name, unit, "at", &s); > if (!(strcmp(s, "acpi0") == 0 || strcmp(s, "acpi") == 0 || > Would it make sense we upline this to reduce future MFV diffs? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.