Browse Source

fix(scmi): fix compilation error in scmi base

Fix compilation error when scmi base in enabled.
The following compilation error is visible:
drivers/scmi-msg/base.c: In function 'discover_list_protocols':
include/lib/utils_def.h:70:20: error: comparison of distinct
 pointer types lacks a cast [-Werror]
   70 |         (void)(&_x == &_y);             \
      |                    ^~
drivers/scmi-msg/base.c:154:25: note: in expansion of macro 'MIN'
  154 |                 count = MIN(count - a2p->skip,
 msg->out_size - sizeof(p2a));

Change-Id: I79e60d4bc9c4f6e78a76099a36ebf4fe5212a7d1
Signed-off-by: Michal Simek <michal.simek@amd.com>
pull/1996/head
Michal Simek 2 years ago
parent
commit
7c3893423d
  1. 3
      drivers/scmi-msg/base.c

3
drivers/scmi-msg/base.c

@ -151,7 +151,8 @@ static void discover_list_protocols(struct scmi_msg *msg)
count = count_protocols_in_list(list);
if (count > a2p->skip) {
count = MIN(count - a2p->skip, msg->out_size - sizeof(p2a));
count = MIN((uint32_t)(count - a2p->skip),
(uint32_t)(msg->out_size - sizeof(p2a)));
} else {
count = 0U;
}

Loading…
Cancel
Save