From owner-svn-src-all@freebsd.org Wed Jun 17 04:17:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67FE73420AE for ; Wed, 17 Jun 2020 04:17:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49msGN338Cz4FDT for ; Wed, 17 Jun 2020 04:17:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82b.google.com with SMTP id y1so522011qtv.12 for ; Tue, 16 Jun 2020 21:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/WAvljUKN7xCkvFdbA85nyl41BnO1X02Q2zDbGfEoO4=; b=C8hhhE3S5NvCknjZQdmWKd8SOKu5TVl9HA8QvB1jGgme1O7e3Rgdb7oIledWuUnIIg kyBfndoAVLCxPj/vuOgHnLxDcrOFCItRHYcDhcc1OBlfeMQKO6M5kjjGl0AV4bBa35pi lyADwrkAjvWTAVC9+Ckxo/tNYY1oRXgljUKkkGh5g8UxLEN7imjQGC13NNYDvrq9TpEQ KnnPc51SxAKeNW9GU48DXav2LTtlFuq/NaxbM4L7l+Won642lDN+4vwgDfJ7vYfx96ry KUZ956lULI/iu1S478lew2Z1RTf2HgtsU+uX0M/UJ0g015nEdMScA47BX+A+Unfo47UM +vzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/WAvljUKN7xCkvFdbA85nyl41BnO1X02Q2zDbGfEoO4=; b=NmGFqfr1rQMVHaVgTYptjUAwgPmunirxudNVunqeFI6Vt7Be86dhMSGo82tOv8tKd8 +HZFmbbmZ+j5d82LICj7KRrSJ6nENik+l3AHX2R8PkpyfSB/oFucJP8kfQlN/s29AeHn JfeCx0mgx949Ce0HEs8s1Bqa0uOzwjdvXldSHFlEvnCSisgQ1qNiHVli9ArGegJHXEqb nE9hXrKUIjHnbMY22BbQVQ7z4K3hzM375jdyaLl6OtFCEuX3fcL+6+zyO3x2VJQg0TGj VLZW3lFdIJXOSMyIjWDK3wPdXp8dUqFHmJW5448Av7Q6BNLuvuXfKqxhm5SEX+7ur7wF nDSA== X-Gm-Message-State: AOAM533bUPMMLC6BL/pWJrvhoGDUzzobMjEAfDRVwcYk57xQhhgEDm1y h5FFiCNjTJu6GATrfCSfFsj+/O43Zz0i9AR9cljg8A== X-Google-Smtp-Source: ABdhPJxb8etHLCOEJONXj2aic4dwsgLRbqMSAPcNAJBgUT+cwmJDMJV0v99sHqUV2aJjP4n/G0zH2gnkn+89MppWCT4= X-Received: by 2002:ac8:6f55:: with SMTP id n21mr24529700qtv.175.1592367419431; Tue, 16 Jun 2020 21:16:59 -0700 (PDT) MIME-Version: 1.0 References: <202006160705.05G753T4057972@repo.freebsd.org> <55903c38d363aef2a6f6d0075dd4526b86d51258.camel@freebsd.org> <8948411d5bb0ab7ffae4c9cba06bda7b8943e0cd.camel@freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 16 Jun 2020 22:16:48 -0600 Message-ID: Subject: Re: svn commit: r362217 - head/stand/common To: Ian Lepore Cc: Kristof Provost , Ed Maste , Toomas Soome , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 49msGN338Cz4FDT X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=C8hhhE3S; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::82b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.72 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.90)[-0.901]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.79)[-0.788]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.03)[-0.035]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82b:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 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, 17 Jun 2020 04:17:01 -0000 On Tue, Jun 16, 2020 at 9:53 PM Warner Losh wrote: > > > On Tue, Jun 16, 2020 at 8:33 PM Ian Lepore wrote: > >> On Tue, 2020-06-16 at 19:34 +0200, Kristof Provost wrote: >> > On 16 Jun 2020, at 19:11, Ed Maste wrote: >> > > On Tue, 16 Jun 2020 at 13:01, Ian Lepore wrote: >> > > > >> > > > As much as I prefer doing it this way, style(9) doesn't allow for >> > > > variable declarations inside a for() statement (or even inside a >> > > > local >> > > > block, which is just too 1980s for me, but it is still our >> standard). >> > > >> > > Perhaps it's time to update style(9) to at least permit these uses, = as >> > > we've done with the blank line at the beginning of functions with no >> > > local variables, and with braces around single-line bodies. >> > >> > We have 431 instances of `for (int i` in sys alone. It=E2=80=99s not s= o much a >> > question of allowing it as acknowledging reality at this point. >> > >> > Best regards, >> > Kristof >> >> Hmm, so we do. If you weed out sys/contrib, and device drivers >> contributed by vendors, the number is a lot smaller, but still big >> enough that we should just change the rules I think. >> > > We should definitely just change the rules. There's no point in > prohibiting it. Contributors have already voted with their feet > > diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 > index 4e801bbcbe70..fd23d573eb00 100644 > --- a/share/man/man9/style.9 > +++ b/share/man/man9/style.9 > @@ -592,8 +592,6 @@ not > Parts of a > .Ic for > loop may be left empty. > -Do not put declarations > -inside blocks unless the routine is unusually complicated. > .Bd -literal > for (; cnt < 15; cnt++) { > stmt1; > > Though the block doesn't start until { so int i; in the commit technicall= y > doesn't violate this rule. We violate it in dozens of other ways than thi= s. > Re-reading the thread, it seems there's a consensus to change. https://reviews.freebsd.org/D25312 > Warner > > >