Date: Thu, 27 Jul 2023 21:04:15 -0600 From: Warner Losh <imp@bsdimp.com> To: Renato Botelho <garga@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, 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: <CANCZdfoDXaO21ZfW6xvW%2BadyBWvHjs2FL_XGdG7uD23igwXKuA@mail.gmail.com> In-Reply-To: <65b0e348-b27d-f641-1004-6f76ff3ebfbd@FreeBSD.org> References: <202307070510.3675AWZS051152@gitrepo.freebsd.org> <65b0e348-b27d-f641-1004-6f76ff3ebfbd@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000a6fb7f0601835612 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jul 27, 2023 at 5:48=E2=80=AFAM Renato Botelho <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=3D971bac5ace7a3c2262349fa2808188a= 11a5ffeed > > > > commit 971bac5ace7a3c2262349fa2808188a11a5ffeed > > Author: Michael <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 needin= g > 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 > > Differential Revision: 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? Warner --000000000000a6fb7f0601835612 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Thu, Jul 27, 2023 at 5:48=E2=80=AF= AM Renato Botelho <<a href=3D"mailto:garga@freebsd.org">garga@freebsd.or= g</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin= :0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"= >On 07/07/23 02:10, Warner Losh wrote:<br> > The branch main has been updated by imp:<br> > <br> > URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D971bac5ace7a= 3c2262349fa2808188a11a5ffeed" rel=3D"noreferrer" target=3D"_blank">https://= cgit.FreeBSD.org/src/commit/?id=3D971bac5ace7a3c2262349fa2808188a11a5ffeed<= /a><br> > <br> > commit 971bac5ace7a3c2262349fa2808188a11a5ffeed<br> > Author:=C2=A0 =C2=A0 =C2=A0Michael <<a href=3D"mailto:git@paepcke.d= e" target=3D"_blank">git@paepcke.de</a>><br> > AuthorDate: 2023-07-07 02:32:45 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2023-07-07 05:10:18 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0 kbd: consolidate kb interfaces (phase one)<br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 Refactor to eliminate duplicated rate and delay ta= bles, with minor style<br> >=C2=A0 =C2=A0 =C2=A0 tweaks for changed lines.=C2=A0 Remove an obsolete= comment about needing to<br> >=C2=A0 =C2=A0 =C2=A0 convert from microseconds to ticks (that's don= e elsewhere). Remove<br> >=C2=A0 =C2=A0 =C2=A0 traiing whitespace in kbdcontrol.c.<br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 Except for the new warning, no change in behavior<= br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0DSS GmbH<br> >=C2=A0 =C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 imp [minor style tweaks as well]<br> >=C2=A0 =C2=A0 =C2=A0 Pull Request:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0<a href=3D"https://github.com/freebsd/pull/683" rel=3D"noreferrer" ta= rget=3D"_blank">https://github.com/freebsd/pull/683</a><br> >=C2=A0 =C2=A0 =C2=A0 Differential Revision:=C2=A0 <a href=3D"https://re= views.freebsd.org/D38818" rel=3D"noreferrer" target=3D"_blank">https://revi= ews.freebsd.org/D38818</a><br> > ---<br> >=C2=A0 =C2=A0sys/dev/adb/adb_kbd.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 | 12 ++-------<br> >=C2=A0 =C2=A0sys/dev/atkbdc/atkbd.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0| 18 +++++---------<br> >=C2=A0 =C2=A0sys/dev/gpio/gpiokeys.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = | 10 ++------<br> >=C2=A0 =C2=A0sys/dev/hid/hkbd.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0| 10 ++------<br> >=C2=A0 =C2=A0sys/dev/kbdmux/kbdmux.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = | 23 +++++------------<br> >=C2=A0 =C2=A0sys/dev/usb/input/ukbd.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= | 10 ++------<br> >=C2=A0 =C2=A0sys/dev/vkbd/vkbd.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 | 18 +++++---------<br> >=C2=A0 =C2=A0sys/sys/kbio.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 7 ++++++<br> >=C2=A0 =C2=A0usr.sbin/kbdcontrol/kbdcontrol.c | 53 ++++++++++++++++++++= +-------------------<br> >=C2=A0 =C2=A09 files changed, 61 insertions(+), 100 deletions(-)<br> <br> After this change I started seeing following error building kbdcontrol:<br> <br> Building /usr/obj/usr/src/amd64.amd64/usr.sbin/kbdcontrol/kbdcontrol.o<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:35: error: use of <br> undeclared identifier 'kbdelays'; did you mean 'ndelays'?<b= r> static const int ndelays =3D nitems(kbdelays);<br> =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=A0 =C2=A0 =C2=A0 =C2=A0^~~~~~~~<br> =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=A0 =C2=A0 =C2=A0 =C2=A0ndelays<br> /usr/include/sys/param.h:324:28: note: expanded from macro 'nitems'= <br> #define nitems(x)=C2=A0 =C2=A0 =C2=A0 =C2=A0(sizeof((x)) / sizeof((x)[0]))<= br> =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=A0 =C2=A0 =C2=A0 ^<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:18: note: 'ndelays' <b= r> declared here<br> static const int ndelays =3D nitems(kbdelays);<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:35: error: use of <br> undeclared identifier 'kbdelays'; did you mean 'ndelays'?<b= r> static const int ndelays =3D nitems(kbdelays);<br> =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=A0 =C2=A0 =C2=A0 =C2=A0^~~~~~~~<br> =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=A0 =C2=A0 =C2=A0 =C2=A0ndelays<br> /usr/include/sys/param.h:324:42: note: expanded from macro 'nitems'= <br> #define nitems(x)=C2=A0 =C2=A0 =C2=A0 =C2=A0(sizeof((x)) / sizeof((x)[0]))<= br> =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=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 ^<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:18: note: 'ndelays' <b= r> declared here<br> static const int ndelays =3D nitems(kbdelays);<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:28: error: subscripted <br> value is not an array, pointer, or vector<br> static const int ndelays =3D nitems(kbdelays);<br> =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 ^~~~~~~~~~~~~~~~<br> /usr/include/sys/param.h:324:44: note: expanded from macro 'nitems'= <br> #define nitems(x)=C2=A0 =C2=A0 =C2=A0 =C2=A0(sizeof((x)) / sizeof((x)[0]))<= br> =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=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0~~~^~<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:98:36: error: use of <br> undeclared identifier 'kbrates'<br> static const int nrepeats =3D nitems(kbrates);<br> =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=A0 =C2=A0 =C2=A0 =C2=A0 ^<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:98:36: error: use of <br> undeclared identifier 'kbrates'<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:1072:17: error: use of <br> undeclared identifier 'kbdelays'; did you mean 'ndelays'?<b= r> =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=A0if (delay <=3D kbdelays[n])<br> =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=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^~~~~~~~<br> =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=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ndelays<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:97:18: note: 'ndelays' <b= r> declared here<br> static const int ndelays =3D nitems(kbdelays);<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:1072:25: error: subscripted <br> value is not an array, pointer, or vector<br> =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=A0if (delay <=3D kbdelays[n])<br> =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=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ~~~~~~~~^~<br> /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:1076:18: error: use of <br> undeclared identifier 'kbrates'<br> =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=A0if (repeat <=3D kbrates[n])<br> =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=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br> 8 errors generated.<br> *** Error code 1<br></blockquote><div><br></div><div>I haven't seen thi= s. How do I recreate this? Does this happen on a clean build?<br></div><div= ><br></div><div>Warner <br></div></div></div> --000000000000a6fb7f0601835612--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoDXaO21ZfW6xvW%2BadyBWvHjs2FL_XGdG7uD23igwXKuA>