Re: drivers: Inline code in devm_platform_ioremap_resource() from two functions

From: Markus Elfring
Date: Tue Jun 18 2019 - 02:51:21 EST


>> Two function calls were combined in this function implementation.
>> Inline corresponding code so that extra error checks can be avoided here.
>
> What exactly is the purpose of this ?

I suggest to take another look at the need and relevance of involved
error checks in the discussed function combination.


> Looks like a notable code duplication ...

This can be.


> I thought we usually try to reduce this, instead of introducing new ones.

Would you like to check the software circumstances once more
for the generation of a similar code structure by a C compiler
(or optimiser)?

Regards,
Markus