Re: [PATCH] s390 (5/8): common i/o layer.

From: Martin Schwidefsky
Date: Mon Sep 01 2003 - 02:11:11 EST



> > @@ -537,8 +537,7 @@
< > init_timer(&cdev->private->timer);
> >
> > /* Set an initial name for the device. */
> > - snprintf (cdev->dev.name, DEVICE_NAME_SIZE,"ccw device");
> > - snprintf (cdev->dev.bus_id, DEVICE_ID_SIZE, "0:%04x",
> > + snprintf (cdev->dev.bus_id, DEVICE_ID_SIZE, "0.0.%04x",
> > sch->schib.pmcw.dev);
> >
> > /* Increase counter of devices currently in recognition. */
>
> Shouldn't the above use BUS_ID_SIZE instead of DEVICE_ID_SIZE?

Yes, indeed. DEVICE_NAME_SIZE is 32 and BUS_ID_SIZE is 20. Luckily the
printed string is always shorter than 20 byte but nevertheless its wrong
to use DEVICE_ID_SIZE. Thanks for the hint.

blue skies,
Martin


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/