Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Nov 2022 21:59:47 -0700
From:      Ravi Pokala <rpokala@freebsd.org>
To:        Li-Wen Hsu <lwhsu@FreeBSD.org>, <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-commits-src-main@FreeBSD.org>
Subject:   Re: d0b5e4a30ac9 - main - mana(4): Make the code cross-platform
Message-ID:  <E2FB3B56-3436-4663-9E3D-3CE032B86164@panasas.com>
In-Reply-To: <202211040416.2A44GGhE047556@gitrepo.freebsd.org>
References:  <202211040416.2A44GGhE047556@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Li-Wen,

Shouldn't these new "%ju"s and "%jx"s have (uintmax_t) casts?

Thanks,

Ravi (rpokala@)

=EF=BB=BF-----Original Message-----
From: <owner-src-committers@freebsd.org> on behalf of Li-Wen Hsu <lwhsu@Fre=
eBSD.org>
Date: 2022-11-03, Thursday at 21:16
To: <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-c=
ommits-src-main@FreeBSD.org>
Subject: git: d0b5e4a30ac9 - main - mana(4): Make the code cross-platform

    The branch main has been updated by lwhsu:

    URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd0b5e4a30ac985051c14b0f5e3=
cb3e6cdd271929

    commit d0b5e4a30ac985051c14b0f5e3cb3e6cdd271929
    Author:     Li-Wen Hsu <lwhsu@FreeBSD.org>
    AuthorDate: 2022-11-04 03:45:35 +0000
    Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
    CommitDate: 2022-11-04 03:45:35 +0000

        mana(4): Make the code cross-platform

        Discussed with: whu
        Sponsored by:   The FreeBSD Foundation
        Differential Revision:  https://reviews.freebsd.org/D36388
    ---
     sys/dev/mana/mana_en.c | 15 +++------------
     1 file changed, 3 insertions(+), 12 deletions(-)

    diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c
    index 5e5e3939753f..5a95eff66ab6 100644
    --- a/sys/dev/mana/mana_en.c
    +++ b/sys/dev/mana/mana_en.c
    @@ -1054,10 +1054,8 @@ mana_cfg_vport(struct mana_port_context *apc, ui=
nt32_t protection_dom_id,
     	apc->tx_shortform_allowed =3D resp.short_form_allowed;
     	apc->tx_vp_offset =3D resp.tx_vport_offset;

    -#if defined(__amd64__)
    -	if_printf(apc->ndev, "Configured vPort %lu PD %u DB %u\n",
    +	if_printf(apc->ndev, "Configured vPort %ju PD %u DB %u\n",
     	    apc->port_handle, protection_dom_id, doorbell_pg_id);
    -#endif

     out:
     	if (err)
    @@ -1127,10 +1125,8 @@ mana_cfg_vport_steering(struct mana_port_context=
 *apc,
     		err =3D EPROTO;
     	}

    -#if defined(__amd64__)
    -	if_printf(ndev, "Configured steering vPort %lu entries %u\n",
    +	if_printf(ndev, "Configured steering vPort %ju entries %u\n",
     	    apc->port_handle, num_entries);
    -#endif

     out:
     	free(req, M_DEVBUF);
    @@ -1694,13 +1690,8 @@ mana_process_rx_cqe(struct mana_rxq *rxq, struct=
 mana_cq *cq,

     	if (pktlen =3D=3D 0) {
     		/* data packets should never have packetlength of zero */
    -#if defined(__amd64__)
    -		if_printf(ndev, "RX pkt len=3D0, rq=3D%u, cq=3D%u, rxobj=3D0x%lx\n",
    +		if_printf(ndev, "RX pkt len=3D0, rq=3D%u, cq=3D%u, rxobj=3D0x%jx\n",
     		    rxq->gdma_id, cq->gdma_id, rxq->rxobj);
    -#else
    -		if_printf(ndev, "RX pkt len=3D0, rq=3D%u, cq=3D%u, rxobj=3D0x%llx\n",
    -		    rxq->gdma_id, cq->gdma_id, rxq->rxobj);
    -#endif
     		return;
     	}






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E2FB3B56-3436-4663-9E3D-3CE032B86164>