public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] ieee1394.c on - compilation errors
  2003-04-30 22:59 [PATCH] ieee1394.c on - compilation errors Grzegorz Jaskiewicz
@ 2003-04-30 22:43 ` Ben Collins
  2003-04-30 23:13   ` Grzegorz Jaskiewicz
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Collins @ 2003-04-30 22:43 UTC (permalink / raw)
  To: Grzegorz Jaskiewicz; +Cc: lkml, Linus

On Wed, Apr 30, 2003 at 11:59:54PM +0100, Grzegorz Jaskiewicz wrote:
> Hello there!
> 
> Another trivial, monkeys job patch.
> 
> Anyway, it is good to look at some changes and learn :)
> 

Please inspect the logic before removing things :)

I already submitted a patch to Linus to fix this. The problem is that
class_num was used as an opaque way of determining what sort of device
(host/node/unitdir) it was dealing with on the ieee1394 bus. Your patch
would likely cause a lot of oopses.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/

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

* [PATCH] ieee1394.c on - compilation errors
@ 2003-04-30 22:59 Grzegorz Jaskiewicz
  2003-04-30 22:43 ` Ben Collins
  0 siblings, 1 reply; 3+ messages in thread
From: Grzegorz Jaskiewicz @ 2003-04-30 22:59 UTC (permalink / raw)
  To: lkml; +Cc: Linus

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

Hello there!

Another trivial, monkeys job patch.

Anyway, it is good to look at some changes and learn :)


1) dev->class_num does not exists anymore


-- 
Grzegorz Jaskiewicz <gj@pointblue.com.pl>
K4 labs

[-- Attachment #2: Type: text/x-patch, Size: 2203 bytes --]

diff -u -r org/drivers/ieee1394/nodemgr.c popsuty/drivers/ieee1394/nodemgr.c
--- org/drivers/ieee1394/nodemgr.c	2003-04-30 22:22:39.000000000 +0100
+++ popsuty/drivers/ieee1394/nodemgr.c	2003-04-30 23:41:52.000000000 +0100
@@ -364,9 +364,6 @@
         struct unit_directory *ud;
 	struct ieee1394_device_id *id;
 
-	if (dev->class_num != DEV_CLASS_UNIT_DIRECTORY)
-		return 0;
-
 	ud = container_of(dev, struct unit_directory, device);
 	driver = container_of(drv, struct hpsb_protocol_driver, driver);
 
@@ -494,18 +491,15 @@
 static struct device nodemgr_dev_template_ud = {
 	.bus		= &ieee1394_bus_type,
 	.release	= nodemgr_release_ud,
-	.class_num	= DEV_CLASS_UNIT_DIRECTORY,
 };
 
 static struct device nodemgr_dev_template_ne = {
 	.bus		= &ieee1394_bus_type,
 	.release	= nodemgr_release_ne,
-	.class_num	= DEV_CLASS_NODE,
 };
 
 static struct device nodemgr_dev_template_host = {
 	.bus		= &ieee1394_bus_type,
-	.class_num	= DEV_CLASS_HOST,
 };
 
 
@@ -727,9 +721,6 @@
         struct guid_search_baton *search = __data;
         struct node_entry *ne;
 
-        if (dev->class_num != DEV_CLASS_NODE)
-                return 0;
-
         ne = container_of(dev, struct node_entry, device);
 
         if (ne->guid == search->guid) {
@@ -764,9 +755,6 @@
 	struct nodeid_search_baton *search = __data;
 	struct node_entry *ne;
 
-	if (dev->class_num != DEV_CLASS_NODE)
-		return 0;
-
 	ne = container_of(dev, struct node_entry, device);
 
 	if (ne->host == search->host && ne->nodeid == search->nodeid) {
@@ -1131,9 +1119,6 @@
 	if (!dev)
 		return -ENODEV;
 
-	if (dev->class_num != DEV_CLASS_UNIT_DIRECTORY)
-		return -ENODEV;
-
 	ud = container_of(dev, struct unit_directory, device);
 
 	scratch = buffer;
@@ -1258,9 +1243,6 @@
 	struct node_entry *ne = __data;
 	struct unit_directory *ud;
 
-	if (dev->class_num != DEV_CLASS_UNIT_DIRECTORY)
-		return 0;
-
 	ud = container_of(dev, struct unit_directory, device);
 
 	if (&ne->device != ud->device.parent)
@@ -1446,9 +1428,6 @@
 	struct cleanup_baton *cleanup = __data;
 	struct node_entry *ne;
 
-	if (dev->class_num != DEV_CLASS_NODE)
-		return 0;
-
 	ne = container_of(dev, struct node_entry, device);
 
 	if (ne->host != cleanup->host)

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

* Re: [PATCH] ieee1394.c on - compilation errors
  2003-04-30 22:43 ` Ben Collins
@ 2003-04-30 23:13   ` Grzegorz Jaskiewicz
  0 siblings, 0 replies; 3+ messages in thread
From: Grzegorz Jaskiewicz @ 2003-04-30 23:13 UTC (permalink / raw)
  To: Ben Collins; +Cc: lkml

On Wed, 2003-04-30 at 23:43, Ben Collins wrote:

> Please inspect the logic before removing things :)
> 
> I already submitted a patch to Linus to fix this. The problem is that
> class_num was used as an opaque way of determining what sort of device
> (host/node/unitdir) it was dealing with on the ieee1394 bus. Your patch
> would likely cause a lot of oopses.
I wasn't sure about that. maybe i should ask for better way. :)

thanks for response.

-- 
Grzegorz Jaskiewicz <gj@pointblue.com.pl>
K4 labs


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

end of thread, other threads:[~2003-04-30 22:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-30 22:59 [PATCH] ieee1394.c on - compilation errors Grzegorz Jaskiewicz
2003-04-30 22:43 ` Ben Collins
2003-04-30 23:13   ` Grzegorz Jaskiewicz

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