Skip to contentSkip to conversation

powerpc/xive: Native exploitation of the XIVE interrupt controller

bug report Dan Carpenter 2 participants 2 messages Apr 20, 2017

lore
Share & tools
lore
#0 lore raw

Hello Benjamin Herrenschmidt,

The patch 243e25112d06: "powerpc/xive: Native exploitation of the XIVE interrupt controller" from Apr 5, 2017, leads to the following static checker warning:

arch/powerpc/sysdev/xive/native.c:184 __xive_native_disable_queue()
info: ignoring unreachable code.

arch/powerpc/sysdev/xive/native.c
176 static void __xive_native_disable_queue(u32 vp_id, struct xive_q *q, u8 prio) 177 {
178 s64 rc;
179
180 /* Disable the queue in HW */
181 for (;;) {
182 rc = opal_xive_set_queue_info(vp_id, prio, 0, 0, 0);
183 break;

This should be "if (!rc) break;"

   184                  msleep(1);
   185          }
   186          if (rc)

But we need some kind of timeout to ever print this error message.

187 pr_err("Error %lld disabling queue for prio %d\n", rc, prio);
188 }

regards,
dan carpenter

#1 lore raw
Quoted 22 lines · Dan Carpenter

Hello Benjamin Herrenschmidt,

The patch 243e25112d06: "powerpc/xive: Native exploitation of the XIVE interrupt controller" from Apr 5, 2017, leads to the following static checker warning:

arch/powerpc/sysdev/xive/native.c:184
__xive_native_disable_queue()
info: ignoring unreachable code.

arch/powerpc/sysdev/xive/native.c
   176  static void __xive_native_disable_queue(u32 vp_id, struct xive_q *q, u8 prio)
   177  {
   178          s64 rc;
   179
   180          /* Disable the queue in HW */
   181          for (;;) {
   182                  rc = opal_xive_set_queue_info(vp_id, prio, 0, 0, 0);
   183                          break;

Quoted 1 line

This should be "if (!rc) break;"

Thanks, for some reason that line got accidentally dropped... oops.

Quoted 13 lines

   184                  msleep(1);
   185          }
   186          if (rc)

But we need some kind of timeout to ever print this error message.

   187                  pr_err("Error %lld disabling queue for prio %d\n", rc, prio);
   188  }

regards,
dan carpenter