From 3cc207bc03e43f9fb28f0039e7a1e99d3e8d339f Mon Sep 17 00:00:00 2001 From: Matt Coster Date: Wed, 29 Jun 2022 11:04:30 +0100 Subject: [PATCH] pvr: Add a const qualifier to inline pvr_csb_*() helpers These do not modify the input struct pvr_csb at all, so the function signature should reflect this. Signed-off-by: Matt Coster Reviewed-by: Frank Binns Part-of: --- src/imagination/vulkan/pvr_csb.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/imagination/vulkan/pvr_csb.h b/src/imagination/vulkan/pvr_csb.h index 500b5e1296d..9023846b128 100644 --- a/src/imagination/vulkan/pvr_csb.h +++ b/src/imagination/vulkan/pvr_csb.h @@ -88,7 +88,7 @@ struct pvr_csb { * \return VK_SUCCESS if the csb hasn't encountered any error or error code * otherwise. */ -static inline VkResult pvr_csb_get_status(struct pvr_csb *csb) +static inline VkResult pvr_csb_get_status(const struct pvr_csb *csb) { return csb->status; } @@ -99,12 +99,13 @@ static inline VkResult pvr_csb_get_status(struct pvr_csb *csb) * \param[in] csb Control Stream Builder object. * \return true if csb is empty false otherwise. */ -static inline bool pvr_csb_is_empty(struct pvr_csb *csb) +static inline bool pvr_csb_is_empty(const struct pvr_csb *csb) { return list_is_empty(&csb->pvr_bo_list); } -static inline pvr_dev_addr_t pvr_csb_get_start_address(struct pvr_csb *csb) +static inline pvr_dev_addr_t +pvr_csb_get_start_address(const struct pvr_csb *csb) { if (!pvr_csb_is_empty(csb)) { struct pvr_bo *pvr_bo =