lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3DCA0A88-0890-49EE-8644-E6311E891C55@gmail.com>
Date:   Wed, 29 Jul 2020 15:59:37 -0700
From:   Mark D Rustad <mrustad@...il.com>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     "David E. Box" <david.e.box@...ux.intel.com>, dvhart@...radead.org,
        andy@...radead.org, bhelgaas@...gle.com,
        alexander.h.duyck@...ux.intel.com,
        linux-kernel <linux-kernel@...r.kernel.org>,
        platform-driver-x86@...r.kernel.org, linux-pci@...r.kernel.org,
        Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH V4 2/3] mfd: Intel Platform Monitoring Technology support

at 12:58 AM, Lee Jones <lee.jones@...aro.org> wrote:

> If you do:
>
> 	do {
> 		int pos;
>
> 		pos = pci_find_next_ext_capability(pdev, pos, PCI_EXT_CAP_ID_DVSEC);
> 		if (!pos)
> 			break;
>
> Then you can invoke pci_find_next_ext_capability() once, no?

Part of your suggestion here won't work, because pos needs to be  
initialized to 0 the first time. As such it needs to be declared and  
initialized outside the loop. Other than that it may be ok.

--
Mark Rustad, MRustad@...il.com


Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ