[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bfe6dc7b-d34a-444b-98dd-a4b63e0bb751@stanley.mountain>
Date: Sun, 13 Oct 2024 14:59:46 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Umang Jain <umang.jain@...asonboard.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Kieran Bingham <kieran.bingham@...asonboard.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
kernel-list@...pberrypi.com, Stefan Wahren <wahrenst@....net>
Subject: Re: [PATCH v3 4/6] staging: vchiq_core: Refactor notify_bulks()
On Sun, Oct 13, 2024 at 12:26:50AM +0530, Umang Jain wrote:
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> index e9cd012e2b5f..19dfcd98dcde 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
> @@ -1309,6 +1309,49 @@ get_bulk_reason(struct vchiq_bulk *bulk)
> return VCHIQ_BULK_RECEIVE_DONE;
> }
>
> +static int service_notify_bulk(struct vchiq_service *service,
> + struct vchiq_bulk *bulk)
> +{
> + int status = -EINVAL;
> +
> + if (!service || !bulk)
> + return status;
I mean, I still wish you would return -EINVAL directly here. :/
> +
> + if (bulk->actual != VCHIQ_BULK_ACTUAL_ABORTED) {
> + if (bulk->dir == VCHIQ_BULK_TRANSMIT) {
> + VCHIQ_SERVICE_STATS_INC(service, bulk_tx_count);
> + VCHIQ_SERVICE_STATS_ADD(service, bulk_tx_bytes,
> + bulk->actual);
> + } else {
> + VCHIQ_SERVICE_STATS_INC(service, bulk_rx_count);
> + VCHIQ_SERVICE_STATS_ADD(service, bulk_rx_bytes,
> + bulk->actual);
> + }
^
Indented too far.
regards,
dan carpenter
Powered by blists - more mailing lists