Date: Mon, 29 Aug 2022 08:16:13 +0100 From: Jessica Clarke <jrtc27@freebsd.org> To: Wei Hu <whu@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 9e772f203ff2 - main - mana: Fix a couple i386 build errors Message-ID: <97404B30-E8BD-4194-8134-B488C0151287@freebsd.org> In-Reply-To: <202208290635.27T6Zheu028340@gitrepo.freebsd.org> References: <202208290635.27T6Zheu028340@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29 Aug 2022, at 07:35, Wei Hu <whu@FreeBSD.org> wrote: >=20 > The branch main has been updated by whu: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9e772f203ff2bd296d8ef234681b6db5= d43c7582 >=20 > commit 9e772f203ff2bd296d8ef234681b6db5d43c7582 > Author: Wei Hu <whu@FreeBSD.org> > AuthorDate: 2022-08-29 06:30:49 +0000 > Commit: Wei Hu <whu@FreeBSD.org> > CommitDate: 2022-08-29 06:35:02 +0000 >=20 > mana: Fix a couple i386 build errors >=20 > Fix a couple i386 build errors >=20 > Fixes: b685df314f138 > Sponsored by: Microsoft > --- > sys/dev/mana/mana_en.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c > index e504df1c8a8d..5e5e3939753f 100644 > --- a/sys/dev/mana/mana_en.c > +++ b/sys/dev/mana/mana_en.c > @@ -1054,8 +1054,11 @@ mana_cfg_vport(struct mana_port_context *apc, = uint32_t protection_dom_id, > apc->tx_shortform_allowed =3D resp.short_form_allowed; > apc->tx_vp_offset =3D resp.tx_vport_offset; >=20 > +#if defined(__amd64__) > if_printf(apc->ndev, "Configured vPort %lu PD %u DB %u\n", > apc->port_handle, protection_dom_id, doorbell_pg_id); > +#endif > + > out: > if (err) > mana_uncfg_vport(apc); > @@ -1124,8 +1127,11 @@ mana_cfg_vport_steering(struct = mana_port_context *apc, > err =3D EPROTO; > } >=20 > +#if defined(__amd64__) > if_printf(ndev, "Configured steering vPort %lu entries %u\n", > apc->port_handle, num_entries); > +#endif > + > out: > free(req, M_DEVBUF); > return err; This is highly dubious. Why not fix the code to work for 32-bit? It seems the only problem is port_handle is a uint64_t not unsigned long, so you either need to use PRIu64 or cast to something like uintmax_t and use %ju. Just closing your eyes and ifdef=E2=80=99ing out printfs = for i386 isn=E2=80=99t the right approach. Jess
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?97404B30-E8BD-4194-8134-B488C0151287>