[PATCH 3/4] target uart: remove REG_OFFS() macro side-effect

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/baseband-devel@lists.osmocom.org/.

Alex Badea vamposdecampos at gmail.com
Wed Nov 17 21:35:17 UTC 2010


Don't assign to the variable given as argument.  This prevents
clobbering the local 'reg' variables in uart_reg_{read,write}(),
which would in turn prevent the latch bits from being restored
correctly.

Signed-off-by: Alex Badea <vamposdecampos at gmail.com>
---
 src/target/firmware/calypso/uart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/target/firmware/calypso/uart.c b/src/target/firmware/calypso/uart.c
index 4d7df09..394078d 100644
--- a/src/target/firmware/calypso/uart.c
+++ b/src/target/firmware/calypso/uart.c
@@ -43,7 +43,7 @@
 #define LCR7BIT		0x80
 #define LCRBFBIT	0x40
 #define MCR6BIT		0x20
-#define REG_OFFS(m)	((m) &= ~(LCR7BIT|LCRBFBIT|MCR6BIT))
+#define REG_OFFS(m)	((m) & ~(LCR7BIT|LCRBFBIT|MCR6BIT))
 /* read access LCR[7] = 0 */
 enum uart_reg {
 	RHR	= 0,
-- 
1.7.0.4





More information about the baseband-devel mailing list