diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2011-09-20 11:06:17 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-09-21 09:41:48 -0600 |
commit | 7eb187b3cd3f6f285d91a196dbefac9b6adbb07c (patch) | |
tree | 2086865907f57e441d15ad16bd8bbdd07c29091a /drivers/ide/ide.c | |
parent | 3e3ea716270dc64810f624ad6a3672440b45d3d4 (diff) | |
download | op-kernel-dev-7eb187b3cd3f6f285d91a196dbefac9b6adbb07c.zip op-kernel-dev-7eb187b3cd3f6f285d91a196dbefac9b6adbb07c.tar.gz |
spi: spi-dw: fix all sparse warnings
The dw_{read,write}[lw] macros produce sparse warnings everytime they
are used. The "read" ones cause:
warning: cast removes address space of expression
warning: incorrect type in argument 1 (different address spaces)
expected void const volatile [noderef] <asn:2>*addr
got unsigned int *<noident>
And the "write" ones:
warning: cast removes address space of expression
warning: incorrect type in argument 2 (different address spaces)
expected void volatile [noderef] <asn:2>*addr
got unsigned int *<noident>
Fix this by removing struct dw_spi_reg and converting all the register
offsets to #defines. Then convert the macros into inlined functions so
that proper type checking can occur.
While here, also fix the three sparse warnings in spi-dw-mid.c due to
the return value of ioremap_nocache being stored in a u32 * not a
void __iomem *.
With these changes the spi-dw* files all build with no sparse warnings.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/ide/ide.c')
0 files changed, 0 insertions, 0 deletions