Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Mar 2007 12:27:47 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        Kip Macy <kmacy@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/share/man/man4 Makefile src/sys/dev/cxgb cxgb_adapter.h cxgb_config.h cxgb_ioctl.h cxgb_lro.c cxgb_main.c cxgb_osdep.h cxgb_sge.c t3fw-3.2.bin.gz.uu src/sys/dev/cxgb/common cxgb_ael1002.c cxgb_common.h cxgb_firmware_exports.h cxgb_mc5.c ...
Message-ID:  <20070315102747.GA10792@straylight.m.ringlet.net>
In-Reply-To: <200703150306.l2F36X1r017313@repoman.freebsd.org>
References:  <20070315032138.D47D416A58C@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, 15 Mar 2007 at 03:06:32 +0000 (UTC), Kip Macy wrote:
>=20
> kmacy       2007-03-15 03:06:32 UTC
>=20
>   FreeBSD src repository
>=20
>   Modified files:        (Branch: RELENG_6)
>     share/man/man4       Makefile=20
>   Added files:           (Branch: RELENG_6)
>     sys/dev/cxgb         cxgb_adapter.h cxgb_config.h cxgb_ioctl.h=20
>                          cxgb_lro.c cxgb_main.c cxgb_osdep.h=20
>                          cxgb_sge.c t3fw-3.2.bin.gz.uu=20
>     sys/dev/cxgb/common  cxgb_ael1002.c cxgb_common.h=20
>                          cxgb_firmware_exports.h cxgb_mc5.c=20
>                          cxgb_mv88e1xxx.c cxgb_regs.h=20
>                          cxgb_sge_defs.h cxgb_t3_cpl.h=20
>                          cxgb_t3_hw.c cxgb_tcb.h cxgb_version.h=20
>                          cxgb_vsc8211.c cxgb_xgmac.c=20
>     sys/modules/cxgb     Makefile=20
>   Log:
>   MFC Chelsio T3 10 Gigabit Ethernet support
>  =20
>   Don't hook into build just

Is it possible that the GCC version in 6.x-STABLE is different from
that in -CURRENT?  On my laptop (i386, yesterday's -STABLE) LINT failed
to build with the following:

/fs/6/usr.src/sys/dev/cxgb/cxgb_sge.c: In function `sge_timer_reclaim':
/fs/6/usr.src/sys/dev/cxgb/cxgb_sge.c:172: warning: inlining failed in call=
 to 'refill_rspq': function body not available
/fs/6/usr.src/sys/dev/cxgb/cxgb_sge.c:699: warning: called from here

It seems it simply needed refill_rspq() to be moved up, so that
the compiler could actually see the function body before first use;
or is this a bug in GCC?

Anyway, here's a simple patch that fixed the LINT build for me.

G'luck,
Peter

Index: src/sys/dev/cxgb/cxgb_sge.c
=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/sys/dev/cxgb/cxgb_sge.c,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 cxgb_sge.c
--- src/sys/dev/cxgb/cxgb_sge.c	15 Mar 2007 03:06:31 -0000	1.2.2.1
+++ src/sys/dev/cxgb/cxgb_sge.c	15 Mar 2007 10:16:46 -0000
@@ -640,6 +640,24 @@
 }
=20
=20
+/**
+ *	refill_rspq - replenish an SGE response queue
+ *	@adapter: the adapter
+ *	@q: the response queue to replenish
+ *	@credits: how many new responses to make available
+ *
+ *	Replenishes a response queue by making the supplied number of responses
+ *	available to HW.
+ */
+static __inline void
+refill_rspq(adapter_t *sc, const struct sge_rspq *q, u_int credits)
+{
+
+	/* mbufs are allocated on demand when a rspq entry is processed. */
+	t3_write_reg(sc, A_SG_RSPQ_CREDIT_RETURN,
+		     V_RSPQ(q->cntxt_id) | V_CREDITS(credits));
+}
+
 static void
 sge_timer_reclaim(void *arg, int ncount)
 {
@@ -1562,23 +1580,6 @@
 }
=20
=20
-/**
- *	refill_rspq - replenish an SGE response queue
- *	@adapter: the adapter
- *	@q: the response queue to replenish
- *	@credits: how many new responses to make available
- *
- *	Replenishes a response queue by making the supplied number of responses
- *	available to HW.
- */
-static __inline void
-refill_rspq(adapter_t *sc, const struct sge_rspq *q, u_int credits)
-{
-
-	/* mbufs are allocated on demand when a rspq entry is processed. */
-	t3_write_reg(sc, A_SG_RSPQ_CREDIT_RETURN,
-		     V_RSPQ(q->cntxt_id) | V_CREDITS(credits));
-}
=20
 /**
  *	free_tx_desc - reclaims Tx descriptors and their buffers

--=20
Peter Pentchev	roam@ringlet.net    roam@cnsys.bg    roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
I am the meaning of this sentence.

--jI8keyz6grp/JLjh
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFF+R+j7Ri2jRYZRVMRAh+4AKCwefFKQz7ChXr+rgtwBPaKNPpHiACeL6FS
2kag8SGAJHBuGSl9XLNDe9Q=
=aRV9
-----END PGP SIGNATURE-----

--jI8keyz6grp/JLjh--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070315102747.GA10792>