Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2336599lqz; Tue, 2 Apr 2024 14:22:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUK8GjneKBl6iZyIwg7UTA7Fqmf1tIziChLge6u/lC183dKEQioW/IRfuhjBpUY5Hzhc9pntbtioHh3hBxCCEvwq5OciTUENu70Y7BpJA== X-Google-Smtp-Source: AGHT+IEnP+P4h1GxmBpr4Jkc8yRCgMiY+c9aYKvmQpyYJKWdFSk6t24JjdKP3QGWli8rEzNvCkym X-Received: by 2002:a05:6871:690:b0:22a:28b3:3e9c with SMTP id l16-20020a056871069000b0022a28b33e9cmr15050007oao.18.1712092953168; Tue, 02 Apr 2024 14:22:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712092953; cv=pass; d=google.com; s=arc-20160816; b=0pM6NDqOE1mNqD5sr+qb376EC4X2hJa94pVMNLXS4TILsRGj5LBm3XuQj/Vm+Ghs/t 7JlUdpCyYY2U/URK5JQwJvXMJtakOTS2OW4GJu3b9rW4ZKkIWt5upvymAzv0wfMaU5zq +7fNPnurPISBeW3E33z1bBTUA3EblhbynANWftjzx+d2wTTz0Ov2ucdakEVHZlG++05E exxSIA1mq6565Uu6y6SGOMENu5Wh+3sNcd6N/Voi7DVtoLToBr3UTYwixhpbUoriHpj9 wfuBL+zgMEnXwEE/J1E6R0R/kVer17iwQpl/NdkDxf98f0IOFzH4RujH26Gsskua0X/C qhjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=eQMAKNm4x5o6bm8iOpWRrD3LGQXGbtwgNNw4jtwCYd4=; fh=02SEi3wshS2L12B/UGZXIM05oTJXTvSL30x6bk1cQo8=; b=RixKJBg7aWdtbPUP0Ovi576Prrb+AQrj+ZKmTGeBM5RzRbHt8GZqwLIoz1gPJqGJu2 sbiasyVR02h3xqQjCkRRXDUQ6Kt/KUPKD/Mif8mZUjtj6zSsMeIMGMYYsITfDwZZa398 A3Ymkmpc5cB03DsG7KZEHkuv7gnQNOqhjKKHtyFPEUOcyZblA2h6Ag44+EQ2OY/uppbG 7kun2b5BqjgFGf+iKE05CsujbYLmxyHPOIc4kdYDYKWKu0mutNhHj2X0SEG4l8SOeexd 6331kj89WysiasWjLX0OAi8Q/oCiVfLfpEWC6/to467IZ3933kvyaM0+Zbc5iugOPijq BQOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=somainline.org); spf=pass (google.com: domain of linux-kernel+bounces-128690-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128690-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a7-20020a056a0011c700b006e558b4e179si11369327pfu.235.2024.04.02.14.22.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 14:22:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128690-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=somainline.org); spf=pass (google.com: domain of linux-kernel+bounces-128690-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128690-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1EEE0B22BC7 for ; Tue, 2 Apr 2024 21:00:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B496315E20A; Tue, 2 Apr 2024 21:00:36 +0000 (UTC) Received: from relay04.th.seeweb.it (relay04.th.seeweb.it [5.144.164.165]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7850179DD4 for ; Tue, 2 Apr 2024 21:00:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.144.164.165 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712091636; cv=none; b=ux72IXL/NW4grIMjhbT7MiIEswbBhCxiee+qM4xDiIU/pnCMeTQBKwPmPNphAoymRI1hzpoQtehiiB5N7QcOX64sR6+Lk2y4ROgq8b6w5kvFxlVWqABah5jDXGVGN3wOOai8j90UrL3330QWHxoxxEYobRsuzfwLQMp85VJJFOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712091636; c=relaxed/simple; bh=8NTqXgOWWcuq40W6UaNmXdNJpMviS07rSOpM1sm2UEY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GZxTwOGeapgxXxfl7t/CKImWV8rUx0c+4GaTsEISCZFJhvaOrfic12CNqVYLSQlmrcGEIBlOIzSOMs+FkX9RzFX+9YVKQ0y7DTjD6GxibnNq/uIGB5TeVOLomSQNXkbzTRFar48AD73kj1aubtQR2HFhXqP5Z8fBEMaPet7z4Ms= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org; spf=pass smtp.mailfrom=somainline.org; arc=none smtp.client-ip=5.144.164.165 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=somainline.org Received: from SoMainline.org (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id CF73D1F509; Tue, 2 Apr 2024 23:00:31 +0200 (CEST) Date: Tue, 2 Apr 2024 23:00:30 +0200 From: Marijn Suijten To: Dmitry Baryshkov Cc: Sumit Semwal , Caleb Connolly , Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v3 2/4] drm/mipi-dsi: use correct return type for the DSC functions Message-ID: References: <20240402-lg-sw43408-panel-v3-0-144f17a11a56@linaro.org> <20240402-lg-sw43408-panel-v3-2-144f17a11a56@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240402-lg-sw43408-panel-v3-2-144f17a11a56@linaro.org> On 2024-04-02 02:51:13, Dmitry Baryshkov wrote: > 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: f4dea1aaa9a1 ("drm/dsi: add helpers for DSI compression mode and PPS packets") > Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten > --- > drivers/gpu/drm/drm_mipi_dsi.c | 6 +++--- > include/drm/drm_mipi_dsi.h | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c > index ef6e416522f8..9874ff6d4718 100644 > --- a/drivers/gpu/drm/drm_mipi_dsi.c > +++ b/drivers/gpu/drm/drm_mipi_dsi.c > @@ -654,7 +654,7 @@ EXPORT_SYMBOL(mipi_dsi_set_maximum_return_packet_size); > * > * Return: 0 on success or a negative error code on failure. > */ > -ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable) > +int mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable) > { > /* Note: Needs updating for non-default PPS or algorithm */ > u8 tx[2] = { enable << 0, 0 }; > @@ -679,8 +679,8 @@ EXPORT_SYMBOL(mipi_dsi_compression_mode); > * > * Return: 0 on success or a negative error code on failure. > */ > -ssize_t mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi, > - const struct drm_dsc_picture_parameter_set *pps) > +int mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi, > + const struct drm_dsc_picture_parameter_set *pps) > { > struct mipi_dsi_msg msg = { > .channel = dsi->channel, > diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h > index c0aec0d4d664..3011d33eccbd 100644 > --- a/include/drm/drm_mipi_dsi.h > +++ b/include/drm/drm_mipi_dsi.h > @@ -241,9 +241,9 @@ int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi); > int mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi); > int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi, > u16 value); > -ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable); > -ssize_t mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi, > - const struct drm_dsc_picture_parameter_set *pps); > +int mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable); > +int mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi, > + const struct drm_dsc_picture_parameter_set *pps); > > ssize_t mipi_dsi_generic_write(struct mipi_dsi_device *dsi, const void *payload, > size_t size); > > -- > 2.39.2 >