diff options
| author | Ricardo Neri <[email protected]> | 2022-10-18 11:22:40 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2022-10-28 18:11:48 +0000 |
| commit | 54d9135cf223f221546bd51b0f5e4a73e99891f4 (patch) | |
| tree | 02496ca8052766938a3044a911e0506900d0e884 /lib/fault-inject.c | |
| parent | Linux 6.1-rc2 (diff) | |
| download | kernel-54d9135cf223f221546bd51b0f5e4a73e99891f4.tar.gz kernel-54d9135cf223f221546bd51b0f5e4a73e99891f4.zip | |
thermal: intel: hfi: Improve the type of hfi_features::nr_table_pages
A Coverity static code scan raised a potential overflow_before_widen
warning when hfi_features::nr_table_pages is used as an argument to
memcpy in intel_hfi_process_event().
Even though the overflow can never happen (the maximum number of pages of
the HFI table is 0x10 and 0x10 << PAGE_SHIFT = 0x10000), using size_t as
the data type of hfi_features::nr_table_pages makes Coverity happy and
matches the data type of the argument 'size' of memcpy().
Signed-off-by: Ricardo Neri <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'lib/fault-inject.c')
0 files changed, 0 insertions, 0 deletions
