Re: [REGRESSION] next/master: (build) variable 'num_ports' is uninitialized when used here [-Werror,-Wun...

Rosen Penev <[email protected]> Mon, 4 May 2026 17:56:35 -0700
Newsgroups dev.linux.lists.kernelci,dev.linux.lists.regressions,org.kernel.vger.linux-next,org.kernel.vger.linux-usb
Message-ID <CAKxU2N9WxA9tg0EqDQ0bzxpB79Sa+zh7HgGs_u-witFcuCsQew@mail.gmail.com>
On Mon, May 4, 2026 at 5:18=E2=80=AFPM Randy Dunlap <[email protected]>=
 wrote:
>
> [add more people/list]
>
> commit 8bdb0b3830ea
> Author: Rosen Penev <[email protected]>
> Date:   Fri Apr 24 18:42:01 2026 -0700
>     usb: typec: intel_pmc_mux: combine kzalloc + kcalloc
>
>
> On 5/4/26 4:59 PM, KernelCI bot wrote:
> >
> >
> >
> >
> > Hello,
> >
> > New build issue found on next/master:
> >
> > ---
> >  variable 'num_ports' is uninitialized when used here [-Werror,-Wuninit=
ialized] in drivers/usb/typec/mux/intel_pmc_mux.o (drivers/usb/typec/mux/in=
tel_pmc_mux.c) [logspec:kbuild,kbuild.compiler.error]
> > ---
> >
> > - dashboard: https://d.kernelci.org/i/maestro:4c562376c15477320ad9a138b=
83a5256431b57cb
> > - giturl: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-ne=
xt.git
> > - commit HEAD:  9d0d467c3572e93c5faa2e5906a8bbcd70b24efd
> > - tags: next-20260504
> >
> > Please include the KernelCI tag when submitting a fix:
> >
> > Reported-by: kernelci.org bot <[email protected]>
> >
> >
> > Log excerpt:
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> > /tmp/kci/linux/drivers/usb/typec/mux/intel_pmc_mux.c:740:3: error: vari=
able 'num_ports' is uninitialized when used here [-Werror,-Wuninitialized]
> >   740 |                 num_ports++;
> >       |                 ^~~~~~~~~
> > /tmp/kci/linux/drivers/usb/typec/mux/intel_pmc_mux.c:735:14: note: init=
ialize the variable 'num_ports' to silence this warning
> >   735 |         u8 num_ports;
> >       |                     ^
> >       |                      =3D '\0'
That =3D 0 is correct and was an oversight on my part. The original code
initialized to 0 because of kzalloc.
> > 1 error generated.
> >
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> >
> >
> > # Builds where the incident occurred:
> >
> > ## x86_64_defconfig+kselftest+x86-board on (x86_64):
> > - compiler: clang-21
> > - config: None
> > - dashboard: https://d.kernelci.org/build/maestro:69f922810e4ee292cbd1a=
001
> >
> >
> > #kernelci issue maestro:4c562376c15477320ad9a138b83a5256431b57cb
> >
> > --
> > This is an experimental report format. Please send feedback in!
> > Talk to us at [email protected]
> >
> > Made with love by the KernelCI team - https://kernelci.org
> >
>
> --
> ~Randy
>