Skip to contentSkip to conversation

infiniband: fops_get is not required for core, uverbs_main.c

PATCH New Jaswinder Singh Rajput 1 participant 1 message Sep 26, 2009 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 infiniband: fops_get is not required for core, uverbs_main.c

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’

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(-)
drivers/infiniband/core/uverbs_main.c +1 -6
index d3fff9e..a59ddd1 100644
@@ -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;
Signature · 7 lines
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