* linux-next: rr/driver-core merge conflicts
@ 2008-05-29 5:58 Stephen Rothwell
2008-05-29 16:09 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2008-05-29 5:58 UTC (permalink / raw)
To: Rusty Russell, Greg KH; +Cc: Kay Sievers, linux-next
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
Hi Rusty,
Today's linux-next merge of the rr tree got a conflict in
drivers/virtio/virtio_pci.c between commit
6ddd7ce42a7bb3382a8bfb10caa6a5cce321b533 ("driver core: convert to new
device API to allow names longer than 20 chars") from the driver-core
tree and commit c77b394544154fdd2fb2211a2106fcc793aaa547
("virtio:pci-should-not-set-bus_id") from the rr tree. The latter
removes code that the former changed to use dev_set_name().
The second conflict was in drivers/virtio/virtio.c between the same
driver-core commit and commit a48130de9ad5da45f6d3035030e1fc975559e0e7
("virtio:bus_id-should-contain-virtio-name") from the rr tree. The
former did the dev_set_name() change while the latter added "virtio" to
the name. I did the obvious.
Greg, is there some way we could add a version of dev_set_name() to
current mainline now so that the conversions can be farmed out (or at
least be done in other trees destined for linux-next)?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: rr/driver-core merge conflicts
2008-05-29 5:58 linux-next: rr/driver-core merge conflicts Stephen Rothwell
@ 2008-05-29 16:09 ` Greg KH
2008-05-30 0:21 ` dev_set_name (Was: linux-next: rr/driver-core merge conflicts) Stephen Rothwell
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2008-05-29 16:09 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Rusty Russell, Kay Sievers, linux-next
On Thu, May 29, 2008 at 03:58:18PM +1000, Stephen Rothwell wrote:
> Hi Rusty,
>
> Today's linux-next merge of the rr tree got a conflict in
> drivers/virtio/virtio_pci.c between commit
> 6ddd7ce42a7bb3382a8bfb10caa6a5cce321b533 ("driver core: convert to new
> device API to allow names longer than 20 chars") from the driver-core
> tree and commit c77b394544154fdd2fb2211a2106fcc793aaa547
> ("virtio:pci-should-not-set-bus_id") from the rr tree. The latter
> removes code that the former changed to use dev_set_name().
If it's removed, that's the correct merge.
> The second conflict was in drivers/virtio/virtio.c between the same
> driver-core commit and commit a48130de9ad5da45f6d3035030e1fc975559e0e7
> ("virtio:bus_id-should-contain-virtio-name") from the rr tree. The
> former did the dev_set_name() change while the latter added "virtio" to
> the name. I did the obvious.
thanks, that sounds sane.
> Greg, is there some way we could add a version of dev_set_name() to
> current mainline now so that the conversions can be farmed out (or at
> least be done in other trees destined for linux-next)?
Yes, I'll do that today, thanks for the idea.
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* dev_set_name (Was: linux-next: rr/driver-core merge conflicts)
2008-05-29 16:09 ` Greg KH
@ 2008-05-30 0:21 ` Stephen Rothwell
2008-05-30 2:37 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2008-05-30 0:21 UTC (permalink / raw)
To: Greg KH; +Cc: Rusty Russell, Kay Sievers, linux-next
Hi Greg,
On Thu, 29 May 2008 09:09:44 -0700 Greg KH <greg@kroah.com> wrote:
>
> On Thu, May 29, 2008 at 03:58:18PM +1000, Stephen Rothwell wrote:
>
> > Greg, is there some way we could add a version of dev_set_name() to
> > current mainline now so that the conversions can be farmed out (or at
> > least be done in other trees destined for linux-next)?
>
> Yes, I'll do that today, thanks for the idea.
I was hoping for something really simple that even Linus would take -
like below (compile tested only).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
>From f40fb678c1f10c363297dbfc4c97e913bb7c58a8 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 30 May 2008 10:16:40 +1000
Subject: [PATCH] driver-core: preparte for 2.6.27 api change
Create the dev_set_name function now so that various subsystems can
start changing over to it before other changes in 2.6.27 will make it
compulsory.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/base/core.c | 15 +++++++++++++++
include/linux/device.h | 3 +++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 72eccae..422cfca 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -760,6 +760,21 @@ static void device_remove_class_symlinks(struct device *dev)
}
/**
+ * dev_set_name - set a device name
+ * @dev: device
+ */
+int dev_set_name(struct device *dev, const char *fmt, ...)
+{
+ va_list vargs;
+
+ va_start(vargs, fmt);
+ vsnprintf(dev->bus_id, sizeof(dev->bus_id), fmt, vargs);
+ va_end(vargs);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(dev_set_name);
+
+/**
* device_add - add device to device hierarchy.
* @dev: device.
*
diff --git a/include/linux/device.h b/include/linux/device.h
index 14616e8..6a2d04c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -385,6 +385,9 @@ static inline const char *dev_name(struct device *dev)
return dev->bus_id;
}
+extern int dev_set_name(struct device *dev, const char *name, ...)
+ __attribute__((format(printf, 2, 3)));
+
#ifdef CONFIG_NUMA
static inline int dev_to_node(struct device *dev)
{
--
1.5.5.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: dev_set_name (Was: linux-next: rr/driver-core merge conflicts)
2008-05-30 0:21 ` dev_set_name (Was: linux-next: rr/driver-core merge conflicts) Stephen Rothwell
@ 2008-05-30 2:37 ` Greg KH
2008-05-30 5:44 ` Stephen Rothwell
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2008-05-30 2:37 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Rusty Russell, Kay Sievers, linux-next
On Fri, May 30, 2008 at 10:21:54AM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> On Thu, 29 May 2008 09:09:44 -0700 Greg KH <greg@kroah.com> wrote:
> >
> > On Thu, May 29, 2008 at 03:58:18PM +1000, Stephen Rothwell wrote:
> >
> > > Greg, is there some way we could add a version of dev_set_name() to
> > > current mainline now so that the conversions can be farmed out (or at
> > > least be done in other trees destined for linux-next)?
> >
> > Yes, I'll do that today, thanks for the idea.
>
> I was hoping for something really simple that even Linus would take -
> like below (compile tested only).
Yes, I was trying to be "fancy" and actually make it work :)
I'll go merge your sane version in and send it to Linus, should help out
a lot.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dev_set_name (Was: linux-next: rr/driver-core merge conflicts)
2008-05-30 2:37 ` Greg KH
@ 2008-05-30 5:44 ` Stephen Rothwell
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2008-05-30 5:44 UTC (permalink / raw)
To: Greg KH; +Cc: Rusty Russell, Kay Sievers, linux-next
[-- Attachment #1: Type: text/plain, Size: 361 bytes --]
Hi Greg,
On Thu, 29 May 2008 19:37:50 -0700 Greg KH <greg@kroah.com> wrote:
>
> Yes, I was trying to be "fancy" and actually make it work :)
>
> I'll go merge your sane version in and send it to Linus, should help out
> a lot.
OK, thanks.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-05-30 5:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-29 5:58 linux-next: rr/driver-core merge conflicts Stephen Rothwell
2008-05-29 16:09 ` Greg KH
2008-05-30 0:21 ` dev_set_name (Was: linux-next: rr/driver-core merge conflicts) Stephen Rothwell
2008-05-30 2:37 ` Greg KH
2008-05-30 5:44 ` Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).