public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390 (5/8): common i/o layer.
Date: Fri, 29 Aug 2003 13:50:34 -0700	[thread overview]
Message-ID: <20030829205034.GA2649@kroah.com> (raw)
In-Reply-To: <20030829204017.GA2580@kroah.com>

On Fri, Aug 29, 2003 at 01:40:17PM -0700, Greg KH wrote:
> On Fri, Aug 29, 2003 at 10:31:47PM +0200, Arnd Bergmann wrote:
> > OGAWA Hirofumi wrote:
> > 
> > > Shouldn't the above use BUS_ID_SIZE instead of DEVICE_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.
> 
> 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.

diff -Nru a/drivers/usb/core/file.c b/drivers/usb/core/file.c
--- a/drivers/usb/core/file.c	Fri Aug 29 13:49:19 2003
+++ b/drivers/usb/core/file.c	Fri Aug 29 13:49:20 2003
@@ -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) {

  reply	other threads:[~2003-08-29 20:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <pV54.523.43@gated-at.bofh.it>
     [not found] ` <pX6U.7Vu.35@gated-at.bofh.it>
2003-08-29 20:31   ` [PATCH] s390 (5/8): common i/o layer Arnd Bergmann
2003-08-29 20:40     ` Greg KH
2003-08-29 20:50       ` Greg KH [this message]
2003-08-29 21:06         ` Arnd Bergmann
2003-08-29 21:09           ` Greg KH
2003-09-01  7:09 Martin Schwidefsky
  -- strict thread matches above, loose matches on Subject: below --
2003-08-29 17:10 Martin Schwidefsky
2003-08-29 19:25 ` OGAWA Hirofumi
2003-08-29 20:01   ` OGAWA Hirofumi
2003-08-29 20:24   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030829205034.GA2649@kroah.com \
    --to=greg@kroah.com \
    --cc=arnd@arndb.de \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox