From owner-svn-src-head@freebsd.org Sat Dec 23 19:44:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 948F5E97984 for ; Sat, 23 Dec 2017 19:44:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 57A3D725D3 for ; Sat, 23 Dec 2017 19:44:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22c.google.com with SMTP id w127so27714390iow.11 for ; Sat, 23 Dec 2017 11:44:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=emtlSQd+MzWP9qGZnDe/KgU0Lq+67/sD/VErhJQoHL4=; b=OxUrePAucm52Pkyl2yHv9yAsZVwDmvTTKkYV4BWomTYPy64UOT42LO3V5tYLjGKjEz C3lCDeuBsfYAmJ+LUNNVqiaJ3/RXmiLdRX7esSVlO0oJ5R5nvPAPqtdmrJ5LNXGHuXLo g566M5YmEVCIRnrDTzjymnPa6kC/6M3wcyDupyn8QxekG0GA0fswtEHRPXQXs+hsRrFM WVL7l8neDhk2zpVPLB7iL3+eXdft+GmQetUqaVkm+OqQJqR8fqvrmI9l780PEyuG7uMy LEK2OTuRGDfcv+Qzz2ThFwBuvFZv3Alj64TOBAv3zLzxdYTiqLzfQUsIYc3ZWFCHK1qa /BPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=emtlSQd+MzWP9qGZnDe/KgU0Lq+67/sD/VErhJQoHL4=; b=rSMepSd0UuFMAQiL4XXAccuH3gFKNcfVSHmFPkWRy8Z1EtT3XzRex0qXuXWlDzN+Rd JIKTVkWUDhmvlIugUVlyUVZjXXr+iOUoFvvVyXQySob2RYyM+FOUZVNklw/NlJ7y+5Rj 0cfYAfLnCF7XdeFfvmHsno8SnndUKWKQv7yxtIqEZdZed61Gmb0ECzHs5ylzlrx8jSEb SH6rc5aLXl9bsS2Ux4dkWMgRhxI3GLgnYBpih9yUox/w5EoO+fDBcOcIk3E25oiTkdsN 192cEtGq31jjTiJFO3nvIXiCVXMfwdj61Xq8Qr2qgRCZY6pi6Wqs6TL/4SOwhxLJBcKo A77g== X-Gm-Message-State: AKGB3mKGM3ZGqcsMO9wZxywuWsmd34k3mpcg695c4stzUVFIX0DPRU9w ws+VsgMxGCLkLz2yKjDdL6wig0tU4XBUjJkw8g6Cow== X-Google-Smtp-Source: ACJfBotqJtGEOJ37UXwGWY3vCAMsSaioMyPAwQA0sxQzt3xjmv0829XoMYlQTZwdLmIdt5jKtcYaKWDwv4HJ6GGt550= X-Received: by 10.107.142.145 with SMTP id q139mr5988562iod.63.1514058254525; Sat, 23 Dec 2017 11:44:14 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Sat, 23 Dec 2017 11:44:13 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201712221659.vBMGxoUH038447@repo.freebsd.org> From: Warner Losh Date: Sat, 23 Dec 2017 12:44:13 -0700 X-Google-Sender-Auth: VuFSup_4QWMMyial2iXB8OXrxUs Message-ID: Subject: Re: svn commit: r327084 - head/sys/dev/pccard To: "Conrad E. Meyer" Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Dec 2017 19:44:15 -0000 On Sat, Dec 23, 2017 at 12:14 PM, Conrad Meyer wrote: > On Fri, Dec 22, 2017 at 8:59 AM, Warner Losh wrote: > > ... > > New Revision: 327084 > > > > PC Card PNP tables are terminated by a NULL sentinel. This shouldn't > > be recorded in the linker hints, so subtract one to omit it. > > ============================================================ > ================== > > --- head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:27:29 2017 > (r327083) > > +++ head/sys/dev/pccard/pccardvar.h Fri Dec 22 16:59:50 2017 > (r327084) > > @@ -95,7 +95,7 @@ struct pccard_product { > > */ > > #define PCCARD_PNP_DESCR "D:#;V32:manufacturer;V32: > product;Z:cisvendor;Z:cisproduct;" > > #define PCCARD_PNP_INFO(t) \ > > - MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), > sizeof(t) / sizeof(t[0])); \ > > + MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), > sizeof(t) / sizeof(t[0]) - 1); \ > > Perhaps more clearly, this could be: > MODULE_PNP_INFO(PCCARD_PNP_DESCR, pccard, t, t, sizeof(t[0]), nitems(t) - > 1) > Yup. A later commit did just that when I saw the construct used elsewhere. Thanks for the suggestion! Warner