Dino Li 3dc53814db i2c: rand of i2ctest console command is unsigned
We use rand to get timestamp counter low word and do random test
(test_dev = rand % i2c_test_dev_used).
But we will get a negative index (test_dev) if low word larger than
0x80000000 and cause the array to access the wrong locations and
trigger an exception.

This change also fix following error:
error: i2c_s_test may be used uninitialized in this function
[-Werror=maybe-uninitialized]

BRANCH=none
BUG=none
TEST="forcetime 0 0x80000000" then "i2ctest", no exception triggered.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Change-Id: Ia2f5a2ff034a6b7b96f7bd4f3b42bf5645a05aed
Reviewed-on: https://chromium-review.googlesource.com/663110
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-09-13 19:28:30 -07:00
2017-08-07 19:29:13 -07:00
2017-09-07 15:01:05 -07:00
2017-07-08 20:38:53 -07:00
2017-09-13 17:13:54 -07:00
2017-09-11 11:14:24 -07:00
2017-09-12 18:16:28 -07:00
2012-05-11 09:11:52 -07:00
2014-04-02 19:58:53 +00:00
2015-12-08 20:05:05 -08:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit

For instructions on building from source, refer to

http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%