aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_schizo.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-05-08 20:23:31 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-05-08 20:23:31 -0400
commitaf80318eb71e234a59957cd1d2d7c3fa2ea27313 (patch)
treecc071f7f7032c87c45ee813343b6788d8b55e851 /arch/sparc64/kernel/pci_schizo.c
parentc57c2ffb153a99769a15a2ff1729371ddee5601a (diff)
[SPARC64]: Fix request_irq() ignored result warnings in PCI controller code.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_schizo.c')
-rw-r--r--arch/sparc64/kernel/pci_schizo.c104
1 files changed, 68 insertions, 36 deletions
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c
index 312f3e4f2ed4..e375d72b8eed 100644
--- a/arch/sparc64/kernel/pci_schizo.c
+++ b/arch/sparc64/kernel/pci_schizo.c
@@ -984,6 +984,7 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
984{ 984{
985 struct of_device *op = of_find_device_by_node(pbm->prom_node); 985 struct of_device *op = of_find_device_by_node(pbm->prom_node);
986 u64 tmp, err_mask, err_no_mask; 986 u64 tmp, err_mask, err_no_mask;
987 int err;
987 988
988 /* Tomatillo IRQ property layout is: 989 /* Tomatillo IRQ property layout is:
989 * 0: PCIERR 990 * 0: PCIERR
@@ -993,24 +994,39 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
993 * 4: POWER FAIL? 994 * 4: POWER FAIL?
994 */ 995 */
995 996
996 if (pbm_routes_this_ino(pbm, SCHIZO_UE_INO)) 997 if (pbm_routes_this_ino(pbm, SCHIZO_UE_INO)) {
997 request_irq(op->irqs[1], schizo_ue_intr, 0, 998 err = request_irq(op->irqs[1], schizo_ue_intr, 0,
998 "TOMATILLO_UE", pbm); 999 "TOMATILLO_UE", pbm);
999 1000 if (err)
1000 if (pbm_routes_this_ino(pbm, SCHIZO_CE_INO)) 1001 printk(KERN_WARNING "%s: Could not register UE, "
1001 request_irq(op->irqs[2], schizo_ce_intr, 0, 1002 "err=%d\n", pbm->name, err);
1002 "TOMATILLO_CE", pbm); 1003 }
1003 1004 if (pbm_routes_this_ino(pbm, SCHIZO_CE_INO)) {
1004 if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_A_INO)) 1005 err = request_irq(op->irqs[2], schizo_ce_intr, 0,
1005 request_irq(op->irqs[0], schizo_pcierr_intr, 0, 1006 "TOMATILLO_CE", pbm);
1006 "TOMATILLO_PCIERR", pbm); 1007 if (err)
1007 else if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_B_INO)) 1008 printk(KERN_WARNING "%s: Could not register CE, "
1008 request_irq(op->irqs[0], schizo_pcierr_intr, 0, 1009 "err=%d\n", pbm->name, err);
1009 "TOMATILLO_PCIERR", pbm); 1010 }
1010 1011 err = 0;
1011 if (pbm_routes_this_ino(pbm, SCHIZO_SERR_INO)) 1012 if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_A_INO)) {
1012 request_irq(op->irqs[3], schizo_safarierr_intr, 0, 1013 err = request_irq(op->irqs[0], schizo_pcierr_intr, 0,
1013 "TOMATILLO_SERR", pbm); 1014 "TOMATILLO_PCIERR", pbm);
1015 } else if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_B_INO)) {
1016 err = request_irq(op->irqs[0], schizo_pcierr_intr, 0,
1017 "TOMATILLO_PCIERR", pbm);
1018 }
1019 if (err)
1020 printk(KERN_WARNING "%s: Could not register PCIERR, "
1021 "err=%d\n", pbm->name, err);
1022
1023 if (pbm_routes_this_ino(pbm, SCHIZO_SERR_INO)) {
1024 err = request_irq(op->irqs[3], schizo_safarierr_intr, 0,
1025 "TOMATILLO_SERR", pbm);
1026 if (err)
1027 printk(KERN_WARNING "%s: Could not register SERR, "
1028 "err=%d\n", pbm->name, err);
1029 }
1014 1030
1015 /* Enable UE and CE interrupts for controller. */ 1031 /* Enable UE and CE interrupts for controller. */
1016 schizo_write(pbm->controller_regs + SCHIZO_ECC_CTRL, 1032 schizo_write(pbm->controller_regs + SCHIZO_ECC_CTRL,
@@ -1064,6 +1080,7 @@ static void schizo_register_error_handlers(struct pci_pbm_info *pbm)
1064{ 1080{
1065 struct of_device *op = of_find_device_by_node(pbm->prom_node); 1081 struct of_device *op = of_find_device_by_node(pbm->prom_node);
1066 u64 tmp, err_mask, err_no_mask; 1082 u64 tmp, err_mask, err_no_mask;
1083 int err;
1067 1084
1068 /* Schizo IRQ property layout is: 1085 /* Schizo IRQ property layout is:
1069 * 0: PCIERR 1086 * 0: PCIERR
@@ -1073,24 +1090,39 @@ static void schizo_register_error_handlers(struct pci_pbm_info *pbm)
1073 * 4: POWER FAIL? 1090 * 4: POWER FAIL?
1074 */ 1091 */
1075 1092
1076 if (pbm_routes_this_ino(pbm, SCHIZO_UE_INO)) 1093 if (pbm_routes_this_ino(pbm, SCHIZO_UE_INO)) {
1077 request_irq(op->irqs[1], schizo_ue_intr, 0, 1094 err = request_irq(op->irqs[1], schizo_ue_intr, 0,
1078 "SCHIZO_UE", pbm); 1095 "SCHIZO_UE", pbm);
1079 1096 if (err)
1080 if (pbm_routes_this_ino(pbm, SCHIZO_CE_INO)) 1097 printk(KERN_WARNING "%s: Could not register UE, "
1081 request_irq(op->irqs[2], schizo_ce_intr, 0, 1098 "err=%d\n", pbm->name, err);
1082 "SCHIZO_CE", pbm); 1099 }
1083 1100 if (pbm_routes_this_ino(pbm, SCHIZO_CE_INO)) {
1084 if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_A_INO)) 1101 err = request_irq(op->irqs[2], schizo_ce_intr, 0,
1085 request_irq(op->irqs[0], schizo_pcierr_intr, 0, 1102 "SCHIZO_CE", pbm);
1086 "SCHIZO_PCIERR", pbm); 1103 if (err)
1087 else if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_B_INO)) 1104 printk(KERN_WARNING "%s: Could not register CE, "
1088 request_irq(op->irqs[0], schizo_pcierr_intr, 0, 1105 "err=%d\n", pbm->name, err);
1089 "SCHIZO_PCIERR", pbm); 1106 }
1090 1107 err = 0;
1091 if (pbm_routes_this_ino(pbm, SCHIZO_SERR_INO)) 1108 if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_A_INO)) {
1092 request_irq(op->irqs[3], schizo_safarierr_intr, 0, 1109 err = request_irq(op->irqs[0], schizo_pcierr_intr, 0,
1093 "SCHIZO_SERR", pbm); 1110 "SCHIZO_PCIERR", pbm);
1111 } else if (pbm_routes_this_ino(pbm, SCHIZO_PCIERR_B_INO)) {
1112 err = request_irq(op->irqs[0], schizo_pcierr_intr, 0,
1113 "SCHIZO_PCIERR", pbm);
1114 }
1115 if (err)
1116 printk(KERN_WARNING "%s: Could not register PCIERR, "
1117 "err=%d\n", pbm->name, err);
1118
1119 if (pbm_routes_this_ino(pbm, SCHIZO_SERR_INO)) {
1120 err = request_irq(op->irqs[3], schizo_safarierr_intr, 0,
1121 "SCHIZO_SERR", pbm);
1122 if (err)
1123 printk(KERN_WARNING "%s: Could not register SERR, "
1124 "err=%d\n", pbm->name, err);
1125 }
1094 1126
1095 /* Enable UE and CE interrupts for controller. */ 1127 /* Enable UE and CE interrupts for controller. */
1096 schizo_write(pbm->controller_regs + SCHIZO_ECC_CTRL, 1128 schizo_write(pbm->controller_regs + SCHIZO_ECC_CTRL,