Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2025 22:47:05 +0800
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 22238759c57d - main - sys/bus.h: Some style(9) fixes
Message-ID:  <A64E9961-8358-4BD2-BC1B-2B0C4169C1B2@FreeBSD.org>
In-Reply-To: <aMQLLOgeeIhtUgM9@kib.kiev.ua>
References:  <202509120456.58C4uwVD027045@gitrepo.freebsd.org> <aMQLLOgeeIhtUgM9@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Sep 12, 2025, at 7:59 PM, Konstantin Belousov <kostikbel@gmail.com> =
wrote:
>=20
> On Fri, Sep 12, 2025 at 04:56:58AM +0000, Zhenlei Huang wrote:
>> The branch main has been updated by zlei:
>>=20
>> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3D22238759c57d942865cf9d1a355a0d04=
819eb621
>>=20
>> commit 22238759c57d942865cf9d1a355a0d04819eb621
>> Author:     Zhenlei Huang <zlei@FreeBSD.org>
>> AuthorDate: 2025-09-12 04:55:14 +0000
>> Commit:     Zhenlei Huang <zlei@FreeBSD.org>
>> CommitDate: 2025-09-12 04:55:14 +0000
>>=20
>>    sys/bus.h: Some style(9) fixes
>>=20
>>    and whitespace cleanup.
>>=20
>>    MFC after:      3 days
>> ---
>> sys/sys/bus.h | 38 ++++++++++++++++++++------------------
>> 1 file changed, 20 insertions(+), 18 deletions(-)
>>=20
>> 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?
>=20

One space is required between the type and *.

>>=20
>> /**
>>  * @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,=20
>> +			       driver_filter_t *filter, driver_intr_t =
*intr,
>> 			       void *arg, void **cookiep);
> And there?
>=20
> 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.

Let me try to fix the indent ~

Best regards,
Zhenlei




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A64E9961-8358-4BD2-BC1B-2B0C4169C1B2>