Skip to contentSkip to conversation

kill warning in bte.c

PATCH New Jesse Barnes 1 participant 1 message Aug 10, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kill warning in bte.c

Robin or Dean, feel free to veto this one if it's not valid. A recent patch caused a warning about not using expressions as lvalues to crop up in bte.c (or maybe it's just that I'm using gcc-3.4.1 now). This patch fixes it by creating a temporary to store the register whose address we want to get and stuff into the per-bte info structure.

Thanks,
Jesse

===== arch/ia64/sn/kernel/bte.c 1.7 vs edited =====

arch/ia64/sn/kernel/bte.c +4 -3
@@ -421,9 +421,10 @@
 	mynodepda->bte_recovery_timer.data = (unsigned long) mynodepda;
 
 	for (i = 0; i < BTES_PER_NODE; i++) {
-		(u64) mynodepda->bte_if[i].bte_base_addr =
-		    REMOTE_HUB_ADDR(cnodeid_to_nasid(cnode),
-			(i == 0 ? IIO_IBLS0 : IIO_IBLS1));
+		/* Which link status register should we use? */
+		unsigned long link_status = (i == 0 ? IIO_IBLS0 : IIO_IBLS1);
+		mynodepda->bte_if[i].bte_base_addr = (u64 *)
+			REMOTE_HUB_ADDR(cnodeid_to_nasid(cnode), link_status);
 
 		/*
 		 * Initialize the notification and spinlock