Re: [PATCH 2/5] PCI: dwc: rcar-gen4: Return error code from .additional_common_init

Marek Vasut <[email protected]>
Newsgroups org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci
Message-ID <[email protected]>
On 7/15/26 4:22 PM, Manivannan Sadhasivam wrote:
> On Sat, Jul 04, 2026 at 10:25:01PM +0200, Marek Vasut wrote:
>> Return error code from .additional_common_init callback and check
>> the error code. This is a preparatory patch for R-Car Gen5 support,
>> which may return non-zero error code from .additional_common_init.
>>
>> Signed-off-by: Marek Vasut <[email protected]>
>> ---
>> Cc: "Krzysztof Wilczyński" <[email protected]>
>> Cc: Bjorn Helgaas <[email protected]>
>> Cc: Conor Dooley <[email protected]>
>> Cc: Geert Uytterhoeven <[email protected]>
>> Cc: Krzysztof Kozlowski <[email protected]>
>> Cc: Lorenzo Pieralisi <[email protected]>
>> Cc: Manivannan Sadhasivam <[email protected]>
>> Cc: Rob Herring <[email protected]>
>> Cc: Yoshihiro Shimoda <[email protected]>
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> ---
>>   drivers/pci/controller/dwc/pcie-rcar-gen4.c | 15 +++++++++++----
>>   1 file changed, 11 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/pci/controller/dwc/pcie-rcar-gen4.c b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
>> index 5f7211b91ee5b..7625cd338262d 100644
>> --- a/drivers/pci/controller/dwc/pcie-rcar-gen4.c
>> +++ b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
>> @@ -87,7 +87,7 @@ MODULE_FIRMWARE(RCAR_GEN4_PCIE_FIRMWARE_NAME);
>>   
>>   struct rcar_gen4_pcie;
>>   struct rcar_gen4_pcie_drvdata {
>> -	void (*additional_common_init)(struct rcar_gen4_pcie *rcar);
>> +	int (*additional_common_init)(struct rcar_gen4_pcie *rcar);
> 
> Can you also rename this callback as init() and implementations as
> rcar_gen4_pcie_{ep}_init()?
> 
> Though this callback is a grab-bag of various register settings, naming it as
> just '.init()' will make it more readable and less redundant.
I did a bit more refactoring of this in V2.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.