diff mbox series

[v4,03/15] drivers/firmware/sdei: Retrieve event number from event instance

Message ID 20200730014531.310465-4-gshan@redhat.com (mailing list archive)
State New, archived
Headers show
Series Refactor SDEI client driver | expand

Commit Message

Gavin Shan July 30, 2020, 1:45 a.m. UTC
In sdei_event_create(), the event number is retrieved from the
variable @event_num for the shared event. The event number was
stored in the event instance. So we can fetch it from the event
instance, similar to what we're doing for the private event.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/firmware/arm_sdei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Morse Sept. 18, 2020, 4:11 p.m. UTC | #1
On 30/07/2020 02:45, Gavin Shan wrote:
> In sdei_event_create(), the event number is retrieved from the
> variable @event_num for the shared event. The event number was
> stored in the event instance. So we can fetch it from the event
> instance, similar to what we're doing for the private event.
> 
> Signed-off-by: Gavin Shan <gshan@redhat.com>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

(I don't think patches like this are worth the effort)

Acked-by: James Morse <james.morse@arm.com>


Thanks,

James
diff mbox series

Patch

diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
index 67da02b3a06e..86ab878d1198 100644
--- a/drivers/firmware/arm_sdei.c
+++ b/drivers/firmware/arm_sdei.c
@@ -217,7 +217,7 @@  static struct sdei_event *sdei_event_create(u32 event_num,
 			goto fail;
 		}
 
-		reg->event_num = event_num;
+		reg->event_num = event->event_num;
 		reg->priority = event->priority;
 
 		reg->callback = cb;