Linux kernel staging patches
 help / color / mirror / Atom feed
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 3/3] staging: vc04_services: Drop global members for tracking connections
Date: Wed, 13 Mar 2024 08:31:37 +0300	[thread overview]
Message-ID: <9e4ef491-e5aa-4e3a-a9cf-bb688b24c2b7@moroto.mountain> (raw)
In-Reply-To: <20240311231607.124491-4-umang.jain@ideasonboard.com>

On Tue, Mar 12, 2024 at 04:46:07AM +0530, Umang Jain wrote:
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
> index 3cad13f09e37..4b79fccaa95e 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
> @@ -6,19 +6,13 @@
>  #include <linux/module.h>
>  #include <linux/mutex.h>
>  
> -#define  MAX_CALLBACKS  10
> -
> -static   int                        g_connected;
> -static   int                        g_num_deferred_callbacks;
> -static   void (*g_deferred_callback[MAX_CALLBACKS])(void);
> -static   int                        g_once_init;
>  static   DEFINE_MUTEX(g_connected_mutex);
>  
>  /* Function to initialize our lock */
> -static void connected_init(void)
> +static void connected_init(struct vchiq_connected *drv_connected)
>  {
> -	if (!g_once_init)
> -		g_once_init = 1;
> +	if (!drv_connected->once_init)
> +		drv_connected->once_init = 1;


This is a nonsense function...  once_init is never used.  Could you
delete this function in a separate patch at the start?

>  }
>  

Otherwise, I think it looks okay.  How are you testing this, btw?

regards,
dan carpenter


      reply	other threads:[~2024-03-13  5:31 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
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 [this message]

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=9e4ef491-e5aa-4e3a-a9cf-bb688b24c2b7@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).