[Cbe-oss-dev] [PATCH] cell: remove unused struct spu variable

Geoff Levand geoffrey.levand at am.sony.com
Thu Oct 12 09:42:34 EST 2006


Arnd,

I found this unused declaration for attach_sysdev_to_node() also.
Updated patch follows.

Did you want me to send this kind of thing to you, or straight to
Paul?

-Geoff


Remove the mostly unused variable isrc from struct spu and a forgotten
function declaration.

Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>

---

Index: cell--common--5/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- cell--common--5.orig/arch/powerpc/platforms/cell/spu_base.c
+++ cell--common--5/arch/powerpc/platforms/cell/spu_base.c
@@ -365,8 +365,7 @@
 	if (!list_empty(&spu_list[node])) {
 		spu = list_entry(spu_list[node].next, struct spu, list);
 		list_del_init(&spu->list);
-		pr_debug("Got SPU %x %d %d\n",
-			 spu->isrc, spu->number, spu->node);
+		pr_debug("Got SPU %d %d\n", spu->number, spu->node);
 		spu_init_channels(spu);
 	}
 	mutex_unlock(&spu_mutex);
@@ -593,7 +592,6 @@
 
 	/* Add the node number */
 	isrc |= spu->node << IIC_IRQ_NODE_SHIFT;
-	spu->isrc = isrc;
 
 	/* Now map interrupts of all 3 classes */
 	spu->irqs[0] = irq_create_mapping(NULL, IIC_IRQ_CLASS_0 | isrc);
@@ -735,14 +733,6 @@
 	set_kset_name("spu")
 };
 
-static ssize_t spu_show_isrc(struct sys_device *sysdev, char *buf)
-{
-	struct spu *spu = container_of(sysdev, struct spu, sysdev);
-	return sprintf(buf, "%d\n", spu->isrc);
-
-}
-static SYSDEV_ATTR(isrc, 0400, spu_show_isrc, NULL);
-
 int spu_add_sysdev_attr(struct sysdev_attribute *attr)
 {
 	struct spu *spu;
@@ -768,8 +758,6 @@
 }
 EXPORT_SYMBOL_GPL(spu_remove_sysdev_attr);
 
-extern int attach_sysdev_to_node(struct sys_device *dev, int nid);
-
 static int spu_create_sysdev(struct spu *spu)
 {
 	int ret;
@@ -783,8 +771,6 @@
 		return ret;
 	}
 
-	if (spu->isrc != 0)
-		sysdev_create_file(&spu->sysdev, &attr_isrc);
 	sysfs_add_device_to_node(&spu->sysdev, spu->nid);
 
 	return 0;
@@ -792,7 +778,6 @@
 
 static void spu_destroy_sysdev(struct spu *spu)
 {
-	sysdev_remove_file(&spu->sysdev, &attr_isrc);
 	sysfs_remove_device_from_node(&spu->sysdev, spu->nid);
 	sysdev_unregister(&spu->sysdev);
 }
@@ -844,8 +829,8 @@
 
 	mutex_unlock(&spu_mutex);
 
-	pr_debug(KERN_DEBUG "Using SPE %s %02x %p %p %p %p %d\n",
-		spu->name, spu->isrc, spu->local_store,
+	pr_debug(KERN_DEBUG "Using SPE %s %p %p %p %p %d\n",
+		spu->name, spu->local_store,
 		spu->problem, spu->priv1, spu->priv2, spu->number);
 	goto out;
 
Index: cell--common--5/include/asm-powerpc/spu.h
===================================================================
--- cell--common--5.orig/include/asm-powerpc/spu.h
+++ cell--common--5/include/asm-powerpc/spu.h
@@ -121,7 +121,6 @@
 	int number;
 	int nid;
 	unsigned int irqs[3];
-	u32 isrc;
 	u32 node;
 	u64 flags;
 	u64 dar;




More information about the cbe-oss-dev mailing list