diff --git a/src/board/system76/common/main.c b/src/board/system76/common/main.c index d94e9b03b..4ecb4388a 100644 --- a/src/board/system76/common/main.c +++ b/src/board/system76/common/main.c @@ -102,6 +102,8 @@ void main(void) { uint32_t last_time_fan = 0; for (main_cycle = 0;; main_cycle++) { + // NOTE: Do note use modulo to avoid expensive call to SDCC library + // call. (Modulo is optimized for powers of 2, however.) switch (main_cycle & 3U) { case 0: // Handle USB-C events immediately before power states @@ -123,11 +125,6 @@ void main(void) { // Handle lid close/open lid_event(); break; - - case 3: - // We previously used modulo to limit when the logic for other - // cases ran, so this case is unused. - break; } if (main_cycle == 0) {