[bug report] powernv/opal: Convert opal message events to opal irq domain
Dan Carpenter
dan.carpenter at oracle.com
Wed Feb 15 03:21:28 AEDT 2017
Hello Alistair Popple,
The patch a295af24d0d2: "powernv/opal: Convert opal message events to
opal irq domain" from May 15, 2015, leads to the following static
checker warning:
arch/powerpc/platforms/powernv/opal.c:297 opal_message_init()
info: return a literal instead of 'irq'
arch/powerpc/platforms/powernv/opal.c
286 static int __init opal_message_init(void)
287 {
288 int ret, i, irq;
289
290 for (i = 0; i < OPAL_MSG_TYPE_MAX; i++)
291 ATOMIC_INIT_NOTIFIER_HEAD(&opal_msg_notifier_head[i]);
292
293 irq = opal_event_request(ilog2(OPAL_EVENT_MSG_PENDING));
294 if (!irq) {
295 pr_err("%s: Can't register OPAL event irq (%d)\n",
296 __func__, irq);
297 return irq;
This code doesn't really make sense. I'm not really certain what it
should be...
298 }
299
300 ret = request_irq(irq, opal_message_notify,
301 IRQ_TYPE_LEVEL_HIGH, "opal-msg", NULL);
302 if (ret) {
303 pr_err("%s: Can't request OPAL event irq (%d)\n",
304 __func__, ret);
305 return ret;
306 }
307
308 return 0;
309 }
regards,
dan carpenter
More information about the Linuxppc-dev
mailing list