From: Roland Dreier <rolandd@cisco.com>
To: akpm@osdl.org
Cc: Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: Re: [PATCH 05/16] IB uverbs: core implementation
Date: Wed, 29 Jun 2005 10:01:53 -0700 [thread overview]
Message-ID: <52slz1drlq.fsf@topspin.com> (raw)
In-Reply-To: <20050629002709.GB17805@kroah.com> (Greg KH's message of "Tue, 28 Jun 2005 17:27:09 -0700")
Greg> This is no longer needed with the class device interface in
Greg> the kernel today. Please use the new api (basically just
Greg> set dev_t in the class_device, and you get this for free.)
Here's a patch that applies on top of this patch set that fixes this:
Greg KH pointed out that with the new class device code, we can just
set class_dev.devt instead of having our own show_dev() function.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
--- linux.orig/drivers/infiniband/core/uverbs_main.c 2005-06-28 15:20:04.000000000 -0700
+++ linux/drivers/infiniband/core/uverbs_main.c 2005-06-29 09:54:26.560138283 -0700
@@ -509,15 +509,6 @@
.remove = ib_uverbs_remove_one
};
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
- struct ib_uverbs_device *dev =
- container_of(class_dev, struct ib_uverbs_device, class_dev);
-
- return print_dev_t(buf, dev->dev.dev);
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
static ssize_t show_ibdev(struct class_device *class_dev, char *buf)
{
struct ib_uverbs_device *dev =
@@ -584,12 +575,11 @@
uverbs_dev->class_dev.class = &uverbs_class;
uverbs_dev->class_dev.dev = device->dma_device;
+ uverbs_dev->class_dev.devt = uverbs_dev->dev.dev;
snprintf(uverbs_dev->class_dev.class_id, BUS_ID_SIZE, "uverbs%d", uverbs_dev->devnum);
if (class_device_register(&uverbs_dev->class_dev))
goto err_cdev;
- if (class_device_create_file(&uverbs_dev->class_dev, &class_device_attr_dev))
- goto err_class;
if (class_device_create_file(&uverbs_dev->class_dev, &class_device_attr_ibdev))
goto err_class;
next prev parent reply other threads:[~2005-06-29 17:07 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-28 23:03 [PATCH 00/16] Add InfiniBand userspace verbs (direct userspace access) Roland Dreier
2005-06-28 23:03 ` [PATCH 01/16] IB uverbs: core API extensions Roland Dreier
2005-06-28 23:03 ` [PATCH 02/16] IB uverbs: update kernel midlayer for new API Roland Dreier
2005-06-28 23:03 ` [PATCH 03/16] IB uverbs: update mthca " Roland Dreier
2005-06-28 23:03 ` [PATCH 04/16] IB uverbs: add user verbs ABI header Roland Dreier
2005-06-28 23:03 ` [PATCH 05/16] IB uverbs: core implementation Roland Dreier
2005-06-28 23:03 ` [PATCH 06/16] IB uverbs: memory pinning implementation Roland Dreier
2005-06-28 23:03 ` [PATCH 07/16] IB uverbs: hook up Kconfig/Makefile Roland Dreier
2005-06-28 23:03 ` [PATCH 08/16] IB uverbs: add mthca ABI header Roland Dreier
2005-06-28 23:03 ` [PATCH 09/16] IB uverbs: add mthca user doorbell record support Roland Dreier
2005-06-28 23:03 ` [PATCH 10/16] IB uverbs: add mthca user context support Roland Dreier
2005-06-28 23:03 ` [PATCH 11/16] IB uverbs: add mthca mmap support Roland Dreier
2005-06-28 23:03 ` [PATCH 12/16] IB uverbs: add mthca user PD support Roland Dreier
2005-06-28 23:03 ` [PATCH 13/16] IB uverbs: add mthca user MR support Roland Dreier
2005-06-28 23:03 ` [PATCH 14/16] IB uverbs: add mthca user CQ support Roland Dreier
2005-06-28 23:03 ` [PATCH 15/16] IB uverbs: add mthca user QP support Roland Dreier
2005-06-28 23:03 ` [PATCH 16/16] IB uverbs: add documentation file Roland Dreier
2005-06-29 0:10 ` [PATCH 14/16] IB uverbs: add mthca user CQ support Andrew Morton
2005-06-29 16:06 ` Roland Dreier
2005-06-29 0:07 ` [PATCH 12/16] IB uverbs: add mthca user PD support Andrew Morton
2005-06-29 16:06 ` Roland Dreier
2005-06-29 0:05 ` [PATCH 11/16] IB uverbs: add mthca mmap support Andrew Morton
2005-06-29 16:06 ` Roland Dreier
2005-07-05 19:20 ` Roland Dreier
2005-07-05 20:53 ` Michael S. Tsirkin
2005-07-05 22:07 ` Roland Dreier
2005-06-29 0:02 ` [PATCH 06/16] IB uverbs: memory pinning implementation Andrew Morton
2005-06-29 16:06 ` Roland Dreier
2005-06-29 0:27 ` [PATCH 05/16] IB uverbs: core implementation Greg KH
2005-06-29 1:38 ` [openib-general] " Tom Duffy
2005-06-29 4:13 ` Troy Benjegerdes
2005-06-29 16:12 ` Greg KH
2005-06-29 16:32 ` Troy Benjegerdes
2005-06-29 16:06 ` Roland Dreier
2005-06-29 17:01 ` Roland Dreier [this message]
2005-06-29 18:03 ` Greg KH
2005-06-30 3:13 ` [openib-general] " Ronald G. Minnich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52slz1drlq.fsf@topspin.com \
--to=rolandd@cisco.com \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openib-general@openib.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox