* [MCA] fix bus matching
@ 2007-05-03 15:54 James Bottomley
0 siblings, 0 replies; only message in thread
From: James Bottomley @ 2007-05-03 15:54 UTC (permalink / raw)
To: linux-kernel
There's a bug in the MCA bus matching algorithm in that it promotes from
signed short to int before comparing with the actual id and does sign
extension on anything > 0x7fff (which means that pos ids > 0x7fff never
get correctly matched).
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
---
diff --git a/drivers/mca/mca-bus.c b/drivers/mca/mca-bus.c
index da862e4..a70fe00 100644
--- a/drivers/mca/mca-bus.c
+++ b/drivers/mca/mca-bus.c
@@ -47,7 +47,7 @@ static int mca_bus_match (struct device *dev, struct device_driver *drv)
{
struct mca_device *mca_dev = to_mca_device (dev);
struct mca_driver *mca_drv = to_mca_driver (drv);
- const short *mca_ids = mca_drv->id_table;
+ const unsigned short *mca_ids = mca_drv->id_table;
int i;
if (!mca_ids)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-03 15:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-03 15:54 [MCA] fix bus matching James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®