Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: tmio: do not print real IOMEM pointer

Printing kernel pointers is discouraged because they might leak kernel
memory layout. This fixes smatch warning:

drivers/mmc/host/tmio_mmc.c:177 tmio_mmc_probe() warn: argument 3 to %08lx specifier is cast from pointer

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201116164252.44078-1-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Krzysztof Kozlowski and committed by
Ulf Hansson
ade8e9d3 fcc541fe

+1 -2
+1 -2
drivers/mmc/host/tmio_mmc.c
··· 174 174 if (ret) 175 175 goto host_remove; 176 176 177 - pr_info("%s at 0x%08lx irq %d\n", mmc_hostname(host->mmc), 178 - (unsigned long)host->ctl, irq); 177 + pr_info("%s at 0x%p irq %d\n", mmc_hostname(host->mmc), host->ctl, irq); 179 178 180 179 return 0; 181 180