• Matt Redfearn's avatar
    genirq: Add error code reporting to irq_{reserve,destroy}_ipi · 7cec18a3
    Matt Redfearn authored
    Make these functions return appropriate error codes when something goes
    wrong.
    
    Previously irq_destroy_ipi returned void making it impossible to notify
    the caller if the request could not be fulfilled. Patch 1 in the series
    added another condition in which this could fail in addition to the
    existing ones. irq_reserve_ipi returned an unsigned int meaning it could
    only return 0 on failure and give the caller no indication as to why the
    request failed.
    
    As time goes on there are likely to be further conditions added in which
    these functions can fail. These APIs and the IPI IRQ domain are new in
    4.6 and the number of existing call sites are low, changing the API now
    has little impact on the code, while making it easier for these
    functions to grow over time.
    Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Cc: jason@lakedaemon.net
    Cc: marc.zyngier@arm.com
    Cc: ralf@linux-mips.org
    Cc: Qais Yousef <qsyousef@gmail.com>
    Cc: lisa.parratt@imgtec.com
    Cc: jiang.liu@linux.intel.com
    Link: http://lkml.kernel.org/r/1461568464-31701-2-git-send-email-matt.redfearn@imgtec.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    7cec18a3
irqdomain.h 16.5 KB