public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: remove dead code from usb_deregister_dev()
@ 2011-03-24 13:24 Libor Pechacek
  2011-03-24 13:36 ` Sergei Shtylyov
  2011-03-25  8:36 ` [PATCH v2] " Libor Pechacek
  0 siblings, 2 replies; 5+ messages in thread
From: Libor Pechacek @ 2011-03-24 13:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel

The `name' variable is unused in usb_deregister_dev() since commit d6e5bcf.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
---
 drivers/usb/core/file.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index cf6a542..99458c8 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -236,13 +236,6 @@ EXPORT_SYMBOL_GPL(usb_register_dev);
 void usb_deregister_dev(struct usb_interface *intf,
 			struct usb_class_driver *class_driver)
 {
-	int minor_base = class_driver->minor_base;
-	char name[20];
-
-#ifdef CONFIG_USB_DYNAMIC_MINORS
-	minor_base = 0;
-#endif
-
 	if (intf->minor == -1)
 		return;
 
@@ -252,7 +245,6 @@ void usb_deregister_dev(struct usb_interface *intf,
 	usb_minors[intf->minor] = NULL;
 	up_write(&minor_rwsem);
 
-	snprintf(name, sizeof(name), class_driver->name, intf->minor - minor_base);
 	device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
 	intf->usb_dev = NULL;
 	intf->minor = -1;
-- 
1.6.0.2


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

* Re: [PATCH] USB: remove dead code from usb_deregister_dev()
  2011-03-24 13:24 [PATCH] USB: remove dead code from usb_deregister_dev() Libor Pechacek
@ 2011-03-24 13:36 ` Sergei Shtylyov
  2011-03-25  8:34   ` Libor Pechacek
  2011-03-25  8:36 ` [PATCH v2] " Libor Pechacek
  1 sibling, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-03-24 13:36 UTC (permalink / raw)
  To: Libor Pechacek; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

Hello.

On 24-03-2011 16:24, Libor Pechacek wrote:

> The `name' variable is unused in usb_deregister_dev() since commit d6e5bcf.

    Please also specify that commit's summary in parens for the human readers, 
as asked by Linus.

> Signed-off-by: Libor Pechacek<lpechacek@suse.cz>

WBR, Sergei

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

* Re: [PATCH] USB: remove dead code from usb_deregister_dev()
  2011-03-24 13:36 ` Sergei Shtylyov
@ 2011-03-25  8:34   ` Libor Pechacek
  2011-03-25 12:50     ` Sergei Shtylyov
  0 siblings, 1 reply; 5+ messages in thread
From: Libor Pechacek @ 2011-03-25  8:34 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-usb, linux-kernel

On Thu 24-03-11 16:36:18, Sergei Shtylyov wrote:
> On 24-03-2011 16:24, Libor Pechacek wrote:
>> The `name' variable is unused in usb_deregister_dev() since commit d6e5bcf.
>
>    Please also specify that commit's summary in parens for the human 
> readers,

OK, sounds sane.  Updated patch will follow.

> as asked by Linus.

Can you please post a reference to the thread?  I'd like to read it but can't
find it.

Libor
-- 
Libor Pechacek
SUSE L3 Team, Prague

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

* [PATCH v2] USB: remove dead code from usb_deregister_dev()
  2011-03-24 13:24 [PATCH] USB: remove dead code from usb_deregister_dev() Libor Pechacek
  2011-03-24 13:36 ` Sergei Shtylyov
@ 2011-03-25  8:36 ` Libor Pechacek
  1 sibling, 0 replies; 5+ messages in thread
From: Libor Pechacek @ 2011-03-25  8:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel

The `name' variable is unused in usb_deregister_dev() since commit d6e5bcf
(devfs: Remove the mode field from usb_class_driver as it's no longer needed).

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
---
 drivers/usb/core/file.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index cf6a542..99458c8 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -236,13 +236,6 @@ EXPORT_SYMBOL_GPL(usb_register_dev);
 void usb_deregister_dev(struct usb_interface *intf,
 			struct usb_class_driver *class_driver)
 {
-	int minor_base = class_driver->minor_base;
-	char name[20];
-
-#ifdef CONFIG_USB_DYNAMIC_MINORS
-	minor_base = 0;
-#endif
-
 	if (intf->minor == -1)
 		return;
 
@@ -252,7 +245,6 @@ void usb_deregister_dev(struct usb_interface *intf,
 	usb_minors[intf->minor] = NULL;
 	up_write(&minor_rwsem);
 
-	snprintf(name, sizeof(name), class_driver->name, intf->minor - minor_base);
 	device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
 	intf->usb_dev = NULL;
 	intf->minor = -1;
-- 
1.6.0.2

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

* Re: [PATCH] USB: remove dead code from usb_deregister_dev()
  2011-03-25  8:34   ` Libor Pechacek
@ 2011-03-25 12:50     ` Sergei Shtylyov
  0 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2011-03-25 12:50 UTC (permalink / raw)
  To: Libor Pechacek; +Cc: Sergei Shtylyov, linux-usb, linux-kernel

Hello.

On 25-03-2011 11:34, Libor Pechacek wrote:

>>> The `name' variable is unused in usb_deregister_dev() since commit d6e5bcf.

>>     Please also specify that commit's summary in parens for the human
>> readers,

> OK, sounds sane.  Updated patch will follow.

>> as asked by Linus.

> Can you please post a reference to the thread?  I'd like to read it but can't
> find it.

    No, sorry, can't -- that was long ago, and I didn't save it.

> Libor

WBR, Sergei

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

end of thread, other threads:[~2011-03-25 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24 13:24 [PATCH] USB: remove dead code from usb_deregister_dev() Libor Pechacek
2011-03-24 13:36 ` Sergei Shtylyov
2011-03-25  8:34   ` Libor Pechacek
2011-03-25 12:50     ` Sergei Shtylyov
2011-03-25  8:36 ` [PATCH v2] " Libor Pechacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox