lkml.org 
[lkml]   [2002]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2.5.31] transparent PCI-to-PCI bridges

On Mon, 26 Aug 2002, Ivan Kokshaysky wrote:
>
> Ok. Updated patch appended.

Please don't do it like this: I hate code that changes standard PCI data
structure meaning (in this case the "class" thing) behind peoples back..
Some other user might well want to look at the original class member, and
rewriting it to a magic value just to make the transparency check pass
sounds like a bad idea to me.

So instead, I would suggest that you add a single-bit "transparent" field
to the PCI structure, and initialize it to "(class & 0xff) == 1" when
initializing the device data. Then, any fixup can just set the transparent
bit to 1.

That would make the code more robust, and more readable in my opionion.

Ok?

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.082 / U:5.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site