mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
serial: 8250_pci: make setup_port() parameters explicitly unsigned
[ Upstream commit 3a96e97ab4e835078e6f27b7e1c0947814df3841 ] The bar and offset parameters to setup_port() are used in pointer math, and while it would be very difficult to get them to wrap as a negative number, just be "safe" and make them unsigned so that static checkers do not trip over them unintentionally. Cc: Jiri Slaby <[email protected]> Reported-by: Jordy Zomer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
4beadefea8
commit
44fd61a8bd
1 changed files with 1 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ static void moan_device(const char *str, struct pci_dev *dev)
|
|||
|
||||
static int
|
||||
setup_port(struct serial_private *priv, struct uart_8250_port *port,
|
||||
int bar, int offset, int regshift)
|
||||
u8 bar, unsigned int offset, int regshift)
|
||||
{
|
||||
struct pci_dev *dev = priv->dev;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue