Re: net-libertas: Better exception handling in if_spi_host_to_card_worker()
From: SF Markus Elfring
Date: Sun Jan 03 2016 - 07:14:26 EST
>>> What the patch tries to do is avoid the extra 'if (err)'.
>>
>> Yes. - I propose to look at related consequences together with the usage
>> of a popular short jump label once more.
>
> When I read a subject saying "Better exception handling" it sounds like
> a functional improvement. Your change does not change anything
> functionally and may or may not save a bit of execution time depending
> on how smart the compiler is.
Can it eventually matter to skip another condition check in three cases?
> What you change does is confuse people reading the code.
A few software developers might find this proposal unusual.
> So please explain why your update improves exception handling here.
> I don't see it.
How does this feedback fit to the mentioned check avoidance?
> The code is not making the driver more robust against failures
That's true for this update suggestion.
> in this function, which is what I think of reading "better exception handling".
Other implementation details are affected by the shown fine-tuning.
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/