s390 (5/8): common i/o layer.
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · OGAWA Hirofumi
Shouldn't the above use
BUS_ID_SIZEinstead ofDEVICE_ID_SIZE?
Right. Actually, all uses of DEVICE_ID_SIZE in drivers/s390 are wrong. I'll take care of that.
The only other user of DEVICE_ID_SIZE right now is drivers/usb/core/file.c and I'm not sure if it's used in the intended way there.
Greg, maybe you want to get rid of it as well, or move the definition into file.c.
Arnd <><
Quoted 11 lines · Arnd Bergmann
Quoted 1 line · OGAWA Hirofumi
Shouldn't the above use
BUS_ID_SIZEinstead ofDEVICE_ID_SIZE?Right. Actually, all uses of
DEVICE_ID_SIZEindrivers/s390are wrong. I'll take care of that.The only other user of
DEVICE_ID_SIZEright now isdrivers/usb/core/file.cand I'm not sure if it's used in the intended way there.
Greg, maybe you want to get rid of it as well, or move the definition intofile.c.
I'm deleting it right now... :)
thanks,
greg k-h
Quoted 8 lines · Greg KH
Quoted 7 lines · Arnd Bergmann
Quoted 1 line · OGAWA Hirofumi
Shouldn't the above use
BUS_ID_SIZEinstead ofDEVICE_ID_SIZE?Right. Actually, all uses of
DEVICE_ID_SIZEindrivers/s390are wrong. I'll take care of that.
Quoted 6 lines
Quoted 4 lines
The only other user of
DEVICE_ID_SIZEright now isdrivers/usb/core/file.cand I'm not sure if it's used in the intended way there.
Greg, maybe you want to get rid of it as well, or move the definition intofile.c.I'm deleting it right now... :)
And here's the patch that I added to my trees.
thanks,
greg k-h
# USB: remove usage of DEVICE_ID_SIZE from usb core as it should not be used.
drivers/usb/core/file.c +4 -4
@@ -129,7 +129,7 @@int retval = -EINVAL ;int minor_base = class_driver->minor_base;int minor =0 ; -char name[DEVICE_ID_SIZE ]; +char name[BUS_ID_SIZE ];struct class_device *class_dev;char *temp;
@@ -166,7 +166,7 @@ intf->minor = minor;/* handle the devfs registration */ -snprintf (name,DEVICE_ID_SIZE , class_driver->name, minor - minor_base); +snprintf (name,BUS_ID_SIZE , class_driver->name, minor - minor_base);devfs_mk_cdev (MKDEV (USB_MAJOR , minor), class_driver->mode, name);/* create a usb class device for this usb interface */
@@ -211,7 +211,7 @@ struct usb_class_driver *class_driver) {int minor_base = class_driver->minor_base; -char name[DEVICE_ID_SIZE ]; +char name[BUS_ID_SIZE ];#ifdef CONFIG_USB_DYNAMIC_MINORS minor_base =0 ;
@@ -226,7 +226,7 @@ usb_minors[intf->minor] =NULL ;spin_unlock (&minor_lock); -snprintf (name,DEVICE_ID_SIZE , class_driver->name, intf->minor - minor_base); +snprintf (name,BUS_ID_SIZE , class_driver->name, intf->minor - minor_base);devfs_remove (name);if (intf->class_dev) {
drivers/usb/core/file.c Fri Aug 29 13:49:20 2003 line 135
Quoted 12 lines · Greg KH
diff -Nru
a/drivers/usb/core/file.cb/drivers/usb/core/file.cdrivers/usb/core/file.c Fri Aug 29 13:49:20 2003 renamed from drivers/usb/core/file.c Fri Aug 29 13:49:19 2003 +1
-1@@ -129,7 +129,7 @@ int retval = -EINVAL; int minor_base = class_driver->minor_base; int minor = 0; - char name[DEVICE_ID_SIZE]; + char name[BUS_ID_SIZE]; struct class_device *class_dev; char *temp;
In your case, BUS_ID_SIZE doesn't look appropriate here either, because the name is never used directly as a bus_id. You should probably use your own constant here.
Arnd <><
Quoted 17 lines · Arnd Bergmann
drivers/usb/core/file.c Fri Aug 29 13:49:20 2003 line 135
Quoted 12 lines · Greg KH
diff -Nru
a/drivers/usb/core/file.cb/drivers/usb/core/file.cdrivers/usb/core/file.c Fri Aug 29 13:49:20 2003 renamed from drivers/usb/core/file.c Fri Aug 29 13:49:19 2003 +1
-1@@ -129,7 +129,7 @@ int retval = -EINVAL; int minor_base = class_driver->minor_base; int minor = 0; - char name[DEVICE_ID_SIZE]; + char name[BUS_ID_SIZE]; struct class_device *class_dev; char *temp;In your case,
BUS_ID_SIZEdoesn't look appropriate here either, because the name is never used directly as abus_id. You should probably use your own constant here.
Look a little lower and see where I copy that name into a struct class_device.class_id, which is BUS_ID_SIZE big :)
thanks,
greg k-h