Skip to contentSkip to conversation

sparse cleanup for mca.c

PATCH New Jesse Barnes 1 participant 1 message Oct 20, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparse cleanup for mca.c

Looks like we were casting a value into a union and sparse doesn't like that. Why not just assign it directly to the appropriate field?

Thanks,
Jesse

===== arch/ia64/kernel/mca.c 1.69 vs edited =====

arch/ia64/kernel/mca.c +2 -2
@@ -593,7 +593,7 @@
 {
 	cmcv_reg_t	cmcv;
 
-	cmcv = (cmcv_reg_t)ia64_getreg(_IA64_REG_CR_CMCV);
+	cmcv.cmcv_regval = ia64_getreg(_IA64_REG_CR_CMCV);
 
 	cmcv.cmcv_mask = 1; /* Mask/disable interrupt */
 	ia64_setreg(_IA64_REG_CR_CMCV, cmcv.cmcv_regval);
@@ -620,7 +620,7 @@
 {
 	cmcv_reg_t	cmcv;
 
-	cmcv = (cmcv_reg_t)ia64_getreg(_IA64_REG_CR_CMCV);
+	cmcv.cmcv_regval = ia64_getreg(_IA64_REG_CR_CMCV);
 
 	cmcv.cmcv_mask = 0; /* Unmask/enable interrupt */
 	ia64_setreg(_IA64_REG_CR_CMCV, cmcv.cmcv_regval);