Re: [PATCH v2 07/10] PCI: Convert of_pci_get_host_bridge_resources() users to devm variant

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

 



Hi Lorenzo,

On 05/04/2018 07:44 PM, Lorenzo Pieralisi wrote:
> On Thu, May 03, 2018 at 10:18:24AM +0300, Vladimir Zapolskiy wrote:
>> Hi Jan,
>>
>> On 04/30/2018 08:48 AM, Jan Kiszka wrote:
>>> From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
>>>
>>> Straightforward for all of them, no more leaks afterwards.
>>>
>>> CC: Jingoo Han <jingoohan1@xxxxxxxxx>
>>> CC: Joao Pinto <Joao.Pinto@xxxxxxxxxxxx>
>>> CC: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
>>> Acked-by: Jingoo Han <jingoo1han@xxxxxxxxx>
>>
>> [snip]
>>
>>> diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
>>> index 6ab28f29ac6a..6eb36c924983 100644
>>> --- a/drivers/pci/host/pcie-rcar.c
>>> +++ b/drivers/pci/host/pcie-rcar.c
>>> @@ -1067,12 +1067,11 @@ static int rcar_pcie_parse_request_of_pci_ranges(struct rcar_pcie *pci)
>>>  {
>>>  	int err;
>>>  	struct device *dev = pci->dev;
>>> -	struct device_node *np = dev->of_node;
>>>  	resource_size_t iobase;
>>>  	struct resource_entry *win, *tmp;
>>>  
>>> -	err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pci->resources,
>>> -					       &iobase);
>>> +	err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff,
>>> +						    &pci->resources, &iobase);
>>>  	if (err)
>>>  		return err;
>>>  
>>
>> this one snippet is obsoleted by https://patchwork.ozlabs.org/patch/904326/
>>
>> If 08/10 remains a deprecation, then it is sufficient to exclude the R-Car change,
>> otherwise I hope maintainers can deal with the proper ordering.
> 
> Isn't applying your patch:
> 
> https://patchwork.ozlabs.org/patch/904326/
> 
> and dropping the rcar hunk from this patch enough ?
> 

absolutely, but it relies on any of two assumptions that
* my unmodified change is applied first, then Jan's adjusted change is applied,
* Jan's unmodified change is applied first, then my adjusted change is applied.

Otherwise there will be a trivial merge conflict, or even worse, if R-Car hunk
is removed as suggested, then of_pci_get_host_bridge_resources() is removed
instead of deprecation, and then my unmodified change is applied on top, it will
result in a window of commits, where R-Car PCIe driver won't be buildable, and
git-bisect users can be disappointed.

It makes little sense to include my change into Jan's series, thus I rely on
maintainers' awareness and smooth resolution of the issue by maintainers.

For what it's worth, I vote for of_pci_get_host_bridge_resources() removal.

--
With best wishes,
Vladimir



[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