mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
i2c: pci1xxxx: prevent signed integer overflow
Some constants need 'UL' markings, otherwise they are shifted into the
sign bit.
Fixes: 3616936972
("i2c: microchip: pci1xxxx: Add driver for I2C host controller in multifunction endpoint of pci1xxxx switch")
Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
492baeb958
commit
228336f507
1 changed files with 3 additions and 3 deletions
|
@ -190,9 +190,9 @@
|
|||
* Bus Idle Minimum time = BUS_IDLE_MIN[7:0] x Baud_Clock_Period x
|
||||
* (BUS_IDLE_MIN_XK_TICKS[7] ? 4,1)
|
||||
*/
|
||||
#define BUS_IDLE_MIN_100K_TICKS 167
|
||||
#define BUS_IDLE_MIN_400K_TICKS 139
|
||||
#define BUS_IDLE_MIN_1000K_TICKS 133
|
||||
#define BUS_IDLE_MIN_100K_TICKS 167UL
|
||||
#define BUS_IDLE_MIN_400K_TICKS 139UL
|
||||
#define BUS_IDLE_MIN_1000K_TICKS 133UL
|
||||
|
||||
/*
|
||||
* CTRL_CUM_TIME_OUT_XK_TICKS defines SMBus Controller Cumulative Time-Out.
|
||||
|
|
Loading…
Reference in a new issue