From patchwork Sat Sep 26 08:16:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jaswinder Singh Rajput X-Patchwork-Id: 50217 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8Q8HD2t030412 for ; Sat, 26 Sep 2009 08:17:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751470AbZIZIRI (ORCPT ); Sat, 26 Sep 2009 04:17:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751467AbZIZIRI (ORCPT ); Sat, 26 Sep 2009 04:17:08 -0400 Received: from hera.kernel.org ([140.211.167.34]:42425 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbZIZIRH (ORCPT ); Sat, 26 Sep 2009 04:17:07 -0400 Received: from [192.168.1.220] (triband-del-59.180.65.68.bol.net.in [59.180.65.68] (may be forged)) (authenticated bits=0) by hera.kernel.org (8.14.2/8.13.8) with ESMTP id n8Q8GDGj024535 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 26 Sep 2009 08:16:38 GMT Subject: [PATCH] infiniband: fops_get is not required for core, uverbs_main.c From: Jaswinder Singh Rajput To: Roland Dreier , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, LKML Date: Sat, 26 Sep 2009 13:46:01 +0530 Message-Id: <1253952962.3897.2.camel@ht.satnam> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-2.fc10) X-Virus-Scanned: ClamAV 0.93.3/9840/Sat Sep 26 02:18:58 2009 on hera.kernel.org X-Virus-Status: Clean Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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 Cc: Roland Dreier Cc: Sean Hefty Cc: Hal Rosenstock --- 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;