aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkbuild test robot <[email protected]>2017-01-24 23:41:46 +0800
committerTakashi Iwai <[email protected]>2017-01-25 14:25:37 +0100
commitf0fd4122f0526b7575d10f6699b57f03e9bfd1ec (patch)
treeeef736aefe88df900e0984326898078d4f5a2f05
parent232892fb14265b07b7a50061f36aaa5a6b81fb9d (diff)
ALSA: x86: fix resource_size.cocci warnings
sound/x86/intel_hdmi_lpe_audio.c:498:24-27: ERROR: Missing resource_size with res_mmio Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci CC: Jerome Anand <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
-rw-r--r--sound/x86/intel_hdmi_lpe_audio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/x86/intel_hdmi_lpe_audio.c b/sound/x86/intel_hdmi_lpe_audio.c
index ce24ef1dd491..ead2d3af168c 100644
--- a/sound/x86/intel_hdmi_lpe_audio.c
+++ b/sound/x86/intel_hdmi_lpe_audio.c
@@ -496,8 +496,7 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
(unsigned int)res_mmio->end);
mmio_start = ioremap_nocache(res_mmio->start,
- (size_t)((res_mmio->end -
- res_mmio->start) + 1));
+ (size_t)(resource_size(res_mmio)));
if (!mmio_start) {
dev_err(&hlpe_pdev->dev, "Could not get ioremap\n");
return -EACCES;