Re: [PATCH V4 2/3] mfd: Intel Platform Monitoring Technology support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



at 12:58 AM, Lee Jones <lee.jones@xxxxxxxxxx> 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@xxxxxxxxx

Attachment: signature.asc
Description: Message signed with OpenPGP


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux