fops_get is useless as 'uverbs_event_fops' will always be 'true'. This also fix compilation warning :
CC [M] drivers/infiniband/core/uverbs_main.o drivers/infiniband/core/uverbs_main.c: In function ‘ib_uverbs_alloc_event_file’: drivers/infiniband/core/uverbs_main.c:522: warning: the address of ‘uverbs_event_fops’ will always evaluate as ‘true’ Signed-off-by: Jaswinder Singh Rajput <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Sean Hefty <[email protected]> Cc: Hal Rosenstock <[email protected]> --- drivers/infiniband/core/uverbs_main.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index d3fff9e..a59ddd1 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -513,13 +513,8 @@ struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file, goto err; } - /* - * fops_get() can't fail here, because we're coming from a - * system call on a uverbs file, which will already have a - * module reference. - */ filp = alloc_file(uverbs_event_mnt, dget(uverbs_event_mnt->mnt_root), - FMODE_READ, fops_get(&uverbs_event_fops)); + FMODE_READ, &uverbs_event_fops); if (!filp) { ret = -ENFILE; goto err_fd; -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
