[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170615052636.GB29481@kroah.com>
Date: Thu, 15 Jun 2017 07:26:36 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: "Edward A. James" <eajames@...ibm.com>
Cc: linux-kernel@...r.kernel.org, bradleyb@...ziesquirrel.com,
jk@...abs.org, cbostic@...ux.vnet.ibm.com, joel@....id.au,
andrew@...id.au
Subject: Re: [PATCH linux] drivers/fsi: Add SBEFIFO FSI client device driver
On Wed, Jun 14, 2017 at 02:47:27PM -0500, Edward A. James wrote:
> +struct sbefifo {
> + struct timer_list poll_timer;
> + struct fsi_device *fsi_dev;
> + struct miscdevice mdev;
> + wait_queue_head_t wait;
> + struct list_head link;
> + struct list_head xfrs;
> + struct kref kref;
> + spinlock_t lock;
> + char name[32];
> + int idx;
> + int rc;
> +};
You have a misc device, a pointer to a fsi_device, and a kref in this
structure. Which one actually does the reference counting? It seems
there are 3 different ways it could happen. That's not right at all,
and ripe for lots and lots of confusion. Only use one please.
thanks,
greg k-h
Powered by blists - more mailing lists