From: Dan Carpenter <dan.carpenter@linaro.org>
To: Umang Jain <umang.jain@ideasonboard.com>
Cc: linux-staging@lists.linux.dev,
Stefan Wahren <stefan.wahren@i2se.com>,
Dan Carpenter <error27@gmail.com>,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Phil Elwell <phil@raspberrypi.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: Re: [PATCH 2/3] staging: v04_services: Add connection structure to driver data
Date: Wed, 13 Mar 2024 08:28:19 +0300 [thread overview]
Message-ID: <590966d6-dd65-4341-b1cd-10353fd1aa52@moroto.mountain> (raw)
In-Reply-To: <20240311231607.124491-3-umang.jain@ideasonboard.com>
On Tue, Mar 12, 2024 at 04:46:06AM +0530, Umang Jain wrote:
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> index 52569517ba4e..b8b51267bcde 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> @@ -72,10 +72,20 @@ static struct vchiq_device *bcm2835_camera;
>
> static struct vchiq_drvdata bcm2835_drvdata = {
> .cache_line_size = 32,
> + .drv_connected = {
> + .connected = 0,
> + .num_deferred_callbacks = 0,
> + .once_init = 0,
> + },
> };
>
> static struct vchiq_drvdata bcm2836_drvdata = {
> .cache_line_size = 64,
> + .drv_connected = {
> + .connected = 0,
> + .num_deferred_callbacks = 0,
> + .once_init = 0,
> + },
> };
>
Modifying vchiq_arm.c is unnecessary, because these are initialized to
zero by default. Once you remove that then this is quite small and
easier to review when it's merged together with patch 3.
> struct vchiq_arm_state {
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.h
> index e4ed56446f8a..cb5cba94dd54 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.h
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.h
> @@ -6,6 +6,16 @@
> #ifndef VCHIQ_CONNECTED_H
> #define VCHIQ_CONNECTED_H
>
> +#define VCHIQ_DRV_MAX_CALLBACKS 10
> +
> +struct vchiq_connected {
> + int connected;
connected should be type bool.
> + int num_deferred_callbacks;
> + int once_init;
> +
> + void (*deferred_callback[VCHIQ_DRV_MAX_CALLBACKS])(void);
> +};
regards,
dan carpenter
next prev parent reply other threads:[~2024-03-13 5:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 23:16 [PATCH 0/3] staging: vc04_services: Drop remaining global members Umang Jain
2024-03-11 23:16 ` [PATCH 1/3] staging: vc04_services: Move struct vchiq_drvdata to vchiq_core header Umang Jain
2024-03-11 23:16 ` [PATCH 2/3] staging: v04_services: Add connection structure to driver data Umang Jain
2024-03-13 5:28 ` Dan Carpenter [this message]
2024-03-11 23:16 ` [PATCH 3/3] staging: vc04_services: Drop global members for tracking connections Umang Jain
2024-03-13 5:31 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=590966d6-dd65-4341-b1cd-10353fd1aa52@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=error27@gmail.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-staging@lists.linux.dev \
--cc=phil@raspberrypi.com \
--cc=stefan.wahren@i2se.com \
--cc=umang.jain@ideasonboard.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox