summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJan Dabros <jsd@semihalf.com>2022-02-18 16:33:48 +0300
committerWolfram Sang <wsa@kernel.org>2022-03-01 18:12:42 +0300
commit17ba1e87fca9e6bad7eacbb1ef042c83358d245e (patch)
treeec3c3e3639ee9c453e30366cd3c9be65b94c721a /scripts
parentd8703554f4dea9775417525b22b3d65ed1c6b16e (diff)
downloadlinux-17ba1e87fca9e6bad7eacbb1ef042c83358d245e.tar.xz
i2c: designware: Fix improper usage of readl
Kernel test robot reported incorrect type in argument 1 of readl(), but more importantly it brought attention that MMIO accessor shouldn't be used in this case, since req->hdr.status is part of a command-response buffer in system memory. Since its value may be altered by PSP outside of the scope of current thread (somehow similar to IRQ handler case), we need to use READ_ONCE() to ensure compiler won't optimize this call. Fix also 'status' variable type to reflect that corresponding field in command-response buffer is platform-independent u32. Fixes: 78d5e9e299e3 ("i2c: designware: Add AMD PSP I2C bus support") Signed-off-by: Jan Dabros <jsd@semihalf.com> Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions