Skip to content

Commit

Permalink
smcinvoke: Fix the error of repeated definition of size_add
Browse files Browse the repository at this point in the history
Conflicts with this commit from upstream: 2b46db3
  • Loading branch information
Pzqqt committed Dec 9, 2023
1 parent aa7ce4e commit c00ad98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/soc/qcom/smcinvoke.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ static struct smcinvoke_cb_txn *find_cbtxn_locked(
* size_add saturates at SIZE_MAX. If integer overflow is detected,
* this function would return SIZE_MAX otherwise normal a+b is returned.
*/
static inline size_t size_add(size_t a, size_t b)
static inline size_t _size_add(size_t a, size_t b)
{
return (b > (SIZE_MAX - a)) ? SIZE_MAX : a + b;
}
Expand All @@ -918,7 +918,7 @@ static inline size_t pad_size(size_t a, size_t b)
*/
static inline size_t size_align(size_t a, size_t b)
{
return size_add(a, pad_size(a, b));
return _size_add(a, pad_size(a, b));
}

static uint16_t get_server_id(int cb_server_fd)
Expand Down Expand Up @@ -1767,7 +1767,7 @@ static size_t compute_in_msg_size(const struct smcinvoke_cmd_req *req,

/* each buffer has to be 8 bytes aligned */
while (i < SMCI_OBJECT_COUNTS_NUM_BUFFERS(req->counts))
total_size = size_add(total_size,
total_size = _size_add(total_size,
size_align(args_buf[i++].b.size,
SMCINVOKE_ARGS_ALIGN_SIZE));

Expand Down

0 comments on commit c00ad98

Please sign in to comment.