From c6d336a8812e438aeabacd41a43a16e88a2969df Mon Sep 17 00:00:00 2001 From: Curtis Malainey Date: Tue, 10 Sep 2024 13:45:46 -0700 Subject: [PATCH] ipc3: fixup alignment of ext data Use macro instead of harder to read math check. Signed-off-by: Curtis Malainey --- src/ipc/ipc3/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc/ipc3/helper.c b/src/ipc/ipc3/helper.c index e86d7c25d94d..dc905edb27d6 100644 --- a/src/ipc/ipc3/helper.c +++ b/src/ipc/ipc3/helper.c @@ -114,7 +114,7 @@ static const struct comp_driver *get_drv(struct sof_ipc_comp *comp) } offset = comp->hdr.size - comp->ext_data_length; - if ((offset & 0x3) != 0) { + if (!IS_ALIGNED(offset, 4)) { tr_err(&comp_tr, "Invalid ext data offset %lx", offset); goto out; }