]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250_pci: make setup_port() parameters explicitly unsigned
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jul 2021 13:07:17 +0000 (15:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jul 2021 10:21:21 +0000 (12:21 +0200)
commit6ae26533687d2bd567f962a637078991878bdd62
treeef47e8b65d374ae7357daa729bbb598b986f7588
parent0f3439eea23b8f6c7e3292860b290c7da23e045e
serial: 8250_pci: make setup_port() parameters explicitly unsigned

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 <jirislaby@kernel.org>
Reported-by: Jordy Zomer <jordy@pwning.systems>
Link: https://lore.kernel.org/r/20210726130717.2052096-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_pci.c