]> git.baikalelectronics.ru Git - kernel.git/commit
parport_pc: Avoid FIFO port location truncation
authorMaciej W. Rozycki <macro@orcam.me.uk>
Fri, 23 Sep 2022 18:52:08 +0000 (19:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 16:42:14 +0000 (17:42 +0100)
commit4e11c44a6e01797a07028a51e4b784cc44336614
treea24927f700846661f17fd49c871e4aef32fe890f
parent89328d2c77b3eb2fd6cfa4a8e1637500c04486fc
parport_pc: Avoid FIFO port location truncation

[ Upstream commit 73c1db414d657b9aaae0b72a573a07954178bb83 ]

Match the data type of a temporary holding a reference to the FIFO port
with the type of the original reference coming from `struct parport',
avoiding data truncation with LP64 ports such as SPARC64 that refer to
PCI port I/O locations via their corresponding MMIO addresses and will
therefore have non-zero bits in the high 32-bit part of the reference.
And in any case it is cleaner to have the data types matching here.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Link: https://lore.kernel.org/linux-pci/20220419033752.GA1101844@bhelgaas/
Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/alpine.DEB.2.21.2209231912550.29493@angie.orcam.me.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/parport/parport_pc.c