aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-01-22 00:12:26 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-22 20:04:02 -0500
commit45596c7889a4454e340863c112dbc6cf525e5647 (patch)
tree35b0b1a731a698cdb017e44730da08d7e01d9876 /tools/perf/scripts/python/export-to-sqlite.py
parentscsi: core: Add VENDOR_SPECIFIC sense code definitions (diff)
downloadlinux-45596c7889a4454e340863c112dbc6cf525e5647.tar.gz
linux-45596c7889a4454e340863c112dbc6cf525e5647.zip
scsi: arcmsr: avoid do_gettimeofday
The arcmsr uses its own implementation of time_to_tm(), along with do_gettimeofday() to read the current time. While the algorithm used here is fine in principle, it suffers from two problems: - it assigns the seconds portion of the timeval to a 32-bit unsigned integer that overflows in 2106 even on 64-bit architectures. - do_gettimeofday() returns a time_t that overflows in 2038 on all 32-bit systems. This changes the time retrieval function to ktime_get_real_seconds(), which returns a proper 64-bit value, and replaces the open-coded time_to_tm() algorithm with a call to the safe time64_to_tm(). I checked way all numbers are indexed and found that months are given in range 0..11 while the days are in range 1..31, same as 'struct tm', but the year value that the firmware expects starts in 2000 while 'struct tm' is based on year 1900, so it needs a small adjustment. [mkp: checkpatch tweaks] Fixes: b416c099472a ("scsi: arcmsr: Add a function to set date and time to firmware") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
516e578e5dbd44a5db11300831&follow=1'>ARM: multi_v7_defconfig: add the Atmel sama5d2-compatible ADC driverNicolas Ferre1-0/+1 2016-04-27ARM: multi_v7_defconfig: add the Atmel Audio microphone interface PDMICNicolas Ferre1-0/+1 2016-04-27ARM: multi_v7_defconfig: add Atmel ISI (Image Sensor Interface) driverNicolas Ferre1-0/+1 2016-04-27ARM: multi_v7_defconfig: add Atmel watchdog timersNicolas Ferre1-0/+2 2016-04-27ARM: multi_v7_defconfig: add HLCDC drivers as modulesBoris Brezillon1-0/+3 2016-04-27ARM: at91/defconfig: add PDMIC driver to sama5_defconfigNicolas Ferre1-0/+1 2016-04-27ARM: at91/defconfig: add HLCDC driver to sama5_defconfigNicolas Ferre1-2/+7 2016-04-27ARM: at91/defconfig: add the HDMA controller to sama5_defconfigNicolas Ferre1-0/+1 2016-04-26ARM: omap2plus_defconfig: Enable twl6030 USB phy as loadable moduleTony Lindgren1-0/+1 2016-04-26ARM: omap2plus_defconfig: Fix warning due invalid RXKAD symbol valueJavier Martinez Canillas1-1/+1