From owner-svn-src-all@freebsd.org Wed Dec 20 20:44:56 2017 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 76DC3EA3CFF for ; Wed, 20 Dec 2017 20:44:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 369AA245B for ; Wed, 20 Dec 2017 20:44:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22a.google.com with SMTP id k202so10449617ioe.10 for ; Wed, 20 Dec 2017 12:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cc/BVmZQofRbDYfMdBVVti9zcwPqoiKYGlUAyIBqJS0=; b=ocPzECtYB822T3M/+5ikvhMijaDNmK6lNFCZdGEQ80v+V0jjQG79/y5gvavIkoTqLJ gfQq9ktNpSD74Cw9y5ojvctTjemh2/GCpP3cZR+8Y0cH1nOEpg2zxaHdLFuozmrv5uQ/ e74m+AyMjoNRZtkYwuU3oyacj9uigQic/EpUwXOsLz/TJ3Ai3RuLsVGiB76wYgO1iGFb H9OM8LWW6ZwqU+VFnbvqjzXmqHt+Ue8JSLQZYpbPNPMwZQxrKwRdjOpwU5N3qWeVXsQs xiTsvXSc84TTqYl1zsuqUgMRdeGC6M0LZ8lq399MCTdgEX/G2p9jcmkOJ8Q429dES7dv IzAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cc/BVmZQofRbDYfMdBVVti9zcwPqoiKYGlUAyIBqJS0=; b=Lirar8FfQXIVWeQK+BukHVIwnjS1isGV48CB1S/PQaJvH+4QteiRgG37CCHXBB8xYr 1yRXkJ6mP0pmWyftaCRss3Me9bOOOfQfwdjiOSKVsNMczEVrffKF2xSS9tABNLhAb0MX wbN3l6OkYxEOi9tB6uivZw1ZNZvexMXmCEB+/KnKd+xAJbZzd02xg7p7UyiBQjZCXqcY zrV1g3JWSckHGkHUArosdrc0ikf/6VS7XhskWcB70Vn9pwSxjHn1yRm0zPp/KkzCfMgp d4fERg8UzaHY1qhOU/9WN1sodstGwJCU00oh1cX/HwFETG/WUAReIb1y9T8Y9K8b6eZ8 bobg== X-Gm-Message-State: AKGB3mLVQsRnThrHH9zsfyMPmEEBJsh4GBwvSigQD9uiemV62rFwEw2j fF1YnJP0MeGi2TanEXrHJn644kKMs5qLPlXrZ/JDag== X-Google-Smtp-Source: ACJfBovvDj0jk2P92ZKFgof/rBBVYUekRLP9ZRPeha/Mbw0fFlueoJ4wQgEpmmYxGUREi4Hi0cLZhWDK+jZxfpSyS2s= X-Received: by 10.107.149.5 with SMTP id x5mr7442458iod.136.1513802695221; Wed, 20 Dec 2017 12:44:55 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 20 Dec 2017 12:44:54 -0800 (PST) X-Originating-IP: [2607:fb90:6e9a:9802:7050:335d:139f:7109] Received: by 10.79.108.204 with HTTP; Wed, 20 Dec 2017 12:44:54 -0800 (PST) In-Reply-To: <201712202033.vBKKXdbS040801@slippy.cwsent.com> References: <201712201914.vBKJEG68087359@repo.freebsd.org> <201712202033.vBKKXdbS040801@slippy.cwsent.com> From: Warner Losh Date: Wed, 20 Dec 2017 13:44:54 -0700 X-Google-Sender-Auth: dsnR-_NQXjegxJExDgwo2E2lbGk Message-ID: Subject: Re: svn commit: r327037 - head/sys/dev/acpica To: Cy Schubert Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 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: Wed, 20 Dec 2017 20:44:56 -0000 On Dec 20, 2017 1:33 PM, "Cy Schubert" wrote: 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? No. This is 100% FreeBSD code. Warner -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.