Skip to content

Commit de1c705

Browse files
committed
drm/mipi-dsi: use correct return type for the DSC functions
The functions mipi_dsi_compression_mode() and mipi_dsi_picture_parameter_set() return 0-or-error rather than a buffer size. Follow example of other similar MIPI DSI functions and use int return type instead of size_t. Fixes: f4dea1a ("drm/dsi: add helpers for DSI compression mode and PPS packets") Reviewed-by: Marijn Suijten <[email protected]> Reviewed-by: Jessica Zhang <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent bf6302e commit de1c705

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/gpu/drm/drm_mipi_dsi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ EXPORT_SYMBOL(mipi_dsi_set_maximum_return_packet_size);
654654
*
655655
* Return: 0 on success or a negative error code on failure.
656656
*/
657-
ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable)
657+
int mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable)
658658
{
659659
/* Note: Needs updating for non-default PPS or algorithm */
660660
u8 tx[2] = { enable << 0, 0 };
@@ -679,8 +679,8 @@ EXPORT_SYMBOL(mipi_dsi_compression_mode);
679679
*
680680
* Return: 0 on success or a negative error code on failure.
681681
*/
682-
ssize_t mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi,
683-
const struct drm_dsc_picture_parameter_set *pps)
682+
int mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi,
683+
const struct drm_dsc_picture_parameter_set *pps)
684684
{
685685
struct mipi_dsi_msg msg = {
686686
.channel = dsi->channel,

include/drm/drm_mipi_dsi.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi);
241241
int mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi);
242242
int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi,
243243
u16 value);
244-
ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable);
245-
ssize_t mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi,
246-
const struct drm_dsc_picture_parameter_set *pps);
244+
int mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable);
245+
int mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi,
246+
const struct drm_dsc_picture_parameter_set *pps);
247247

248248
ssize_t mipi_dsi_generic_write(struct mipi_dsi_device *dsi, const void *payload,
249249
size_t size);

0 commit comments

Comments
 (0)