Skip to contentSkip to conversation

virtio_blk: add missing __dev{init,exit} markings

PATCH In review Mike Frysinger 3 participants 5 messages May 18, 2009 – Jun 26, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio_blk: add missing __dev{init,exit} markings

The remove member of the virtio_driver structure uses __devexit_p(), so the remove function itself should be marked with __devexit. And where there be __devexit on the remove, so is there __devinit on the probe.

---
note: i dont actually know anything about virtio_blk, so this isnt tested in any way. simply noticed the hotplug discrepancies.

 drivers/block/virtio_blk.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/virtio_blk.c +2 -2
index 5d34764..bc4fabf 100644
@@ -190,7 +190,7 @@ static int index_to_minor(int index)
 	return index << PART_BITS;
 }
 
-static int virtblk_probe(struct virtio_device *vdev)
+static int __devinit virtblk_probe(struct virtio_device *vdev)
 {
 	struct virtio_blk *vblk;
 	int err;
@@ -330,7 +330,7 @@ out:
 	return err;
 }
 
-static void virtblk_remove(struct virtio_device *vdev)
+static void __devexit virtblk_remove(struct virtio_device *vdev)
 {
 	struct virtio_blk *vblk = vdev->priv;
 
Signature · 1 line
1.6.3
#1 lore raw

drivers/block/virtio_blk.c static int index_to_minor(int index) · line 193

Quoted 2 lines · Mike Frysinger
drivers/block/virtio_blk.c +1 -1
-static int virtblk_probe(struct virtio_device *vdev)
+static int __devinit virtblk_probe(struct virtio_device *vdev)

This makes sense, I think, but then it implies that virtio_dev_probe() should also be __devinit, right?

And I look at pci_bus_probe(), and it's not __devinit.

Is the PCI code just slack?
Rusty.

#2 lore raw
In reply to Mike Frysinger

drivers/block/virtio_blk.c static int index_to_minor(int index) · line 193

Quoted 2 lines · Mike Frysinger
drivers/block/virtio_blk.c +1 -1
-static int virtblk_probe(struct virtio_device *vdev)
+static int __devinit virtblk_probe(struct virtio_device *vdev)

This makes sense, I think, but then it implies that virtio_dev_probe() should also be __devinit, right?

And I look at pci_bus_probe(), and it's not __devinit.

Is the PCI code just slack?
Rusty.

#3 lore raw
Quoted 10 lines · On Wed, 20 May 2009 00:10:51 +0930 Rusty Russell <[email protected]> wrote:

drivers/block/virtio_blk.c static int index_to_minor(int index) · line 193

Quoted 2 lines · Mike Frysinger
drivers/block/virtio_blk.c +1 -1
-static int virtblk_probe(struct virtio_device *vdev)
+static int __devinit virtblk_probe(struct virtio_device *vdev)

This makes sense, I think, but then it implies that virtio_dev_probe() should also be __devinit, right?

And I look at pci_bus_probe(), and it's not __devinit.

Is the PCI code just slack?

I wouldn't be surprised if some annotations were missing or incorrect given the churn in hotplug lately, but I can't find that particular symbol...

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#4 lore raw
In reply to Rusty Russell
Quoted 10 lines · On Wed, 20 May 2009 00:10:51 +0930 Rusty Russell <[email protected]> wrote:

drivers/block/virtio_blk.c static int index_to_minor(int index) · line 193

Quoted 2 lines · Mike Frysinger
drivers/block/virtio_blk.c +1 -1
-static int virtblk_probe(struct virtio_device *vdev)
+static int __devinit virtblk_probe(struct virtio_device *vdev)

This makes sense, I think, but then it implies that virtio_dev_probe() should also be __devinit, right?

And I look at pci_bus_probe(), and it's not __devinit.

Is the PCI code just slack?

I wouldn't be surprised if some annotations were missing or incorrect given the churn in hotplug lately, but I can't find that particular symbol...

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center