Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2023 20:04:04 +0100
From:      Jessica Clarke <jrtc27@jrtc27.com>
To:        Renato Botelho <garga@FreeBSD.org>
Cc:        Warner Losh <imp@bsdimp.com>, Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 971bac5ace7a - main - kbd: consolidate kb interfaces (phase one)
Message-ID:  <40ECF84B-ECF1-4700-9059-F971BBD3668B@jrtc27.com>
In-Reply-To: <0504b648-df5e-4125-c4bc-01d4ecd5374d@FreeBSD.org>
References:  <202307070510.3675AWZS051152@gitrepo.freebsd.org> <65b0e348-b27d-f641-1004-6f76ff3ebfbd@FreeBSD.org> <CANCZdfoDXaO21ZfW6xvW%2BadyBWvHjs2FL_XGdG7uD23igwXKuA__2318.75493643514$1690513489$gmane$org@mail.gmail.com> <0504b648-df5e-4125-c4bc-01d4ecd5374d@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28 Jul 2023, at 20:01, Renato Botelho <garga@FreeBSD.org> wrote:
>=20
> On 28/07/23 00:04, Warner Losh wrote:
>> On Thu, Jul 27, 2023 at 5:48=E2=80=AFAM Renato Botelho =
<garga@freebsd.org <mailto:garga@freebsd.org>> wrote:
>>    On 07/07/23 02:10, Warner Losh wrote:
>>     > The branch main has been updated by imp:
>>     >
>>     > URL:
>>    =
https://cgit.FreeBSD.org/src/commit/?id=3D971bac5ace7a3c2262349fa2808188a1=
1a5ffeed =
<https://cgit.FreeBSD.org/src/commit/?id=3D971bac5ace7a3c2262349fa2808188a=
11a5ffeed>
>>     >
>>     > commit 971bac5ace7a3c2262349fa2808188a11a5ffeed
>>     > Author:     Michael <git@paepcke.de <mailto:git@paepcke.de>>
>>     > AuthorDate: 2023-07-07 02:32:45 +0000
>>     > Commit:     Warner Losh <imp@FreeBSD.org>
>>     > CommitDate: 2023-07-07 05:10:18 +0000
>>     >
>>     >      kbd: consolidate kb interfaces (phase one)
>>     >
>>     >      Refactor to eliminate duplicated rate and delay tables, =
with
>>    minor style
>>     >      tweaks for changed lines.  Remove an obsolete comment =
about
>>    needing to
>>     >      convert from microseconds to ticks (that's done =
elsewhere).
>>    Remove
>>     >      traiing whitespace in kbdcontrol.c.
>>     >
>>     >      Except for the new warning, no change in behavior
>>     >
>>     >      Sponsored by:           DSS GmbH
>>     >      Reviewed by:            imp [minor style tweaks as well]
>>     >      Pull Request: https://github.com/freebsd/pull/683
>>    <https://github.com/freebsd/pull/683>;
>>     >      Differential Revision: https://reviews.freebsd.org/D38818
>>    <https://reviews.freebsd.org/D38818>;
>>     > ---
>>     >   sys/dev/adb/adb_kbd.c            | 12 ++-------
>>     >   sys/dev/atkbdc/atkbd.c           | 18 +++++---------
>>     >   sys/dev/gpio/gpiokeys.c          | 10 ++------
>>     >   sys/dev/hid/hkbd.c               | 10 ++------
>>     >   sys/dev/kbdmux/kbdmux.c          | 23 +++++------------
>>     >   sys/dev/usb/input/ukbd.c         | 10 ++------
>>     >   sys/dev/vkbd/vkbd.c              | 18 +++++---------
>>     >   sys/sys/kbio.h                   |  7 ++++++
>>     >   usr.sbin/kbdcontrol/kbdcontrol.c | 53
>>    +++++++++++++++++++++-------------------
>>     >   9 files changed, 61 insertions(+), 100 deletions(-)
>>    After this change I started seeing following error building =
kbdcontrol:
>>    Building =
/usr/obj/usr/src/amd64.amd64/usr.sbin/kbdcontrol/kbdcontrol.o
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:35: error: use of
>>    undeclared identifier 'kbdelays'; did you mean 'ndelays'?
>>    static const int ndelays =3D nitems(kbdelays);
>>                                        ^~~~~~~~
>>                                        ndelays
>>    /usr/include/sys/param.h:324:28: note: expanded from macro =
'nitems'
>>    #define nitems(x)       (sizeof((x)) / sizeof((x)[0]))
>>                                       ^
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:18: note: 'ndelays'
>>    declared here
>>    static const int ndelays =3D nitems(kbdelays);
>>                       ^
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:35: error: use of
>>    undeclared identifier 'kbdelays'; did you mean 'ndelays'?
>>    static const int ndelays =3D nitems(kbdelays);
>>                                        ^~~~~~~~
>>                                        ndelays
>>    /usr/include/sys/param.h:324:42: note: expanded from macro =
'nitems'
>>    #define nitems(x)       (sizeof((x)) / sizeof((x)[0]))
>>                                                     ^
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:18: note: 'ndelays'
>>    declared here
>>    static const int ndelays =3D nitems(kbdelays);
>>                       ^
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:28: error: =
subscripted
>>    value is not an array, pointer, or vector
>>    static const int ndelays =3D nitems(kbdelays);
>>                                 ^~~~~~~~~~~~~~~~
>>    /usr/include/sys/param.h:324:44: note: expanded from macro =
'nitems'
>>    #define nitems(x)       (sizeof((x)) / sizeof((x)[0]))
>>                                                    ~~~^~
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:98:36: error: use of
>>    undeclared identifier 'kbrates'
>>    static const int nrepeats =3D nitems(kbrates);
>>                                         ^
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:98:36: error: use of
>>    undeclared identifier 'kbrates'
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:1072:17: error: use of
>>    undeclared identifier 'kbdelays'; did you mean 'ndelays'?
>>                              if (delay <=3D kbdelays[n])
>>                                           ^~~~~~~~
>>                                           ndelays
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:18: note: 'ndelays'
>>    declared here
>>    static const int ndelays =3D nitems(kbdelays);
>>                       ^
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:1072:25: error: =
subscripted
>>    value is not an array, pointer, or vector
>>                              if (delay <=3D kbdelays[n])
>>                                           ~~~~~~~~^~
>>    /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:1076:18: error: use of
>>    undeclared identifier 'kbrates'
>>                              if (repeat <=3D kbrates[n])
>>                                            ^
>>    8 errors generated.
>>    *** Error code 1
>> I haven't seen this. How do I recreate this? Does this happen on a =
clean build?
>=20
> After I upgrade system to recent CURRENT the error is gone.

kbdcontrol requires an updated sys/kbio.h, so if you try and do a make
of just it outside of make buildenv and without having first installed
updated headers to worldtmp then you won=E2=80=99t get the updated =
sys/kbio.h.
I don=E2=80=99t think that=E2=80=99s something we support in general, =
only when it
happens to work?

Jess




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40ECF84B-ECF1-4700-9059-F971BBD3668B>