summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2019-07-09 02:12:33 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-08-04 14:34:22 +0300
commit27429be75e0d291a74b57f9753537e727b7635b7 (patch)
treeb82fc87f02592c6f46a5bd9a530af7bde600f7a1 /drivers/i2c
parent9aac0fbd471bf09b614b2038faddc91f53b788bb (diff)
downloadlinux-27429be75e0d291a74b57f9753537e727b7635b7.tar.xz
fm10k: cast page_addr to u8 * when incrementing it
The page_addr variable is a void pointer. Incrementing it before calling prefetch is technically undefined. Fix this by casting it to a u8* pointer before incrementing it. This ensures that we increment the pointer value in byte units, instead of relying on this undefined behavior. This was detected by cppcheck, and resolves the following warning produced by that tool: [fm10k_main.c:328]: (portability) 'page_addr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/i2c')
0 files changed, 0 insertions, 0 deletions