]> git.hungrycats.org Git - linux/commitdiff
[IA64-SGI] bte.c: kill expression as lvalue warning
authorJesse Barnes <jbarnes@sgi.com>
Wed, 18 Aug 2004 17:01:08 +0000 (17:01 +0000)
committerTony Luck <aegl@agluck-lia64.sc.intel.com>
Wed, 18 Aug 2004 17:01:08 +0000 (17:01 +0000)
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.

Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/sn/kernel/bte.c

index e040fc3c445aa4bd122643cb779cd595b6eaabad..94a99eeb10baf511f93a350ed80817f9c77af27f 100644 (file)
@@ -421,9 +421,10 @@ bte_init_node(nodepda_t * mynodepda, cnodeid_t cnode)
        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