]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/MSI: fix msi_mask() shift fix
authorMatthew Wilcox <matthew@wil.cx>
Mon, 9 Feb 2009 03:27:47 +0000 (20:27 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 13 Feb 2009 19:59:03 +0000 (11:59 -0800)
commitc63abb3b7129e753c9d05dc251be251962ac3dca
tree4558a778c20048bd519b444a1d8381087592397f
parent14fe9f5c8fab1d09a66c3dbdd8d7d6a0e0404f66
PCI/MSI: fix msi_mask() shift fix

Hidetoshi Seto points out that commit
5b618ac74dae46e30133986d897568572853ca0d has wrong values in the array.
Rather than correct the array, we can just use a bounds check and
perform the calculation specified in the comment.  As a bonus, this will
not run off the end of the array if the device specifies an illegal
value in the MSI capability.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/msi.c