
Hello Alexander,
Thanks for fast response!
On Fri, Aug 09, 2024 at 02:25:04PM +0200, Alexander Dahl wrote:
Hello Marcus,
Am Fri, Aug 09, 2024 at 02:15:43PM +0200 schrieb Marcus Folkesson:
The condition 'ret' is always true as it is never set to other than -EIO.
Technically, you're right.
I quickly compared with the same driver in Linux. That has some additional lines for DMA transfers which probably got removed when porting the driver.
Yes, I thought is was something like that.
Does the code before your patch throw compiler warnings? If not, I
Not the compiler, but vim-ale (lint engine) is yelling loudly at me.
would keep it as is. The compiler will probably optimize it away anyway, and it would make future ports from Linux easier.
I understand your reasoning but not sure I agree.
I don't think it significantly complicates any porting and the code becomes cleaner.
I also think that the porting become less error-prone because it becomes a conscious choice to introduce and use ret if needed.
That is what I think, but I don't really have a very strong opinion about it.
Greets Alex
Best regards, Marcus Folkesson