mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
drm/nouveau: remove the magic number in r535_gsp_rpc_push()
There has been a GSP_MSG_MAX_SIZE which represents the max size of a GSP message element header. Use it instead of a magic number. No functional change is intended. Signed-off-by: Zhi Wang <zhiw@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-9-zhiw@nvidia.com
This commit is contained in:
parent
bbae6680cf
commit
1bb9bb50a4
|
|
@ -796,7 +796,7 @@ r535_gsp_rpc_push(struct nvkm_gsp *gsp, void *payload, bool wait,
|
|||
{
|
||||
struct nvfw_gsp_rpc *rpc = to_gsp_hdr(payload, rpc);
|
||||
struct r535_gsp_msg *cmd = to_gsp_hdr(rpc, cmd);
|
||||
const u32 max_msg_size = (16 * 0x1000) - sizeof(struct r535_gsp_msg);
|
||||
const u32 max_msg_size = GSP_MSG_MAX_SIZE - sizeof(*cmd);
|
||||
const u32 max_rpc_size = max_msg_size - sizeof(*rpc);
|
||||
u32 rpc_size = rpc->length - sizeof(*rpc);
|
||||
void *repv;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user