From nobody Fri Sep 12 14:52:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cNcpd2xrQz67XVN for ; Fri, 12 Sep 2025 14:52:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cNcpc2PR9z4718 for ; Fri, 12 Sep 2025 14:52:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-b52047b3f19so1466949a12.2 for ; Fri, 12 Sep 2025 07:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1757688741; x=1758293541; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XuEJfISOqIEyGUaFSJ3zKazh55M3/7ylenMu5ftrbaY=; b=iX5A0cYKoVkFxef+t1V8zRJbiPIIA6iKWPUZMA1STeMaBHP4kUmV5mUGcLJcBQKqqn jlahZKN47kdQrYmMA4B+zPIokUW7i/sqZO3ibA/FdXSEnlBfamleKZ7hqYq835oDpbA+ uDBZVHWbYVRSo2OxYG2gCM32eTWnj7grbmDOl1N0PJUNn+TDrb8CiLRBMvxoBhU9+JIF MzbM5uZPkIODIDsfU9ekwTUnuSEn/wo7wfHM3ctbNhaDF9yhSQrXHip8LusXYihxjgjg 2fTbkyVCtF8NsxP7ywBxFjujxdFppGtBxYABMYgRLL9MOHRpew8IxF18k4X8lLWCiEq7 bN0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757688741; x=1758293541; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XuEJfISOqIEyGUaFSJ3zKazh55M3/7ylenMu5ftrbaY=; b=htM3EKfz62P7pO50tJxejcrIwxd0C1APs34Bq/M+GnKhLqqJAV6Jb457ZjbPia7VXe /65iDz3iLqoXy1+fOXsdHC1Dp++s7tEOL22ieAccnXD1Paz7XJTIqSlhu2rOplsSzj/B t3QlVKCohFf6R2xj85t7mE7S0Urz+QNJLF2Ns9f6iuy5uowwgNS84v1JD4H4zTsrDdU/ zejtaYQd5XLIiJjc2DcgsSqwXQ7swo0PxGKJBL/4S0pWY5T2DrmZVCjyIOx98BnJzWO0 2MmXLWsRlqXOISzmqsIDzTkPu1sRKB/0MoyJ7Vx1Zmrt/dpqdc8njh7DrvUagweSOK23 5VZA== X-Forwarded-Encrypted: i=1; AJvYcCUK8z4yaBMiI2g/sDGCBNS2P0r2jBEYPRxTJjDWkLJnloZm2IC/Tht7ayMcYlXN91QugT1YurjelAie2f1Qy9gEYTMXhg==@freebsd.org X-Gm-Message-State: AOJu0YyPApgWoqRsNaRV64wQReBYh5751xMufjWY4z42ew3BIQDJdJpD g9WADk6cpqgj7kue2EqG0nTJwn9n8puosdLlka+n98u9aO4Uih8wLiRUo4NGpFB1fgnsj5mw1BZ KlhzxkhcM6k0o+h7FGZvUPpV+CCie6yGMXHVUNJ7wWQ== X-Gm-Gg: ASbGncsiVxpGgsgc2+Zq+ERB+IKMN+dh74KTYMyKbyT+v68TYGE6qsMROKrEiFXU5Sf YQvKctwnzLFdHV8YML8ynv6S5Af49z3VOhpZvMXDbKC/5uZupcZDhZgme/rQIBp2WLysH0P7+QE Blgds6sMF06z9ZAY0AFjelqO2xyxHEstfL1cUDUyzT89l/yOR8zxjW2xmTkWN/AQsAMQLoacH+r BZyRazev+RA3/7olOulR8wJBjB9MPcoxsejIDc= X-Google-Smtp-Source: AGHT+IEt8gQaRNmezaCBrZhiWhV8Ew1M83i5QlD6zKkJxqNFncozX2tLYH2ToLQKwPzUX9WBxdPuRMoVUz4Syud4qj8= X-Received: by 2002:a17:903:1b25:b0:24c:bc02:78a1 with SMTP id d9443c01a7336-25d24cabfb4mr47211435ad.2.1757688740974; Fri, 12 Sep 2025 07:52:20 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509120456.58C4uwVD027045@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 12 Sep 2025 08:52:09 -0600 X-Gm-Features: Ac12FXyms5ifZcuZiIlBKuA52EGWhdV6_r67U0h08TTmtlHXci0Sh4evstC0mek Message-ID: Subject: Re: git: 22238759c57d - main - sys/bus.h: Some style(9) fixes To: Zhenlei Huang Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000082530063e9bcdf4" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cNcpc2PR9z4718 --000000000000082530063e9bcdf4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 12, 2025 at 8:47=E2=80=AFAM Zhenlei Huang wr= ote: > > > > On Sep 12, 2025, at 7:59 PM, Konstantin Belousov > wrote: > > > > On Fri, Sep 12, 2025 at 04:56:58AM +0000, Zhenlei Huang wrote: > >> The branch main has been updated by zlei: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3D22238759c57d942865cf9d1a355a0d0= 4819eb621 > >> > >> commit 22238759c57d942865cf9d1a355a0d04819eb621 > >> Author: Zhenlei Huang > >> AuthorDate: 2025-09-12 04:55:14 +0000 > >> Commit: Zhenlei Huang > >> CommitDate: 2025-09-12 04:55:14 +0000 > >> > >> sys/bus.h: Some style(9) fixes > >> > >> and whitespace cleanup. > >> > >> MFC after: 3 days > >> --- > >> sys/sys/bus.h | 38 ++++++++++++++++++++------------------ > >> 1 file changed, 20 insertions(+), 18 deletions(-) > >> > >> diff --git a/sys/sys/bus.h b/sys/sys/bus.h > >> index dda27f4737b2..e7ce152160f8 100644 > >> --- a/sys/sys/bus.h > >> +++ b/sys/sys/bus.h > >> @@ -78,7 +78,7 @@ typedef enum device_property_type { > >> * The strings are placed one after the other, separated by NUL > characters. > >> * Fields should be added after the last one and order maintained for > compatibility > >> */ > >> -#define BUS_USER_BUFFER (3*1024) > >> +#define BUS_USER_BUFFER (3 * 1024) > >> struct u_device { > >> uintptr_t dv_handle; > >> uintptr_t dv_parent; > >> @@ -247,8 +247,8 @@ typedef struct devclass *devclass_t; > >> * and may use regular mutexes. However, it is prohibited from > >> * sleeping on a sleep queue. > >> */ > >> -typedef int driver_filter_t(void*); > >> -typedef void driver_intr_t(void*); > >> +typedef int driver_filter_t(void *); > >> +typedef void driver_intr_t(void *); > > What are the fixes there, specifically? > > > > One space is required between the type and *. > > >> > >> /** > >> * @brief Interrupt type bits. > >> @@ -476,18 +476,18 @@ int bus_generic_resume(device_t dev); > >> int bus_generic_resume_child(device_t dev, device_t child); > >> int bus_generic_setup_intr(device_t dev, device_t child, > >> struct resource *irq, int flags, > >> - driver_filter_t *filter, driver_intr_t > *intr, > >> + driver_filter_t *filter, driver_intr_t > *intr, > >> void *arg, void **cookiep); > > And there? > > > > The continuation indent is completely wrong from the style(9) guide, > > and the change just kept it, there and everywhere. > > Yes you're right, the fix is not complete. tools/build/checkstyle.pl does > not > complain about the indent so I kept them the same style. > Don't blindly believe checkstyle.pl. It's at best a hack that's designed to catch the worst offenders for github submissions. It has many false positives and misses many other things. But it was quick and easy to deploy and helps guide reviewers to style problems by making potential ones more visible. Warner --000000000000082530063e9bcdf4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Sep 12,= 2025 at 8:47=E2=80=AFAM Zhenlei Huang <zlei@freebsd.org> wrote:


> On Sep 12, 2025, at 7:59 PM, Konstantin Belousov <kostikbel@gmail.com> wrote:<= br> >
> On Fri, Sep 12, 2025 at 04:56:58AM +0000, Zhenlei Huang wrote:
>> The branch main has been updated by zlei:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3D22238759c57d942865cf9d1a355a0d04819eb= 621
>>
>> commit 22238759c57d942865cf9d1a355a0d04819eb621
>> Author:=C2=A0 =C2=A0 =C2=A0Zhenlei Huang <zlei@FreeBSD.org><= br> >> AuthorDate: 2025-09-12 04:55:14 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Zhenlei Huang <zlei@FreeBSD.org><= br> >> CommitDate: 2025-09-12 04:55:14 +0000
>>
>>=C2=A0 =C2=A0 sys/bus.h: Some style(9) fixes
>>
>>=C2=A0 =C2=A0 and whitespace cleanup.
>>
>>=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 3 days
>> ---
>> sys/sys/bus.h | 38 ++++++++++++++++++++------------------
>> 1 file changed, 20 insertions(+), 18 deletions(-)
>>
>> diff --git a/sys/sys/bus.h b/sys/sys/bus.h
>> index dda27f4737b2..e7ce152160f8 100644
>> --- a/sys/sys/bus.h
>> +++ b/sys/sys/bus.h
>> @@ -78,7 +78,7 @@ typedef enum device_property_type {
>>=C2=A0 * The strings are placed one after the other, separated by N= UL characters.
>>=C2=A0 * Fields should be added after the last one and order mainta= ined for compatibility
>>=C2=A0 */
>> -#define BUS_USER_BUFFER=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(3*1024)
>> +#define BUS_USER_BUFFER=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(3 * 1024)
>> struct u_device {
>>=C2=A0 =C2=A0 =C2=A0 uintptr_t=C2=A0 =C2=A0 =C2=A0 =C2=A0dv_handle;=
>>=C2=A0 =C2=A0 =C2=A0 uintptr_t=C2=A0 =C2=A0 =C2=A0 =C2=A0dv_parent;=
>> @@ -247,8 +247,8 @@ typedef struct devclass=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 *devclass_t;
>>=C2=A0 * and may use regular mutexes.=C2=A0 However, it is prohibit= ed from
>>=C2=A0 * sleeping on a sleep queue.
>>=C2=A0 */
>> -typedef int driver_filter_t(void*);
>> -typedef void driver_intr_t(void*);
>> +typedef int driver_filter_t(void *);
>> +typedef void driver_intr_t(void *);
> What are the fixes there, specifically?
>

One space is required between the type and *.

>>
>> /**
>>=C2=A0 * @brief Interrupt type bits.
>> @@ -476,18 +476,18 @@ int=C2=A0 =C2=A0 bus_generic_resume(device_t= dev);
>> int=C2=A0 bus_generic_resume_child(device_t dev, device_t child);<= br> >> int=C2=A0 bus_generic_setup_intr(device_t dev, device_t child,
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct resource *irq, int flags,
>> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0driver_filter_t *filter, driver_intr_t *i= ntr,
>> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0driver_filter_t *filter, driver_intr_t *i= ntr,
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0void *arg, void **cookiep);
> And there?
>
> The continuation indent is completely wrong from the style(9) guide, > and the change just kept it, there and everywhere.

Yes you're right, the fix is not complete. tools/build/checkstyle.pl doe= s not
complain about the indent so I kept them the same style.

Don't blindly believe checkstyle.pl. It's at best a hack that's designed to catch t= he worst offenders for github submissions. It has many false positives and = misses many other things. But it was quick and easy to deploy and helps gui= de reviewers to style problems by making potential ones more visible.
=

Warner=C2=A0
--000000000000082530063e9bcdf4--