Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2012 09:54:14 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, Scott Long <scottl@freebsd.org>, Stefan Farfeleder <stefanf@freebsd.org>, David Xu <davidxu@freebsd.org>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r233700 - head/sys/kern
Message-ID:  <201204180954.14236.jhb@freebsd.org>
In-Reply-To: <4F8DD186.6060306@FreeBSD.org>
References:  <201203301257.q2UCvE4l042042@svn.freebsd.org> <201204020752.52596.jhb@freebsd.org> <4F8DD186.6060306@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, April 17, 2012 4:24:38 pm Dimitry Andric wrote:
> On 2012-04-02 13:52, John Baldwin wrote:
> ...
> >> It seems the for loop walks the list until the end, then tacks 'sc' onto
> >> it.
> >>
> >> So to 'fix' the warning, and make the meaning more explicit, we should
> >> probably rewrite that fragment as:
> >>
> >>           LIST_INIT(&(sc->ha_ccb));
> >>           /* Link us into the HA list */
> >>           for (ha =&Asr_softc_list; *ha; ha =&((*ha)->ha_next))
> >> 		;
> >> 	*(ha) = sc;
> >>
> >> Is this OK?
> >
> > Can we just make that code use a STAILQ() instead of doing it obscurely by
> > hand?
> 
> That would be a more invasive change, and since this driver is
> essentially unmaintained, I'd like to change as little as possible. :)
> 
> Another solution is to just silence the warning for this driver.

http://www.FreeBSD.org/~jhb/patches/asr_stailq.patch

-- 
John Baldwin



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