Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752153AbdHHMq1 (ORCPT ); Tue, 8 Aug 2017 08:46:27 -0400 Received: from m12-15.163.com ([220.181.12.15]:43201 "EHLO m12-15.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751993AbdHHMqX (ORCPT ); Tue, 8 Aug 2017 08:46:23 -0400 From: Pan Bian To: Greg Kroah-Hartman , Dmitry Torokhov , Guenter Roeck , Thierry Escande , Wei Yongjun , Christophe JAILLET , Wei-Ning Huang Cc: linux-kernel@vger.kernel.org, Pan Bian Subject: firmware: vpd: use memunmap instead of iounmap Date: Tue, 8 Aug 2017 20:45:56 +0800 Message-Id: <1502196356-11466-1-git-send-email-bianpan2016@163.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: D8CowADHZDqPsolZplIaSQ--.9473S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7JFyxZr4xZF4ftFWxXw17Awb_yoW8JrWUpF WUGFWIkr17Ja18Zw17Aw4UuryYvFW8JFy8uFy7ZasxA3Zxury0yFyrKFyqgr1aqryfZa47 Xa18ua1DX3W8CwUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jgjjDUUUUU= X-Originating-IP: [106.120.213.62] X-CM-SenderInfo: held01tdqsiiqw6rljoofrz/1tbiDhEuclXlkPhp3wAAst Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1189 Lines: 42 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 --- 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