x86/PCI: Fix Broadcom CNB20LE unintended sign extension
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 25 Apr 2014 17:01:08 +0000 (11:01 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 25 Apr 2014 17:01:08 +0000 (11:01 -0600)
commit0b2d70764bb39242dcc49c0ebd10fcb8258ce5fa
treebf37d69370a9789abf725e022e2c5c39b40c4a3b
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5
x86/PCI: Fix Broadcom CNB20LE unintended sign extension

In the expression "word1 << 16", word1 starts as u16, but is promoted to
a signed int, then sign-extended to resource_size_t, which is probably
not what was intended.  Cast to resource_size_t to avoid the sign
extension.

Found by Coverity (CID 138749, 138750).

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
arch/x86/pci/broadcom_bus.c