svn commit: r233700 - head/sys/kern
John Baldwin
jhb at freebsd.org
Wed Apr 18 13:54:56 UTC 2012
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
More information about the svn-src-all
mailing list