mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* firmware: vpd: use memunmap instead of iounmap
@ 2017-08-08 12:45 Pan Bian
  2017-08-08 14:38 ` Guenter Roeck
  2017-08-08 16:26 ` Dmitry Torokhov
  0 siblings, 2 replies; 3+ messages in thread
From: Pan Bian @ 2017-08-08 12:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Dmitry Torokhov, Guenter Roeck,
	Thierry Escande, Wei Yongjun, Christophe JAILLET, Wei-Ning Huang
  Cc: linux-kernel, Pan Bian

In functions vpd_sections_init() and vpd_section_init(), iounmap() is
used to unmap memory. However, in these cases, memunmap() is better.

Signed-off-by: Pan Bian <bianpan2016@163.com>
---
 drivers/firmware/google/vpd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c
index 7894572..ac6400f 100644
--- a/drivers/firmware/google/vpd.c
+++ b/drivers/firmware/google/vpd.c
@@ -234,7 +234,7 @@ static int vpd_section_init(const char *name, struct vpd_section *sec,
 err_free_raw_name:
 	kfree(sec->raw_name);
 err_iounmap:
-	iounmap(sec->baseaddr);
+	memunmap(sec->baseaddr);
 	return err;
 }
 
@@ -245,7 +245,7 @@ static int vpd_section_destroy(struct vpd_section *sec)
 		kobject_put(sec->kobj);
 		sysfs_remove_bin_file(vpd_kobj, &sec->bin_attr);
 		kfree(sec->raw_name);
-		iounmap(sec->baseaddr);
+		memunmap(sec->baseaddr);
 	}
 
 	return 0;
@@ -262,7 +262,7 @@ static int vpd_sections_init(phys_addr_t physaddr)
 		return -ENOMEM;
 
 	memcpy_fromio(&header, temp, sizeof(struct vpd_cbmem));
-	iounmap(temp);
+	memunmap(temp);
 
 	if (header.magic != VPD_CBMEM_MAGIC)
 		return -ENODEV;
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-08 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08 12:45 firmware: vpd: use memunmap instead of iounmap Pan Bian
2017-08-08 14:38 ` Guenter Roeck
2017-08-08 16:26 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®