Skip to contentSkip to conversation

drivers/scsi/psi240i.c - io_request_lock fix

PATCH Adam J. Richter 2 participants 2 messages Jan 9, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines
Quoted 1 line

= Morten Helgesen

= Douglas Gilbert

From the look of this line in the patch:

Quoted 1 line

+ struct Scsi_Host *host = PsiHost[irq - 10];

It will work if the first controller is allocated irq 10,
the second one irq 11, etc. Unlikely ...

No, I think Morten has the use of PsiHost right. The
entries in PsiHost are apparently stored by IRQ. It is not generally the case that the first controller is at PsiHost[0], the second at PsiHost[1], etc.

I agree with Jens in that the practice is rather ugly, but that
is the way the driver worked before io_request_lock disappeared and I think that improving that stylistic issue is not a prerequisite for conversion from io_request_lock to host->host_lock.

If I were you, Morten, I would go ahead with your patch
that makes the minimal changes and then, if you want, make stylistic improvements as one or more separate patches, which are something that you may want to talk over with the mainter of that driver, if there currently is one.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
[email protected]     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America

fax +1 408 261-6631 "Free Software For The Rest Of Us."

#1 lore raw
Quoted 6 lines · Adam J. Richter
Quoted 6 lines
Quoted 1 line

= Morten Helgesen

= Douglas Gilbert

From the look of this line in the patch:

Quoted 1 line

+ struct Scsi_Host *host = PsiHost[irq - 10];

Quoted 7 lines
Quoted 2 lines

It will work if the first controller is allocated irq 10,
the second one irq 11, etc. Unlikely ...

No, I think Morten has the use of PsiHost right. The
entries in PsiHost are apparently stored by IRQ. It is not generally the case that the first controller is at PsiHost[0], the second at PsiHost[1], etc.

Even though I am not _that_ familiar with the code in question, that is how I understood it too.

Quoted 5 lines

I agree with Jens in that the practice is rather ugly, but that
is the way the driver worked before io_request_lock disappeared and I think that improving that stylistic issue is not a prerequisite for conversion from io_request_lock to host->host_lock.

Ugly it is. It was not my intention to clean up the code, just make the smallest change necessary to get it to work. The maintainer should probably do a closer examination.

Quoted 6 lines

If I were you, Morten, I would go ahead with your patch
that makes the minimal changes and then, if you want, make stylistic improvements as one or more separate patches, which are something that you may want to talk over with the mainter of that driver, if there currently is one.

Sure - but who is the maintainer ? :)

Quoted 10 lines
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
[email protected]     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America

fax +1 408 261-6631 "Free Software For The Rest Of Us."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 8 lines
"Det er ikke lett å være menneske" - sitat fra en klok person.

mvh
Morten Helgesen 
UNIX System Administrator & C Developer 
Nextframe AS
[email protected] / 93445641
http://www.nextframe.net