提交 809aa504 编写于 作者: J James Bottomley 提交者: Linus Torvalds

mca: fix bus matching

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: NJames Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 818563dc
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册