Re: [PATCH 1/5] PCI: Don't check resource_size() in pci_bus_alloc_resource()

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

 



On Tue, Mar 11, 2014 at 3:02 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
> On Tue, Mar 11, 2014 at 3:39 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
>> how about replacing that with:
>>
>>         if (avail.start > avail.end)
>>                   continue;
>>
>> so we do not need to go deep into allocate_resource()
>
> We could, but why bother?  This isn't a performance path, so there's
> no need to add more code to optimize it.  Adding code means there's
> more for human readers to look at and understand, so I prefer not to
> add it unless it's needed.

oh, i did not look further, if the code path could handle strange
constraints properly.
like min > max.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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