Re: [PATCH] ata:ahci_xgene:use devm_platform_ioremap_resource() to simplify code

From: Sergei Shtylyov
Date: Sat Apr 04 2020 - 15:58:31 EST


Hello!

On 04/01/2020 12:44 PM, åå wrote:

> I think the previous code in memory resource #4 to use 'csr' maybe uselessïif
> devm_ioremap_resource() failedïthe function will return, the 'ctx->csr_mux = csr' will
> become uselessãSo I do the same way as the other threeãThis's my idea, please criticize
> and correct itãThank you very much!

I was unable to understand what you mean here.
My point is that the driver happily works if the MUX registers do not exist, and your
patch makes the driver fail the probe in this case. Even if this was correct, it's usually
a bad idea to do several thing in the same patch. So, you'd need a patch changing the probing logic before you convert things to devm_platfrom_ioremap_resource()...

[...]

MBR, Sergei