powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Wed, 29 Jun 2016 03:38:38 +0000 (13:38 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jun 2016 07:33:18 +0000 (17:33 +1000)
commitd0226d315dba5e401a124b394a1af5e35e082b08
tree1cd2e85e40b4e49bc53c7de0232d56f69f6daadf
parent1ae88fd54c3ac31f68f91e37f719be7e2dbcc810
powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg

An opal_msg of type OPAL_MSG_ASYNC_COMP contains the return code in the
params[1] struct member. However this isn't intuitive or obvious when
reading the code and requires that a user look at the skiboot
documentation or opal-api.h to verify this.

Add an inline function to get the return code from an opal_msg and update
call sites accordingly.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/opal.h
arch/powerpc/platforms/powernv/opal-sensor.c
arch/powerpc/platforms/powernv/opal-sysparam.c
drivers/i2c/busses/i2c-opal.c
drivers/leds/leds-powernv.c
drivers/mtd/devices/powernv_flash.c
drivers/rtc/rtc-opal.c