lkml.org 
[lkml]   [2013]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] uio: add uio_event_sync interface
On Wed, Aug 14, 2013 at 08:30:23PM +0800, Xiaolong Ye wrote:
> This interface is called to sync listener->event_count and device
> event count in multi-instances case.
>
> Change-Id: Ibb1e4888ce55b4993394b61e4bcd6dce8b8291f0

What is this for? (hint, it should never be in a kernel patch...)

> Signed-off-by: Xiaolong Ye <yexl@marvell.com>
> ---
> drivers/uio/uio.c | 12 ++++++++++++
> include/linux/uio_driver.h | 1 +
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
> index ba47563..95d559f 100644
> --- a/drivers/uio/uio.c
> +++ b/drivers/uio/uio.c
> @@ -408,6 +408,18 @@ void uio_event_notify(struct uio_info *info)
> EXPORT_SYMBOL_GPL(uio_event_notify);
>
> /**
> + * uio_event_sync - sync listener's event count with UIO device
> + * @listener: uio_listener structure
> + */
> +void uio_event_sync(struct uio_listener *listener)
> +{
> + struct uio_device *idev = listener->dev;
> +
> + listener->event_count = atomic_read(&idev->event);

What prevents that count from changing right after you call this
function?

> +}
> +EXPORT_SYMBOL_GPL(uio_event_sync);

You are exporting a symbol, yet never using it, which means I can't
accept this patch, sorry.

greg k-h


\
 
 \ /
  Last update: 2013-08-15 05:21    [W:0.399 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site