Date: Tue, 24 May 2022 20:01:31 -0600 From: Jessica Clarke <jrtc27@freebsd.org> To: Eric Joyner <erj@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: e602a30bb9fc - main - irdma(4): Fix compile error on powerpc64 Message-ID: <2BC7CBC1-6A6A-4D89-9A26-98EF76539EEA@freebsd.org> In-Reply-To: <202205250030.24P0UqLa029123@gitrepo.freebsd.org> References: <202205250030.24P0UqLa029123@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 25 May 2022, at 01:30, Eric Joyner <erj@FreeBSD.org> wrote: >=20 > The branch main has been updated by erj: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3De602a30bb9fc7ee041a0e629d0fd2db7= 933ffa32 >=20 > commit e602a30bb9fc7ee041a0e629d0fd2db7933ffa32 > Author: Eric Joyner <erj@FreeBSD.org> > AuthorDate: 2022-05-25 00:27:29 +0000 > Commit: Eric Joyner <erj@FreeBSD.org> > CommitDate: 2022-05-25 00:30:46 +0000 >=20 > irdma(4): Fix compile error on powerpc64 >=20 > Jenkins reports that the type used in a printf() specifier is > incorrect, so fix it in order to use the appropriate type. >=20 > Signed-off-by: Eric Joyner <erj@FreeBSD.org> >=20 > Reported by: Jenkins CI > MFC after: 6 days > MFC-with: cdcd52d41e246ba1c0fcfad0769bd691487355ef > Sponsored by: Intel Corporation > --- > sys/dev/irdma/icrdma.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/sys/dev/irdma/icrdma.c b/sys/dev/irdma/icrdma.c > index 7cf441b37648..6867274d1cb8 100644 > --- a/sys/dev/irdma/icrdma.c > +++ b/sys/dev/irdma/icrdma.c > @@ -499,7 +499,7 @@ irdma_probe(struct ice_rdma_peer *peer) > struct irdma_handler *hdl; > int err =3D 0; >=20 > - irdma_pr_info("probe: irdma-%s peer=3D%p, peer->pf_id=3D%d, = peer->ifp=3D%p, peer->ifp->if_dunit=3D%d, = peer->pci_mem->r_bustag=3D%lx\n", > + irdma_pr_info("probe: irdma-%s peer=3D%p, peer->pf_id=3D%d, = peer->ifp=3D%p, peer->ifp->if_dunit=3D%d, peer->pci_mem->r_bustag=3D%p\n",= > irdma_driver_version, peer, peer->pf_id, = peer->ifp, > pf_if_d(peer), peer->pci_mem->r_bustag); It=E2=80=99s an int on i386, a uint64_t on amd64 and a struct bus_space = * on all other architectures, so this just trades breaking non-x86 for breaking x86. You probably want something like (void *)(uintptr_t)peer->pci_mem->r_bustag as something that=E2=80=99ll work everywhere, that or take it the other direction and forcefully cast it down to an integer type and print that like (uintmax_t)(uintptr_t)peer->pci_mem->r_bustag with %jx or just (uintptr_t)peer->pci_mem->r_bustag with PRIxPTR, but we rarely use those macros. Jess
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2BC7CBC1-6A6A-4D89-9A26-98EF76539EEA>