mbox series

[0/7] staging: vc04_services: Remove custom return values

Message ID 20221215065853.34477-1-umang.jain@ideasonboard.com
Headers show
Series staging: vc04_services: Remove custom return values | expand

Message

Umang Jain Dec. 15, 2022, 6:58 a.m. UTC
The series removes the custom return values from functions
and replaces them with linux error codes. This address the TODO
 vchiq interface:
* Get rid of custom function return values

Umang Jain (7):
  staging: vc04_services: Replace vchiq_status return type to int
  staging: vc04_services: Drop VCHIQ_SUCCESS usage
  staging: vc04_services: Drop VCHIQ_ERROR usage
  staging: vc04_services: Drop VCHIQ_RETRY usage
  vc04_services: vchiq_arm: Drop VCHIQ_RETRY usage on disconnect
  staging: vc04_services: Drop enum vchiq_status remnants
  staging: vc04_services: vchiq: Drop custom return values from TODO

 .../bcm2835-audio/bcm2835-vchiq.c             |  12 +-
 .../include/linux/raspberrypi/vchiq.h         |  65 +++---
 drivers/staging/vc04_services/interface/TODO  |   5 -
 .../interface/vchiq_arm/vchiq_arm.c           | 122 +++++-----
 .../interface/vchiq_arm/vchiq_arm.h           |  12 +-
 .../interface/vchiq_arm/vchiq_core.c          | 216 +++++++++---------
 .../interface/vchiq_arm/vchiq_core.h          |  18 +-
 .../interface/vchiq_arm/vchiq_dev.c           |  36 +--
 .../interface/vchiq_arm/vchiq_ioctl.h         |   8 +-
 .../vc04_services/vchiq-mmal/mmal-vchiq.c     |  11 +-
 10 files changed, 245 insertions(+), 260 deletions(-)

Comments

kernel test robot Dec. 15, 2022, 7:59 a.m. UTC | #1
On Thu, Dec 15, 2022 at 12:28:51PM +0530, Umang Jain wrote:
> Drop the usage of VCHIQ_RETRY when the vchiq has connection status
> VCHIQ_CONNSTATE_DISCONNECTED. Disconnected is will not be valid to
> carry on a retry, replace the VCHIQ_RETRY with -EINVAL.
> 
> This patch removes the usage of vCHIQ_RETRY completely and act as
> intermediatory to address the TODO item:
> 	* Get rid of custom function return values
> for vc04_services/interface.
> 
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> ---

It sounds like this should have a Fixes tag because the original
behavior was wrong.

regards,
dan carpenter
Umang Jain Dec. 15, 2022, 1:26 p.m. UTC | #2
Hi Stefan,

On 12/15/22 5:00 PM, Stefan Wahren wrote:
> Hi Umang,
>
> thanks for taking care of this.
>
> Am 15.12.22 um 07:58 schrieb Umang Jain:
>> Drop the usage of VCHIQ_ERROR vchiq_status enum type. Replace it with
>> -EINVAL to report the error.
>
> I would prefer to use adequate error codes like ENOMEM and so on. I 
> agree simply replacing all VCHIQ_ERROR with -EINVAL is easier, but 
> wasn't the real intention of the TODO item.

I agree with you on that front - I am still trying to understand the 
bits of pieces of the vchiq driver as you can see it's not obvious to me.

I will try to address this is in v2 - after the series a bit more feedback.
>
> The rest of the series looks good to me.

Okay :-)
Thanks for prompt review.
>
> Best regards
>