From owner-svn-src-all@freebsd.org Thu Jun 18 12:48:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C26F234FB92 for ; Thu, 18 Jun 2020 12:48:47 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nhZR099Gz4fC4 for ; Thu, 18 Jun 2020 12:48:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f54.google.com with SMTP id q11so5941929wrp.3 for ; Thu, 18 Jun 2020 05:48:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=f+ZAqsfT0/F8kfTd1pjPB9MSd0DOvFSPOpbE+asyVqQ=; b=sPvnV5/kDkdBgAYo4vFJg2JHFwpibbnwUuA3egUZaPFHCSAd5G0pgWmne25iwYkyNd YOR/F5GJxf/tyYTW5+OMOmVKgVtshOFG/9zX4OszgR/Znw1R0SyIUR3AfH4I0shr3sOY d6hmEXzTRevizc5ehwv7F7brFQc4n7fqHjGG4tP40w/I/Oqfd3pi/Z8U+HPiKCK15ghe YzotRTDYrPccYngDOtsaeH3idOl+94+xHjDmQ3iWo0STSHIk/V7bb8fXSn7h7xRhhxpg bKMJuY+VM7kHX9S2Zsn5IRJV4QIOLVL/Z56VBwmPbDVb2+w3Qa5ANgDN5rrn6hnffd6f /aHg== X-Gm-Message-State: AOAM531rOoJ/itSkIgrCZBXsopmZB6WMLeWCIKZFQvtzNCVuPD9Ag2DA PtMIcdQkpwEYYB1QWFb8/IZP5Q== X-Google-Smtp-Source: ABdhPJw2c5/CuotaxEANOVt2taVIMBylnOlseCB+Braxc+WR/XVuyCF79TQ9aMRllfs8De2Ch0QQmA== X-Received: by 2002:a5d:67c8:: with SMTP id n8mr4451813wrw.343.1592484525512; Thu, 18 Jun 2020 05:48:45 -0700 (PDT) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id o10sm3460706wrj.37.2020.06.18.05.48.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2020 05:48:44 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r362285 - head/sys/dev/pci From: Jessica Clarke In-Reply-To: Date: Thu, 18 Jun 2020 13:48:43 +0100 Cc: Andrew Turner , src-committers , svn-src-all , svn-src-head Content-Transfer-Encoding: quoted-printable Message-Id: <831631E9-2F54-4E5F-950A-B923B0A3DADA@freebsd.org> References: <202006171956.05HJuH8B032154@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49nhZR099Gz4fC4 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-1.59 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-0.97)[-0.970]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.12)[-0.121]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.54:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.002]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.54:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 12:48:47 -0000 On 18 Jun 2020, at 13:23, Ed Maste wrote: > On Wed, 17 Jun 2020 at 15:56, Andrew Turner = 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