android_kernel_oneplus_msm8998/include/linux/mmc
Arnd Bergmann 59e62eb42a mmc: dw_mmc: use resource_size_t to store physical address
commit 260b31643691e8a58683a4ccc3bdf7abfd86f54a upstream.

The dw_mmc driver stores the physical address of the MMIO registers
in a pointer, which requires the use of type casts, and is actually
broken if anyone ever has this device on a 32-bit SoC in registers
above 4GB. Gcc warns about this possibility when the driver is built
with ARM LPAE enabled:

mmc/host/dw_mmc.c: In function 'dw_mci_edmac_start_dma':
mmc/host/dw_mmc.c:702:17: warning: cast from pointer to integer of different size
  cfg.dst_addr = (dma_addr_t)(host->phy_regs + fifo_offset);
                 ^
mmc/host/dw_mmc-pltfm.c: In function 'dw_mci_pltfm_register':
mmc/host/dw_mmc-pltfm.c:63:19: warning: cast to pointer from integer of different size
  host->phy_regs = (void *)(regs->start);

This changes the code to use resource_size_t, which gets rid of the
warning, the bug and the useless casts.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-24 10:07:42 +02:00
..
boot.h
card.h mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
core.h mmc: mmc: extend the mmc_send_tuning() 2015-10-27 10:38:41 +01:00
dw_mmc.h mmc: dw_mmc: use resource_size_t to store physical address 2016-09-24 10:07:42 +02:00
host.h mmc: core: Add mmc_regulator_set_vqmmc() 2015-10-26 16:00:10 +01:00
mmc.h
pm.h
sd.h
sdhci-pci-data.h
sdio.h
sdio_func.h
sdio_ids.h
sh_mmcif.h
sh_mobile_sdhi.h
slot-gpio.h
tmio.h