Skip to content

Commit f1ed48e

Browse files
Lorenzo Pieralisisudeep-holla
authored andcommitted
firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling
To parse the retrieved ID lists appropriately in ffa_notification_info_get() the ids_processed variable should not be pre-incremented - we are dropping an identifier at the beginning of the list. Fix it by using the post-increment operator to increment the number of processed IDs. Fixes: 3522be4 ("firmware: arm_ffa: Implement the NOTIFICATION_INFO_GET interface") Signed-off-by: Lorenzo Pieralisi <[email protected]> Cc: Sudeep Holla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sudeep Holla <[email protected]>
1 parent 05857a1 commit f1ed48e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/firmware/arm_ffa/driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ static void ffa_notification_info_get(void)
783783
if (ids_processed >= max_ids - 1)
784784
break;
785785

786-
part_id = packed_id_list[++ids_processed];
786+
part_id = packed_id_list[ids_processed++];
787787

788788
if (!ids_count[list]) { /* Global Notification */
789789
__do_sched_recv_cb(part_id, 0, false);
@@ -795,7 +795,7 @@ static void ffa_notification_info_get(void)
795795
if (ids_processed >= max_ids - 1)
796796
break;
797797

798-
vcpu_id = packed_id_list[++ids_processed];
798+
vcpu_id = packed_id_list[ids_processed++];
799799

800800
__do_sched_recv_cb(part_id, vcpu_id, true);
801801
}

0 commit comments

Comments
 (0)