linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: s390 build failure
@ 2008-06-20  3:52 Stephen Rothwell
  2008-06-20  7:58 ` Cornelia Huck
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2008-06-20  3:52 UTC (permalink / raw)
  To: Greg KH; +Cc: Cornelia Huck, linux-next, Martin Schwidefsky

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

Hi Greg, Cornelia,

Yesterday's (and back to next-20080612) linux-next build (s390
allnoconfig (and others) with an s390s compiler) fails with this error:

drivers/s390/cio/cio.c:573: error: 'struct device' has no member named 'init_name'

Bisecting lead to the commit "s390: bus_id -> dev_set_name() changes" in
the driver-core tree.  I suspect this was caused by the removal of
"driver core: add init_name to struct device" from the driver-core tree
on June 11 (even though the former patch was earlier in the series then
the latter).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: s390 build failure
  2008-06-20  3:52 linux-next: s390 build failure Stephen Rothwell
@ 2008-06-20  7:58 ` Cornelia Huck
  2008-06-23 15:22   ` Cornelia Huck
  0 siblings, 1 reply; 6+ messages in thread
From: Cornelia Huck @ 2008-06-20  7:58 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Greg KH, linux-next, Martin Schwidefsky

On Fri, 20 Jun 2008 13:52:57 +1000,
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Bisecting lead to the commit "s390: bus_id -> dev_set_name() changes" in
> the driver-core tree.  I suspect this was caused by the removal of
> "driver core: add init_name to struct device" from the driver-core tree
> on June 11 (even though the former patch was earlier in the series then
> the latter).

Yes, this patch should go after the introduction of init_name (and be
commented out in Greg's series file). I could also try to split out
dev_set_name() conversion from the init_name stuff, but I fear that
doesn't make much sense...

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: s390 build failure
  2008-06-20  7:58 ` Cornelia Huck
@ 2008-06-23 15:22   ` Cornelia Huck
  2008-06-23 15:23     ` [PATCH] s390: bus_id -> dev_set_name() changes Cornelia Huck
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Cornelia Huck @ 2008-06-23 15:22 UTC (permalink / raw)
  To: Greg KH; +Cc: Stephen Rothwell, linux-next, Martin Schwidefsky

On Fri, 20 Jun 2008 09:58:43 +0200,
Cornelia Huck <cornelia.huck@de.ibm.com> wrote:

> I could also try to split out
> dev_set_name() conversion from the init_name stuff, but I fear that
> doesn't make much sense...

Well, so I did just that... I'll reply to this mail with two patches:

- "s390: bus_id -> dev_set_name() changes" should replace the patch of
the same title. It removes the dependency on init_name.

- "s390: bus_id -> dev_set_name() for css and ccw busses" should go
after "driver core: add init_name to struct device". It depends on
init_name and consequently should be commented out until that patch is
re-activated.

Greg: Could you please add these to your tree?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] s390: bus_id -> dev_set_name() changes
  2008-06-23 15:22   ` Cornelia Huck
@ 2008-06-23 15:23     ` Cornelia Huck
  2008-06-23 15:24     ` [PATCH] s390: bus_id -> dev_set_name() for css and ccw busses Cornelia Huck
  2008-06-23 22:13     ` linux-next: s390 build failure Greg KH
  2 siblings, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2008-06-23 15:23 UTC (permalink / raw)
  To: Greg KH; +Cc: Stephen Rothwell, linux-next, Martin Schwidefsky

From: Cornelia Huck <cornelia.huck@de.ibm.com>

Convert most s390 users setting bus_id to dev_set_name().
css and ccw busses are deferred since they need some special
treatment.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

---
 drivers/s390/block/dcssblk.c |    2 +-
 drivers/s390/char/vmlogrdr.c |    3 +--
 drivers/s390/cio/ccwgroup.c  |    3 +--
 drivers/s390/cio/chp.c       |    3 +--
 drivers/s390/cio/css.c       |    4 ++--
 drivers/s390/crypto/ap_bus.c |    4 ++--
 drivers/s390/net/netiucv.c   |    2 +-
 drivers/s390/s390_rdev.c     |    2 +-
 drivers/s390/scsi/zfcp_aux.c |   23 ++++++++---------------
 9 files changed, 18 insertions(+), 28 deletions(-)

Index: linux-2.6/drivers/s390/block/dcssblk.c
===================================================================
--- linux-2.6.orig/drivers/s390/block/dcssblk.c
+++ linux-2.6/drivers/s390/block/dcssblk.c
@@ -349,7 +349,7 @@ dcssblk_add_store(struct device *dev, st
 	}
 
 	strcpy(dev_info->segment_name, local_buf);
-	strlcpy(dev_info->dev.bus_id, local_buf, BUS_ID_SIZE);
+	dev_set_name(&dev_info->dev, local_buf);
 	dev_info->dev.release = dcssblk_release_segment;
 	INIT_LIST_HEAD(&dev_info->lh);
 
Index: linux-2.6/drivers/s390/char/vmlogrdr.c
===================================================================
--- linux-2.6.orig/drivers/s390/char/vmlogrdr.c
+++ linux-2.6/drivers/s390/char/vmlogrdr.c
@@ -738,8 +738,7 @@ static int vmlogrdr_register_device(stru
 
 	dev = kzalloc(sizeof(struct device), GFP_KERNEL);
 	if (dev) {
-		snprintf(dev->bus_id, BUS_ID_SIZE, "%s",
-			 priv->internal_name);
+		dev_set_name(dev, priv->internal_name);
 		dev->bus = &iucv_bus;
 		dev->parent = iucv_root;
 		dev->driver = &vmlogrdr_driver;
Index: linux-2.6/drivers/s390/cio/ccwgroup.c
===================================================================
--- linux-2.6.orig/drivers/s390/cio/ccwgroup.c
+++ linux-2.6/drivers/s390/cio/ccwgroup.c
@@ -264,8 +264,7 @@ int ccwgroup_create_from_string(struct d
 	gdev->dev.parent = root;
 	gdev->dev.release = ccwgroup_release;
 
-	snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s",
-			dev_name(&gdev->cdev[0]->dev));
+	dev_set_name(&gdev->dev, "%s", dev_name(&gdev->cdev[0]->dev));
 
 	rc = device_register(&gdev->dev);
 	if (rc)
Index: linux-2.6/drivers/s390/cio/chp.c
===================================================================
--- linux-2.6.orig/drivers/s390/cio/chp.c
+++ linux-2.6/drivers/s390/cio/chp.c
@@ -401,8 +401,7 @@ int chp_new(struct chp_id chpid)
 	chp->state = 1;
 	chp->dev.parent = &channel_subsystems[chpid.cssid]->device;
 	chp->dev.release = chp_release;
-	snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp%x.%02x", chpid.cssid,
-		 chpid.id);
+	dev_set_name(&chp->dev, "chp%x.%02x", chpid.cssid, chpid.id);
 
 	/* Obtain channel path description and fill it in. */
 	ret = chsc_determine_channel_path_description(chpid, &chp->desc);
Index: linux-2.6/drivers/s390/cio/css.c
===================================================================
--- linux-2.6.orig/drivers/s390/cio/css.c
+++ linux-2.6/drivers/s390/cio/css.c
@@ -741,7 +741,7 @@ static int __init setup_css(int nr)
 		return -ENOMEM;
 	css->pseudo_subchannel->dev.parent = &css->device;
 	css->pseudo_subchannel->dev.release = css_subchannel_release;
-	sprintf(css->pseudo_subchannel->dev.bus_id, "defunct");
+	dev_set_name(&css->pseudo_subchannel->dev, "defunct");
 	ret = cio_create_sch_lock(css->pseudo_subchannel);
 	if (ret) {
 		kfree(css->pseudo_subchannel);
@@ -750,7 +750,7 @@ static int __init setup_css(int nr)
 	mutex_init(&css->mutex);
 	css->valid = 1;
 	css->cssid = nr;
-	sprintf(css->device.bus_id, "css%x", nr);
+	dev_set_name(&css->device, "css%x", nr);
 	css->device.release = channel_subsystem_release;
 	tod_high = (u32) (get_clock() >> 32);
 	css_generate_pgid(css, tod_high);
Index: linux-2.6/drivers/s390/crypto/ap_bus.c
===================================================================
--- linux-2.6.orig/drivers/s390/crypto/ap_bus.c
+++ linux-2.6/drivers/s390/crypto/ap_bus.c
@@ -859,8 +859,8 @@ static void ap_scan_bus(struct work_stru
 
 		ap_dev->device.bus = &ap_bus_type;
 		ap_dev->device.parent = ap_root_device;
-		snprintf(ap_dev->device.bus_id, BUS_ID_SIZE, "card%02x",
-			 AP_QID_DEVICE(ap_dev->qid));
+		dev_set_name(&ap_dev->device, "card%02x",
+			     AP_QID_DEVICE(ap_dev->qid));
 		ap_dev->device.release = ap_device_release;
 		rc = device_register(&ap_dev->device);
 		if (rc) {
Index: linux-2.6/drivers/s390/net/netiucv.c
===================================================================
--- linux-2.6.orig/drivers/s390/net/netiucv.c
+++ linux-2.6/drivers/s390/net/netiucv.c
@@ -1757,7 +1757,7 @@ static int netiucv_register_device(struc
 	IUCV_DBF_TEXT(trace, 3, __func__);
 
 	if (dev) {
-		snprintf(dev->bus_id, BUS_ID_SIZE, "net%s", ndev->name);
+		dev_set_name(dev, "net%s", ndev->name);
 		dev->bus = &iucv_bus;
 		dev->parent = iucv_root;
 		/*
Index: linux-2.6/drivers/s390/s390_rdev.c
===================================================================
--- linux-2.6.orig/drivers/s390/s390_rdev.c
+++ linux-2.6/drivers/s390/s390_rdev.c
@@ -30,7 +30,7 @@ s390_root_dev_register(const char *name)
 	dev = kzalloc(sizeof(struct device), GFP_KERNEL);
 	if (!dev)
 		return ERR_PTR(-ENOMEM);
-	strncpy(dev->bus_id, name, min(strlen(name), (size_t)BUS_ID_SIZE));
+	dev_set_name(dev, name);
 	dev->release = s390_root_dev_release;
 	ret = device_register(dev);
 	if (ret) {
Index: linux-2.6/drivers/s390/scsi/zfcp_aux.c
===================================================================
--- linux-2.6.orig/drivers/s390/scsi/zfcp_aux.c
+++ linux-2.6/drivers/s390/scsi/zfcp_aux.c
@@ -839,7 +839,7 @@ zfcp_unit_enqueue(struct zfcp_port *port
 	unit->fcp_lun = fcp_lun;
 
 	/* setup for sysfs registration */
-	snprintf(unit->sysfs_device.bus_id, BUS_ID_SIZE, "0x%016llx", fcp_lun);
+	dev_set_name(&unit->sysfs_device, "0x%016llx", fcp_lun);
 	unit->sysfs_device.parent = &port->sysfs_device;
 	unit->sysfs_device.release = zfcp_sysfs_unit_release;
 	dev_set_drvdata(&unit->sysfs_device, unit);
@@ -1066,8 +1066,7 @@ zfcp_adapter_enqueue(struct ccw_device *
 
 	adapter->generic_services.parent = &adapter->ccw_device->dev;
 	adapter->generic_services.release = zfcp_dummy_release;
-	snprintf(adapter->generic_services.bus_id, BUS_ID_SIZE,
-		 "generic_services");
+	dev_set_name(&adapter->generic_services, "generic_services");
 
 	if (device_register(&adapter->generic_services))
 		goto generic_services_failed;
@@ -1218,24 +1217,19 @@ zfcp_port_enqueue(struct zfcp_adapter *a
 	if (status & ZFCP_STATUS_PORT_WKA) {
 		switch (d_id) {
 		case ZFCP_DID_DIRECTORY_SERVICE:
-			snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE,
-				 "directory");
+			dev_set_name(&port->sysfs_device, "directory");
 			break;
 		case ZFCP_DID_MANAGEMENT_SERVICE:
-			snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE,
-				 "management");
+			dev_set_name(&port->sysfs_device, "management");
 			break;
 		case ZFCP_DID_KEY_DISTRIBUTION_SERVICE:
-			snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE,
-				 "key_distribution");
+			dev_set_name(&port->sysfs_device, "key_distribution");
 			break;
 		case ZFCP_DID_ALIAS_SERVICE:
-			snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE,
-				 "alias");
+			dev_set_name(&port->sysfs_device, "alias");
 			break;
 		case ZFCP_DID_TIME_SERVICE:
-			snprintf(port->sysfs_device.bus_id, BUS_ID_SIZE,
-				 "time");
+			dev_set_name(&port->sysfs_device, "time");
 			break;
 		default:
 			kfree(port);
@@ -1244,8 +1238,7 @@ zfcp_port_enqueue(struct zfcp_adapter *a
 		port->d_id = d_id;
 		port->sysfs_device.parent = &adapter->generic_services;
 	} else {
-		snprintf(port->sysfs_device.bus_id,
-			 BUS_ID_SIZE, "0x%016llx", wwpn);
+		dev_set_name(&port->sysfs_device, "0x%016llx", wwpn);
 		port->sysfs_device.parent = &adapter->ccw_device->dev;
 	}
 	port->sysfs_device.release = zfcp_sysfs_port_release;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] s390: bus_id -> dev_set_name() for css and ccw busses
  2008-06-23 15:22   ` Cornelia Huck
  2008-06-23 15:23     ` [PATCH] s390: bus_id -> dev_set_name() changes Cornelia Huck
@ 2008-06-23 15:24     ` Cornelia Huck
  2008-06-23 22:13     ` linux-next: s390 build failure Greg KH
  2 siblings, 0 replies; 6+ messages in thread
From: Cornelia Huck @ 2008-06-23 15:24 UTC (permalink / raw)
  To: Greg KH; +Cc: Stephen Rothwell, linux-next, Martin Schwidefsky

From: Cornelia Huck <cornelia.huck@de.ibm.com>

Convert remaining s390 users setting bus_id to dev_set_name()
or init_name.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

---
 drivers/s390/cio/cio.c    |   13 +++++++++++--
 drivers/s390/cio/cio.h    |    4 ++++
 drivers/s390/cio/device.c |   16 ++++++++++++++--
 3 files changed, 29 insertions(+), 4 deletions(-)

Index: linux-2.6/drivers/s390/cio/cio.c
===================================================================
--- linux-2.6.orig/drivers/s390/cio/cio.c
+++ linux-2.6/drivers/s390/cio/cio.c
@@ -529,8 +529,10 @@ cio_validate_subchannel (struct subchann
 	}
 	mutex_init(&sch->reg_mutex);
 	/* Set a name for the subchannel */
-	snprintf (dev_name(&sch->dev), BUS_ID_SIZE, "0.%x.%04x", schid.ssid,
-		  schid.sch_no);
+	if (cio_is_console(schid))
+		sch->dev.init_name = cio_get_console_sch_name(schid);
+	else
+		dev_set_name(&sch->dev, "0.%x.%04x", schid.ssid, schid.sch_no);
 
 	/*
 	 * The first subchannel that is not-operational (ccode==3)
@@ -681,6 +683,7 @@ do_IRQ (struct pt_regs *regs)
 
 #ifdef CONFIG_CCW_CONSOLE
 static struct subchannel console_subchannel;
+static char console_sch_name[10] = "0.x.xxxx";
 static struct io_subchannel_private console_priv;
 static int console_subchannel_in_use;
 
@@ -831,6 +834,12 @@ cio_get_console_subchannel(void)
 	return &console_subchannel;
 }
 
+const char *cio_get_console_sch_name(struct subchannel_id schid)
+{
+	snprintf(console_sch_name, 10, "0.%x.%04x", schid.ssid, schid.sch_no);
+	return (const char *)console_sch_name;
+}
+
 #endif
 static int
 __disable_subchannel_easy(struct subchannel_id schid, struct schib *schib)
Index: linux-2.6/drivers/s390/cio/cio.h
===================================================================
--- linux-2.6.orig/drivers/s390/cio/cio.h
+++ linux-2.6/drivers/s390/cio/cio.h
@@ -111,11 +111,15 @@ extern int cio_is_console(struct subchan
 extern struct subchannel *cio_get_console_subchannel(void);
 extern spinlock_t * cio_get_console_lock(void);
 extern void *cio_get_console_priv(void);
+extern const char *cio_get_console_sch_name(struct subchannel_id schid);
+extern const char *cio_get_console_cdev_name(struct subchannel *sch);
 #else
 #define cio_is_console(schid) 0
 #define cio_get_console_subchannel() NULL
 #define cio_get_console_lock() NULL
 #define cio_get_console_priv() NULL
+#define cio_get_console_sch_name(schid) NULL
+#define cio_get_console_cdev_name(sch) NULL
 #endif
 
 #endif
Index: linux-2.6/drivers/s390/cio/device.c
===================================================================
--- linux-2.6.orig/drivers/s390/cio/device.c
+++ linux-2.6/drivers/s390/cio/device.c
@@ -1051,8 +1051,11 @@ io_subchannel_recog(struct ccw_device *c
 	init_timer(&priv->timer);
 
 	/* Set an initial name for the device. */
-	snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x",
-		  sch->schid.ssid, sch->schib.pmcw.dev);
+	if (cio_is_console(sch->schid))
+		cdev->dev.init_name = cio_get_console_cdev_name(sch);
+	else
+		dev_set_name(&cdev->dev, "0.%x.%04x",
+			     sch->schid.ssid, sch->schib.pmcw.dev);
 
 	/* Increase counter of devices currently in recognition. */
 	atomic_inc(&ccw_device_init_count);
@@ -1287,6 +1290,7 @@ io_subchannel_shutdown(struct subchannel
 
 #ifdef CONFIG_CCW_CONSOLE
 static struct ccw_device console_cdev;
+static char console_cdev_name[10] = "0.x.xxxx";
 static struct ccw_device_private console_private;
 static int console_cdev_in_use;
 
@@ -1355,6 +1359,14 @@ ccw_device_probe_console(void)
 	console_cdev.online = 1;
 	return &console_cdev;
 }
+
+
+const char *cio_get_console_cdev_name(struct subchannel *sch)
+{
+	snprintf(console_cdev_name, 10, "0.%x.%04x",
+		 sch->schid.ssid, sch->schib.pmcw.dev);
+	return (const char *)console_cdev_name;
+}
 #endif
 
 /*

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: s390 build failure
  2008-06-23 15:22   ` Cornelia Huck
  2008-06-23 15:23     ` [PATCH] s390: bus_id -> dev_set_name() changes Cornelia Huck
  2008-06-23 15:24     ` [PATCH] s390: bus_id -> dev_set_name() for css and ccw busses Cornelia Huck
@ 2008-06-23 22:13     ` Greg KH
  2 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2008-06-23 22:13 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: Stephen Rothwell, linux-next, Martin Schwidefsky

On Mon, Jun 23, 2008 at 05:22:26PM +0200, Cornelia Huck wrote:
> On Fri, 20 Jun 2008 09:58:43 +0200,
> Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> 
> > I could also try to split out
> > dev_set_name() conversion from the init_name stuff, but I fear that
> > doesn't make much sense...
> 
> Well, so I did just that... I'll reply to this mail with two patches:
> 
> - "s390: bus_id -> dev_set_name() changes" should replace the patch of
> the same title. It removes the dependency on init_name.
> 
> - "s390: bus_id -> dev_set_name() for css and ccw busses" should go
> after "driver core: add init_name to struct device". It depends on
> init_name and consequently should be commented out until that patch is
> re-activated.
> 
> Greg: Could you please add these to your tree?

I've now done so, thanks for sending them to me.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-23 22:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-20  3:52 linux-next: s390 build failure Stephen Rothwell
2008-06-20  7:58 ` Cornelia Huck
2008-06-23 15:22   ` Cornelia Huck
2008-06-23 15:23     ` [PATCH] s390: bus_id -> dev_set_name() changes Cornelia Huck
2008-06-23 15:24     ` [PATCH] s390: bus_id -> dev_set_name() for css and ccw busses Cornelia Huck
2008-06-23 22:13     ` linux-next: s390 build failure Greg KH

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).