Date: Thu, 18 Jun 2020 13:48:43 +0100 From: Jessica Clarke <jrtc27@freebsd.org> To: Ed Maste <emaste@freebsd.org> Cc: Andrew Turner <andrew@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r362285 - head/sys/dev/pci Message-ID: <831631E9-2F54-4E5F-950A-B923B0A3DADA@freebsd.org> In-Reply-To: <CAPyFy2C2nRF9akKthA8SbpxigWcNFNQr-Dt1Q33RxyG4gjNDvg@mail.gmail.com> References: <202006171956.05HJuH8B032154@repo.freebsd.org> <CAPyFy2C2nRF9akKthA8SbpxigWcNFNQr-Dt1Q33RxyG4gjNDvg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18 Jun 2020, at 13:23, Ed Maste <emaste@freebsd.org> wrote: > On Wed, 17 Jun 2020 at 15:56, Andrew Turner <andrew@freebsd.org> = wrote: >>=20 >> Author: andrew >> Date: Wed Jun 17 19:56:17 2020 >> New Revision: 362285 >> URL: https://svnweb.freebsd.org/changeset/base/362285 >>=20 >> Log: >> Clean up the pci host generic driver > ... >>=20 >> + /* Translate the address from a PCI address to a physical = address */ >> + switch (type) { >> + case SYS_RES_IOPORT: >> + case SYS_RES_MEMORY: >> + found =3D false; >> + for (i =3D 0; i < MAX_RANGES_TUPLES; i++) { >> + pci_base =3D sc->ranges[i].pci_base; >> + phys_base =3D sc->ranges[i].phys_base; >> + size =3D sc->ranges[i].size; >> + >> + if (start < pci_base || start >=3D pci_base + = size) >> + continue; >=20 > Should the second condition be end instead? markj had this comment on > the old version in review D20884. The code previously had: > if ((rman_get_start(r) >=3D pci_base) && (rman_get_start(r) < = (pci_base + size))) > found =3D 1; > break; > } The new code is just the inverted form of that. Jess
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?831631E9-2F54-4E5F-950A-B923B0A3DADA>