lkml.org 
[lkml]   [2017]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] NTB: ntb_tool: Add full multi-port NTB API support


On 08/08/17 04:11 AM, Serge Semin wrote:
> +static ssize_t tool_db_event_write(struct file *filep,
> + const char __user *ubuf,
> + size_t size, loff_t *offp)
> +{
> + struct tool_ctx *tc = filep->private_data;
> + u64 val;
> + int ret;
> +
> + ret = kstrtou64_from_user(ubuf, size, 0, &val);
> + if (ret)
> + return ret;
> +
> + if (wait_event_interruptible(tc->db_wq, ntb_db_read(tc->ntb) == val))
> + return -ERESTART;
> +
> + return size;
> +}

Also, I like the fact that we are adding a db_event feature, however
this really needs to be a separate commit as it's a completely different
feature and not even mentioned in the commit message. There's a few of
these instances.

Logan

\
 
 \ /
  Last update: 2017-08-08 20:26    [W:0.060 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site