[PATCH 5/5] dfu: Remove unused variable, mark method as not retuning

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/simtrace@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Wed Nov 9 22:24:16 UTC 2011


From: Holger Hans Peter Freyther <zecke at selfish.org>

---
 firmware/include/asm/compiler.h |    1 +
 firmware/src/dfu/dfu.c          |    4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/firmware/include/asm/compiler.h b/firmware/include/asm/compiler.h
index 08b6bae..d2b53f0 100644
--- a/firmware/include/asm/compiler.h
+++ b/firmware/include/asm/compiler.h
@@ -5,5 +5,6 @@
 #define unlikely(x)     __builtin_expect(!!(x), 0)
 
 #define __unused	__attribute__((unused))
+#define __noreturn	__attribute__((noreturn))
 
 #endif
diff --git a/firmware/src/dfu/dfu.c b/firmware/src/dfu/dfu.c
index f31b9f8..5d6865c 100644
--- a/firmware/src/dfu/dfu.c
+++ b/firmware/src/dfu/dfu.c
@@ -993,10 +993,8 @@ static __dfufunc void dfu_udp_irq(void)
 }
 
 /* this is only called once before DFU mode, no __dfufunc required */
-static void dfu_switch(void)
+static __noreturn void dfu_switch(void)
 {
-	AT91PS_AIC pAic = AT91C_BASE_AIC;
-
 	DEBUGE("\r\nsam7dfu: switching to DFU mode\r\n");
 
 	dfu_state = DFU_STATE_appDETACH;
-- 
1.7.7.2





More information about the simtrace mailing list