On Tue, 15 Dec 2020 at 02:46, Zev Weiss <zev@xxxxxxxxxxxxxxxxx> wrote:
Instead of testing and conditionally clearing them one by one, we can
instead just unconditionally clear them all at once.
Signed-off-by: Zev Weiss <zev@xxxxxxxxxxxxxxxxx>
I had a poke at the assembly and it looks like GCC is clearing the
bits unconditionally anyway, so removing the tests provides no change.
Combining them is a good further optimization.
Reviewed-by: Joel Stanley <joel@xxxxxxxxx>
A question unrelated to this patch: Do you know why the driver doesn't
clear the status bits in the interrupt handler? I would expect it to
write the value of sts back to the register to ack the pending
interrupt.