Date: Wed, 25 May 2022 07:56:24 +0200 From: =?UTF-8?B?S29ucmFkIFNld2nFgsWCby1Kb3Blaw==?= <kjopek@gmail.com> To: Jessica Clarke <jrtc27@freebsd.org> Cc: Eric Joyner <erj@freebsd.org>, "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: <CAGgez=K3-=KjhPYPw7sReMcsTHY%2BjLYPT4Fkh_E-OYUshQZHRg@mail.gmail.com> In-Reply-To: <2BC7CBC1-6A6A-4D89-9A26-98EF76539EEA@freebsd.org> References: <202205250030.24P0UqLa029123@gitrepo.freebsd.org> <2BC7CBC1-6A6A-4D89-9A26-98EF76539EEA@freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
Jessica is right.
AMD64 build:
--- all_subdir_irdma ---
--- irdma_ws.o ---
ctfconvert -L VERSION -g irdma_ws.o
--- all_subdir_ispfw ---
:> export_syms
awk -f /mass/coding/scanme/scanme/vendor/freebsd/sys/conf/kmod_syms.awk
isp_2400.ko.full export_syms | xargs -J% objcopy % isp_2400.ko.full
--- all_subdir_irdma ---
--- icrdma.o ---
/mass/coding/scanme/scanme/vendor/freebsd/sys/modules/irdma/../../dev/irdma/icrdma.c:504:24:
error: format specifies type 'void *' but the argument has type
'bus_space_tag_t' (aka 'unsigned long') [-Werror,-Wformat]
pf_if_d(peer), peer->pci_mem->r_bustag);
^~~~~~~~~~~~~~~~~~~~~~~
/mass/coding/scanme/scanme/vendor/freebsd/sys/modules/irdma/../../dev/irdma/osdep.h:179:74:
note: expanded from macro 'irdma_pr_info'
#define irdma_pr_info(fmt, args ...) printf("%s: WARN "fmt, __func__, ##
args)
~~~
^~~~
Regards,
Konrad Sewiłło-Jopek
śr., 25 maj 2022 o 04:02 Jessica Clarke <jrtc27@freebsd.org> napisał(a):
> On 25 May 2022, at 01:30, Eric Joyner <erj@FreeBSD.org> wrote:
> >
> > The branch main has been updated by erj:
> >
> > URL:
> https://cgit.FreeBSD.org/src/commit/?id=e602a30bb9fc7ee041a0e629d0fd2db7933ffa32
> >
> > 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
> >
> > irdma(4): Fix compile error on powerpc64
> >
> > Jenkins reports that the type used in a printf() specifier is
> > incorrect, so fix it in order to use the appropriate type.
> >
> > Signed-off-by: Eric Joyner <erj@FreeBSD.org>
> >
> > 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(-)
> >
> > 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 = 0;
> >
> > - irdma_pr_info("probe: irdma-%s peer=%p, peer->pf_id=%d,
> peer->ifp=%p, peer->ifp->if_dunit=%d, peer->pci_mem->r_bustag=%lx\n",
> > + irdma_pr_info("probe: irdma-%s peer=%p, peer->pf_id=%d,
> peer->ifp=%p, peer->ifp->if_dunit=%d, peer->pci_mem->r_bustag=%p\n",
> > irdma_driver_version, peer, peer->pf_id, peer->ifp,
> > pf_if_d(peer), peer->pci_mem->r_bustag);
>
> It’s 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’ll 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
>
>
>
[-- Attachment #2 --]
<div dir="ltr"><div>Jessica is right.</div><div><br></div><div>AMD64 build:<br></div><div><br></div><div>--- all_subdir_irdma ---<br>--- irdma_ws.o ---<br>ctfconvert -L VERSION -g irdma_ws.o<br>--- all_subdir_ispfw ---<br>:> export_syms<br>awk -f /mass/coding/scanme/scanme/vendor/freebsd/sys/conf/kmod_syms.awk isp_2400.ko.full export_syms | xargs -J% objcopy % isp_2400.ko.full<br>--- all_subdir_irdma ---<br>--- icrdma.o ---<br>/mass/coding/scanme/scanme/vendor/freebsd/sys/modules/irdma/../../dev/irdma/icrdma.c:504:24: error: format specifies type 'void *' but the argument has type 'bus_space_tag_t' (aka 'unsigned long') [-Werror,-Wformat]<br> pf_if_d(peer), peer->pci_mem->r_bustag);<br> ^~~~~~~~~~~~~~~~~~~~~~~<br>/mass/coding/scanme/scanme/vendor/freebsd/sys/modules/irdma/../../dev/irdma/osdep.h:179:74: note: expanded from macro 'irdma_pr_info'<br>#define irdma_pr_info(fmt, args ...) printf("%s: WARN "fmt, __func__, ## args)<br> ~~~ ^~~~</div><div>Regards,<br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Konrad Sewiłło-Jopek</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">śr., 25 maj 2022 o 04:02 Jessica Clarke <<a href="mailto:jrtc27@freebsd.org">jrtc27@freebsd.org</a>> napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 25 May 2022, at 01:30, Eric Joyner <erj@FreeBSD.org> wrote:<br>
> <br>
> The branch main has been updated by erj:<br>
> <br>
> URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=e602a30bb9fc7ee041a0e629d0fd2db7933ffa32" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=e602a30bb9fc7ee041a0e629d0fd2db7933ffa32</a><br>
> <br>
> commit e602a30bb9fc7ee041a0e629d0fd2db7933ffa32<br>
> Author: Eric Joyner <erj@FreeBSD.org><br>
> AuthorDate: 2022-05-25 00:27:29 +0000<br>
> Commit: Eric Joyner <erj@FreeBSD.org><br>
> CommitDate: 2022-05-25 00:30:46 +0000<br>
> <br>
> irdma(4): Fix compile error on powerpc64<br>
> <br>
> Jenkins reports that the type used in a printf() specifier is<br>
> incorrect, so fix it in order to use the appropriate type.<br>
> <br>
> Signed-off-by: Eric Joyner <erj@FreeBSD.org><br>
> <br>
> Reported by: Jenkins CI<br>
> MFC after: 6 days<br>
> MFC-with: cdcd52d41e246ba1c0fcfad0769bd691487355ef<br>
> Sponsored by: Intel Corporation<br>
> ---<br>
> sys/dev/irdma/icrdma.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
> <br>
> diff --git a/sys/dev/irdma/icrdma.c b/sys/dev/irdma/icrdma.c<br>
> index 7cf441b37648..6867274d1cb8 100644<br>
> --- a/sys/dev/irdma/icrdma.c<br>
> +++ b/sys/dev/irdma/icrdma.c<br>
> @@ -499,7 +499,7 @@ irdma_probe(struct ice_rdma_peer *peer)<br>
> struct irdma_handler *hdl;<br>
> int err = 0;<br>
> <br>
> - irdma_pr_info("probe: irdma-%s peer=%p, peer->pf_id=%d, peer->ifp=%p, peer->ifp->if_dunit=%d, peer->pci_mem->r_bustag=%lx\n",<br>
> + irdma_pr_info("probe: irdma-%s peer=%p, peer->pf_id=%d, peer->ifp=%p, peer->ifp->if_dunit=%d, peer->pci_mem->r_bustag=%p\n",<br>
> irdma_driver_version, peer, peer->pf_id, peer->ifp,<br>
> pf_if_d(peer), peer->pci_mem->r_bustag);<br>
<br>
It’s an int on i386, a uint64_t on amd64 and a struct bus_space * on<br>
all other architectures, so this just trades breaking non-x86 for<br>
breaking x86. You probably want something like<br>
<br>
(void *)(uintptr_t)peer->pci_mem->r_bustag<br>
<br>
as something that’ll work everywhere, that or take it the other<br>
direction and forcefully cast it down to an integer type and print that<br>
like<br>
<br>
(uintmax_t)(uintptr_t)peer->pci_mem->r_bustag<br>
<br>
with %jx or just<br>
<br>
(uintptr_t)peer->pci_mem->r_bustag<br>
<br>
with PRIxPTR, but we rarely use those macros.<br>
<br>
Jess<br>
<br>
<br>
</blockquote></div>
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGgez=K3-=KjhPYPw7sReMcsTHY%2BjLYPT4Fkh_E-OYUshQZHRg>
